package cn.iocoder.yudao.module.system.dal.mysql.cashregisterinfo;

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.system.controller.admin.cashregisterinfo.vo.CashRegisterInfoPageReqVO;

import cn.iocoder.yudao.module.system.dal.dataobject.cashregisterinfo.CashRegisterInfoDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 收银机信息关联门店 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface CashRegisterInfoMapper extends BaseMapperX<CashRegisterInfoDO> {

    default PageResult<CashRegisterInfoDO> selectPage(CashRegisterInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CashRegisterInfoDO>()
                .eqIfPresent(CashRegisterInfoDO::getEquipmentCode, reqVO.getEquipmentCode())
                .eqIfPresent(CashRegisterInfoDO::getCarteenId, reqVO.getCarteenId())
                .likeIfPresent(CashRegisterInfoDO::getDeviceName, reqVO.getDeviceName())
                .eqIfPresent(CashRegisterInfoDO::getActivationCode, reqVO.getActivationCode())
                .eqIfPresent(CashRegisterInfoDO::getAppId, reqVO.getAppId())
                .eqIfPresent(CashRegisterInfoDO::getSdkKey, reqVO.getSdkKey())
                .eqIfPresent(CashRegisterInfoDO::getAlive, reqVO.getAlive())
                .betweenIfPresent(CashRegisterInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CashRegisterInfoDO::getId));
    }

}