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

import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.MessageTypeUserGroup;
import com.foreverwin.mesnac.meapi.mapper.MessageTypeUserGroupMapper;
import com.foreverwin.mesnac.meapi.service.MessageTypeUserGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Philip
 * @since 2021-08-07
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MessageTypeUserGroupServiceImpl extends ServiceImpl<MessageTypeUserGroupMapper, MessageTypeUserGroup> implements MessageTypeUserGroupService {


    @Autowired
    private MessageTypeUserGroupMapper messageTypeUserGroupMapper;

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

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


}