package cn.iocoder.yudao.module.member.dal.mysql.storerefund;

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.member.dal.dataobject.storerefund.StoreRefundDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.storerefund.vo.*;

/**
 * 超市订单退款审核 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface StoreRefundMapper extends BaseMapperX<StoreRefundDO> {

    default PageResult<StoreRefundDO> selectPage(StoreRefundPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StoreRefundDO>()
                .eqIfPresent(StoreRefundDO::getCarteenId, reqVO.getCarteenId())
                .eqIfPresent(StoreRefundDO::getOrderId, reqVO.getOrderId())
                .eqIfPresent(StoreRefundDO::getMoney, reqVO.getMoney())
                .eqIfPresent(StoreRefundDO::getOrderMoney, reqVO.getOrderMoney())
                .eqIfPresent(StoreRefundDO::getStatus, reqVO.getStatus())
                .eqIfPresent(StoreRefundDO::getUserId, reqVO.getUserId())
                .likeIfPresent(StoreRefundDO::getUserName, reqVO.getUserName())
                .eqIfPresent(StoreRefundDO::getMobile, reqVO.getMobile())
                .betweenIfPresent(StoreRefundDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(StoreRefundDO::getId));
    }

}