From 5e697a70c7e49e18bc3bc2f75c2e9ad5bda17489 Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期五, 17 五月 2024 15:40:23 +0800
Subject: [PATCH] Merge branch 'master' of ssh://117.78.1.188:29418/dkyChenJiang

---
 javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
index 16ec34c..fc033af 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/DeviceLogMapper.xml
@@ -10,6 +10,7 @@
         <result property="projectId"    column="project_id"    />
         <result property="projectName"    column="project_name"    />
         <result property="deviceId"    column="device_id"    />
+        <result property="deviceCode"    column="device_code"    />
         <result property="deviceName"    column="device_name"    />
         <result property="type"    column="type"    />
         <result property="transactionDate"    column="transaction_date"    />
@@ -21,19 +22,23 @@
     </resultMap>
 
     <sql id="selectDeviceLogVo">
-        select id, code, project_id, project_name, device_id, device_name, type, transaction_date, opt_user, apply_user, number, create_date, remark from js_device_log
+        select id, code, project_id, project_name, device_id, device_code, device_name, type, transaction_date, opt_user, apply_user, number, create_date, remark from js_device_log
     </sql>
 
     <select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult">
         <include refid="selectDeviceLogVo"/>
-        <where>  
+        <where>
             <if test="code != null  and code != ''"> and code = #{code}</if>
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
             <if test="projectName != null  and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+            <if test="deviceId != null  and deviceId != ''"> and device_id = #{deviceId}</if>
+            <if test="deviceCode != null  and deviceCode != ''"> and device_code = #{deviceCode}</if>
             <if test="deviceName != null  and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="optUser != null  and optUser != ''"> and opt_user = #{optUser}</if>
             <if test="applyUser != null  and applyUser != ''"> and apply_user = #{applyUser}</if>
         </where>
+        ORDER BY create_date
     </select>
     
     <select id="selectDeviceLogById" parameterType="String" resultMap="DeviceLogResult">
@@ -49,6 +54,7 @@
             <if test="projectId != null  and projectId != ''">project_id,</if>
             <if test="projectName != null  and projectName != ''">project_name,</if>
             <if test="deviceId != null  and deviceId != ''">device_id,</if>
+            <if test="deviceCode != null  and deviceCode != ''">device_code,</if>
             <if test="deviceName != null  and deviceName != ''">device_name,</if>
             <if test="type != null  and type != ''">type,</if>
             <if test="transactionDate != null  and transactionDate != ''">transaction_date,</if>
@@ -64,6 +70,7 @@
             <if test="projectId != null  and projectId != ''">#{projectId},</if>
             <if test="projectName != null  and projectName != ''">#{projectName},</if>
             <if test="deviceId != null  and deviceId != ''">#{deviceId},</if>
+            <if test="deviceCode != null  and deviceCode != ''">#{deviceCode},</if>
             <if test="deviceName != null  and deviceName != ''">#{deviceName},</if>
             <if test="type != null  and type != ''">#{type},</if>
             <if test="transactionDate != null  and transactionDate != ''">#{transactionDate},</if>
@@ -82,6 +89,7 @@
             <if test="projectId != null  and projectId != ''">project_id = #{projectId},</if>
             <if test="projectName != null  and projectName != ''">project_name = #{projectName},</if>
             <if test="deviceId != null  and deviceId != ''">device_id = #{deviceId},</if>
+            <if test="deviceCode != null  and deviceCode != ''">device_code = #{deviceCode},</if>
             <if test="deviceName != null  and deviceName != ''">device_name = #{deviceName},</if>
             <if test="type != null  and type != ''">type = #{type},</if>
             <if test="transactionDate != null  and transactionDate != ''">transaction_date = #{transactionDate},</if>

--
Gitblit v1.9.1