From 288fd4f39fae6bcd0a26cdbcbf0a17c3bd3a877d Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期四, 11 七月 2024 14:23:58 +0800 Subject: [PATCH] 小程序里的获取全部取水口 模糊查询改为精准查询 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml index dddf7e3..af30365 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml @@ -404,9 +404,10 @@ rtus.isOnLine = #{isOnLine} </if> <if test="intakeNum != null and intakeNum != ''"> - AND inta.name LIKE CONCAT('%', #{intakeNum}, '%') + AND inta.name = #{intakeNum} </if> </where> + order by con.id ASC <if test="pageCurr != null and pageSize != null"> LIMIT ${(pageCurr-1)*pageSize}, ${pageSize} </if> @@ -436,4 +437,22 @@ </if> </where> </select> + + <!--鍙栨按鍙e悕绉版崲鍙栨按鍙D锛屾壂鐮佸紑闃�浣跨敤--> + <select id="getIntakeIdByName" resultType="java.lang.Long"> + SELECT id AS intakeId FROM pr_intake WHERE `name` = #{intakeName} + </select> + + <!--鍙栨按鍙e悕绉版崲鍙栨按鍙D锛岄獙璇佹槸鍚﹂噸澶嶅悕绉颁娇鐢�--> + <select id="getIntakeIdsByName" resultType="java.lang.Long"> + SELECT id AS intakeId FROM pr_intake WHERE `name` = #{intakeName} + </select> + + <!--鍙栨按鍙e悕绉版崲鍙栨按鍙D锛岄獙璇佹槸鍚﹂噸澶嶅悕绉颁娇鐢�--> + <select id="getIntakeIdByNameExcludeId" resultType="java.lang.Long"> + SELECT id AS intakeId FROM pr_intake WHERE id != #{id} and `name` = #{intakeName} + </select> + + + </mapper> \ No newline at end of file -- Gitblit v1.8.0