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


import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
import cn.newfeifan.mall.module.distri.controller.admin.ptprofitlog.vo.PtProfitLogPageReqVO;
import cn.newfeifan.mall.module.distri.dal.dataobject.ptprofitlog.PtProfitLogDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 平台利润记录 Mapper
 *
 * @author 非繁人
 */
@Mapper
public interface PtProfitLogMapper extends BaseMapperX<PtProfitLogDO> {
    Object selectPage(PtProfitLogPageReqVO pageReqVO);

//    default PageResult<PtProfitLogDO> selectPage(PtProfitLogPageReqVO reqVO) {
//        LambdaQueryWrapperX<PtProfitLogDO> queryWrapper = new LambdaQueryWrapperX<PtProfitLogDO>()
//                .eqIfPresent(PtProfitLogDO::getAmount, reqVO.getAmount())
//                .eqIfPresent(PtProfitLogDO::getAfterAmount, reqVO.getAfterAmount())
//                .eqIfPresent(PtProfitLogDO::getOrderId, reqVO.getOrderId())
//                .eqIfPresent(PtProfitLogDO::getPercentTemplate, reqVO.getPercentTemplate())
//                .eqIfPresent(PtProfitLogDO::getUserId, reqVO.getUserId())
//                .orderByDesc(PtProfitLogDO::getCreateTime);
//        if(reqVO.getIsFreeze()){
//            queryWrapper.isNotNull(PtProfitLogDO::getAmount);
//        }else{
//            queryWrapper.isNotNull(PtProfitLogDO::getFreezeAmount);
//        }
//        return selectPage(reqVO, queryWrapper);
//    }
}