From 33b9d2c203a9998272088ecdf43a15dd53669967 Mon Sep 17 00:00:00 2001
From: cjl <909710561@qq.com>
Date: Thu, 28 Mar 2024 15:51:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into cjl

---
 screen-api/src/main/resources/mapper/HandDeviceMapper.xml |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/screen-api/src/main/resources/mapper/HandDeviceMapper.xml b/screen-api/src/main/resources/mapper/HandDeviceMapper.xml
new file mode 100644
index 0000000..a7abf36
--- /dev/null
+++ b/screen-api/src/main/resources/mapper/HandDeviceMapper.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moral.api.mapper.HandDeviceMapper">
+
+        <!-- ������������������������ -->
+        <resultMap id="BaseResultMap" type="com.moral.api.entity.HandDevice">
+                    <id column="id" property="id" />
+                    <result column="name" property="name" />
+                    <result column="mac" property="mac" />
+                    <result column="address" property="address" />
+                    <result column="longitude" property="longitude" />
+                    <result column="latitude" property="latitude" />
+                    <result column="start_time" property="startTime" />
+                    <result column="is_delete" property="isDelete" />
+                    <result column="end_time" property="endTime" />
+                    <result column="create_name" property="createName" />
+                    <result column="update_name" property="updateName" />
+                    <result column="create_time" property="createTime" />
+                    <result column="update_time" property="updateTime" />
+        </resultMap>
+
+    <sql id="Base_Column_List">
+        id,name,mac,address,longitude,latitude,start_time,is_delete,end_time,create_name,update_name,create_time,update_time
+    </sql>
+    <select id="Page" resultType="com.moral.api.entity.HandDevice">
+        select
+        <include refid="Base_Column_List"/>
+        from hand_device
+        <where>
+            1=1 and is_delete=0
+            <if test="name != null and name != ''">
+                and name = #{name}
+            </if>
+            <if test="mac != null and mac != ''">
+                and mac = #{mac}
+            </if>
+            <if test="startTime != null and endTime == '' ">
+                and date(start_time) like CONCAT('%',#{startTime},'%')
+            </if>
+            <if test="endTime != '' and startTime != ''">
+                and date(start_time) <![CDATA[>=]]> #{startTime}
+                and date(end_time) <![CDATA[<=]]>  #{endTime}
+            </if>
+        </where>
+        order by start_time desc
+    </select>
+
+</mapper>
\ No newline at end of file

--
Gitblit v1.8.0