package cn.newfeifan.mall.module.distri.dal.mysql.ptprofitlogdetails;


import cn.newfeifan.mall.framework.common.pojo.PageResult;
import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
import cn.newfeifan.mall.module.distri.dal.dataobject.ptprofitlogdetails.PtProfitLogDetailsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.newfeifan.mall.module.distri.controller.admin.ptprofitlogdetails.vo.*;

/**
 * 平台利润记录详情 Mapper
 *
 * @author 非繁人
 */
@Mapper
public interface PtProfitLogDetailsMapper extends BaseMapperX<PtProfitLogDetailsDO> {

    default PageResult<PtProfitLogDetailsDO> selectPage(PtProfitLogDetailsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PtProfitLogDetailsDO>()
                .eqIfPresent(PtProfitLogDetailsDO::getDistriPtProfitLogId, reqVO.getDistriPtProfitLogId())
                .eqIfPresent(PtProfitLogDetailsDO::getOrderItemId, reqVO.getOrderItemId())
                .betweenIfPresent(PtProfitLogDetailsDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(PtProfitLogDetailsDO::getId));
    }

}