xiaoyi
4 天以前 c9d4ba37c1f681b12e24014013fa9a28734bad42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cn.iocoder.yudao.module.aftersales.dal.mysql.compensation;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.aftersales.controller.admin.compensation.vo.AfterSaleCompensationPageReqVO;
import cn.iocoder.yudao.module.aftersales.dal.dataobject.compensation.AfterSaleCompensationDO;
import org.apache.ibatis.annotations.Mapper;
 
/**
 * 售后赔付/服务补偿单 Mapper
 */
@Mapper
public interface AfterSaleCompensationMapper extends BaseMapperX<AfterSaleCompensationDO> {
 
    default AfterSaleCompensationDO selectByCompensationNo(String compensationNo) {
        return selectOne(AfterSaleCompensationDO::getCompensationNo, compensationNo);
    }
 
    default PageResult<AfterSaleCompensationDO> selectPage(AfterSaleCompensationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AfterSaleCompensationDO>()
                .likeIfPresent(AfterSaleCompensationDO::getCompensationNo, reqVO.getCompensationNo())
                .eqIfPresent(AfterSaleCompensationDO::getCompensationType, reqVO.getCompensationType())
                .eqIfPresent(AfterSaleCompensationDO::getTicketId, reqVO.getTicketId())
                .eqIfPresent(AfterSaleCompensationDO::getCustomerId, reqVO.getCustomerId())
                .eqIfPresent(AfterSaleCompensationDO::getAuditStatus, reqVO.getAuditStatus())
                .orderByDesc(AfterSaleCompensationDO::getId));
    }
 
}