houzhongjian
2024-10-16 7da8f196dee8e3c526c009a4bc7f5983ece6bb97
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.system.dal.mysql.sms;
H 2
3 import com.iailab.framework.common.pojo.PageResult;
4 import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
5 import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
6 import com.iailab.module.system.controller.admin.sms.vo.log.SmsLogPageReqVO;
7 import com.iailab.module.system.dal.dataobject.sms.SmsLogDO;
8 import org.apache.ibatis.annotations.Mapper;
9
10 @Mapper
11 public interface SmsLogMapper extends BaseMapperX<SmsLogDO> {
12
13     default PageResult<SmsLogDO> selectPage(SmsLogPageReqVO reqVO) {
14         return selectPage(reqVO, new LambdaQueryWrapperX<SmsLogDO>()
15                 .eqIfPresent(SmsLogDO::getChannelId, reqVO.getChannelId())
16                 .eqIfPresent(SmsLogDO::getTemplateId, reqVO.getTemplateId())
17                 .likeIfPresent(SmsLogDO::getMobile, reqVO.getMobile())
18                 .eqIfPresent(SmsLogDO::getSendStatus, reqVO.getSendStatus())
19                 .betweenIfPresent(SmsLogDO::getSendTime, reqVO.getSendTime())
20                 .eqIfPresent(SmsLogDO::getReceiveStatus, reqVO.getReceiveStatus())
21                 .betweenIfPresent(SmsLogDO::getReceiveTime, reqVO.getReceiveTime())
22                 .orderByDesc(SmsLogDO::getId));
23     }
24
25 }