package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jwipc.sys.entity.MsgTemplate;
import com.jwipc.sys.mapper.MsgTemplateMapper;
import com.jwipc.sys.model.po.MsgTemplatePO;
import com.jwipc.sys.model.query.MsgTemplateQuery;
import com.jwipc.sys.service.IMsgTemplateService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 邮件模板服务实现类
 * </p>
 *
 * @author dengjsh
 * @since 2024-03-22
 */
@Service
public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTemplate> implements IMsgTemplateService {

    @Override
    public List<MsgTemplatePO> findPageByQuery(Page<MsgTemplate> dbPage, MsgTemplateQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
}
