package com.foreverwin.mesnac.equip.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.equip.mapper.EmailGroupMapper;
import com.foreverwin.mesnac.equip.model.EmailGroup;
import com.foreverwin.mesnac.equip.service.EmailGroupService;
import com.foreverwin.modular.core.util.FrontPage;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Max
 * @since 2021-03-11
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class EmailGroupServiceImpl extends ServiceImpl<EmailGroupMapper, EmailGroup> implements EmailGroupService {

    @Override
    public IPage<EmailGroup> selectPage(FrontPage<EmailGroup> frontPage, EmailGroup emailGroup) {
        QueryWrapper<EmailGroup> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(emailGroup);
        return super.page(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<EmailGroup> selectList(EmailGroup emailGroup) {
        QueryWrapper<EmailGroup> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(emailGroup);
        return super.list(queryWrapper);
    }


}