From a1966e119c4d249f0a1051951ff2904b19198218 Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期二, 05 三月 2024 02:42:08 +0800 Subject: [PATCH] 标准库开发 --- cnas-server/src/main/resources/mapper/DeviceMapper.xml | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/cnas-server/src/main/resources/mapper/DeviceMapper.xml b/cnas-server/src/main/resources/mapper/DeviceMapper.xml index e15e4f1..2115459 100644 --- a/cnas-server/src/main/resources/mapper/DeviceMapper.xml +++ b/cnas-server/src/main/resources/mapper/DeviceMapper.xml @@ -35,7 +35,8 @@ create_user, create_time, update_user, - update_time + update_time, + status, from device ) a <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> @@ -49,6 +50,7 @@ specificationModel, deviceStatus, create_user, + status, update_time from device ) a @@ -56,4 +58,29 @@ ${ew.customSqlSegment} </if> </select> + <select id="authorizedPerson" resultType="com.yuanchu.mom.pojo.Device"> + select * + from (select id, + authorized_person, + status + from device) a + </select> + <select id="search" resultType="com.yuanchu.mom.pojo.Device"> + select * + from device + <where> + <if test="status!=null"> + and status = #{status} + </if> + <if test="deviceName!=null and deviceName!=''"> + and device_name like concat('%',#{deviceName},'%') + </if> + <if test="specificationModel!=null and specificationModel!= ''"> + and specification_model = #{specificationModel} + </if> + <if test="largeCategory!=null and largeCategory!= ''"> + and large_category = #{largeCategory} + </if> + </where> + </select> </mapper> -- Gitblit v1.9.3