From ed4a0d3c769a605af7fb62b903c612a6202a82da Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期五, 25 十月 2024 09:35:48 +0800 Subject: [PATCH] 2024-10-25 朱宝民 微信小程序中开关阀记录增加筛选条件 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml index 9d8fc5e..42a788f 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmOpenCloseValveHistoryMapper.xml @@ -1270,7 +1270,12 @@ SELECT COUNT(*) AS recordCount FROM rm_open_close_valve_history his LEFT JOIN pr_intake inta ON inta.id = his.intake_id - WHERE op_type = 1 + <where> + AND op_type = 1 + <if test = "clientId != null"> + AND his.client_id = #{clientId} + </if> + </where> </select> <!--鑾峰彇鐗╃悊鍗″紑鍏抽榾璁板綍锛屽井淇″皬绋嬪簭浣跨敤--> @@ -1286,7 +1291,12 @@ '鍒峰崱寮�闃�' AS openType FROM rm_open_close_valve_history his LEFT JOIN pr_intake inta ON inta.id = his.intake_id - WHERE op_type = 1 + <where> + AND op_type = 1 + <if test = "clientId != null"> + AND his.client_id = #{clientId} + </if> + </where> ORDER BY open_dt DESC <trim prefix="limit " > <if test="start != null and count != null"> @@ -1300,7 +1310,12 @@ SELECT COUNT(*) AS recordCount FROM rm_open_close_valve_history his LEFT JOIN pr_intake inta ON inta.id = his.intake_id - WHERE op_type = 8 + <where> + AND op_type = 8 + <if test = "clientId != null"> + AND his.client_id = #{clientId} + </if> + </where> </select> <!--鑾峰彇铏氭嫙鍗″紑鍏抽榾璁板綍锛屽井淇″皬绋嬪簭浣跨敤--> @@ -1320,7 +1335,12 @@ END AS openType FROM rm_open_close_valve_history his LEFT JOIN pr_intake inta ON inta.id = his.intake_id - WHERE op_type = 8 + <where> + AND op_type = 8 + <if test = "clientId != null"> + AND his.client_id = #{clientId} + </if> + </where> ORDER BY open_dt DESC <trim prefix="limit " > <if test="start != null and count != null"> -- Gitblit v1.8.0