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

import java.util.*;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.facedeviceinfo.vo.FaceDeviceInfoPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.facedeviceinfo.FaceDeviceInfoDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 人脸设备信息关联门店 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface FaceDeviceInfoMapper extends BaseMapperX<FaceDeviceInfoDO> {

    default PageResult<FaceDeviceInfoDO> selectPage(FaceDeviceInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FaceDeviceInfoDO>()
                .eqIfPresent(FaceDeviceInfoDO::getMac, reqVO.getMac())
                .eqIfPresent(FaceDeviceInfoDO::getCarteenId, reqVO.getCarteenId())
                .likeIfPresent(FaceDeviceInfoDO::getDeviceName, reqVO.getDeviceName())
                .likeIfPresent(FaceDeviceInfoDO::getCarteenName, reqVO.getCarteenName())
                .eqIfPresent(FaceDeviceInfoDO::getActivationCode, reqVO.getActivationCode())
                .eqIfPresent(FaceDeviceInfoDO::getAlive, reqVO.getAlive())
                .betweenIfPresent(FaceDeviceInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FaceDeviceInfoDO::getId));
    }

}