package cn.iocoder.yudao.module.pay.dal.mysql.wxprofitsharinginfo;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.pay.dal.dataobject.wxprofitsharinginfo.WxProfitsharingInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.pay.controller.admin.wxprofitsharinginfo.vo.*;

/**
 * 微信分账明细 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface WxProfitsharingInfoMapper extends BaseMapperX<WxProfitsharingInfoDO> {

    default PageResult<WxProfitsharingInfoDO> selectPage(WxProfitsharingInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<WxProfitsharingInfoDO>()
                .eqIfPresent(WxProfitsharingInfoDO::getPayWxProfitsharingId, reqVO.getPayWxProfitsharingId())
                .likeIfPresent(WxProfitsharingInfoDO::getName, reqVO.getName())
                .eqIfPresent(WxProfitsharingInfoDO::getType, reqVO.getType())
                .eqIfPresent(WxProfitsharingInfoDO::getAccount, reqVO.getAccount())
                .eqIfPresent(WxProfitsharingInfoDO::getAmount, reqVO.getAmount())
                .eqIfPresent(WxProfitsharingInfoDO::getDescription, reqVO.getDescription())
                .eqIfPresent(WxProfitsharingInfoDO::getResult, reqVO.getResult())
                .eqIfPresent(WxProfitsharingInfoDO::getFailReason, reqVO.getFailReason())
                .eqIfPresent(WxProfitsharingInfoDO::getDetailId, reqVO.getDetailId())
                .betweenIfPresent(WxProfitsharingInfoDO::getDCreateTime, reqVO.getDCreateTime())
                .betweenIfPresent(WxProfitsharingInfoDO::getDFinishTime, reqVO.getDFinishTime())
                .betweenIfPresent(WxProfitsharingInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(WxProfitsharingInfoDO::getId));
    }

}