Jay
2024-11-25 ee9f604388a3e77d3f4654e326f3976552e7f532
提交 | 用户 | 时间
149dd0 1 package com.iailab.module.data.video.dao;
H 2
3 import com.iailab.framework.common.pojo.PageResult;
4 import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
5 import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
6 import com.iailab.framework.tenant.core.db.dynamic.TenantDS;
7 import com.iailab.module.data.video.controller.admin.nvr.vo.NvrPageReqVO;
8 import com.iailab.module.data.video.entity.NvrEntity;
9 import org.apache.ibatis.annotations.Mapper;
10
11 /**
12  * @author PanZhibao
13  * @Description
14  * @createTime 2024年03月06日
15  */
16 @TenantDS
17 @Mapper
18 public interface NvrDao extends BaseMapperX<NvrEntity> {
19
20     default PageResult<NvrEntity> selectPage(NvrPageReqVO pageReqVO) {
21         return selectPage(pageReqVO, new LambdaQueryWrapperX<NvrEntity>()
22                 .eqIfPresent(NvrEntity::getBrand, pageReqVO.getBrand())
23                 .likeIfPresent(NvrEntity::getDevice, pageReqVO.getDevice())
24                 .likeIfPresent(NvrEntity::getIp, pageReqVO.getIp())
25                 .likeIfPresent(NvrEntity::getCode, pageReqVO.getCode())
26                 .likeIfPresent(NvrEntity::getName, pageReqVO.getName())
27                 .orderByDesc(NvrEntity::getId));
28     }
29
30 }