From 94e5611b79ba1440d042eb062fb36b1b9f01a0be Mon Sep 17 00:00:00 2001
From: baizonghao <1719256278@qq.com>
Date: 星期四, 30 三月 2023 20:00:15 +0800
Subject: [PATCH] 过期时间

---
 ycl-platform/src/main/resources/mapper/message/MessageMapper.xml |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/message/MessageMapper.xml b/ycl-platform/src/main/resources/mapper/message/MessageMapper.xml
index c0962e3..e6e041a 100644
--- a/ycl-platform/src/main/resources/mapper/message/MessageMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/message/MessageMapper.xml
@@ -37,7 +37,7 @@
             resultType="com.ycl.vo.message.MessageVO">
         SELECT
         t1.id,
-        t2.username as targetFrom,
+        t1.target_from,
         t3.column_name as messageTypeName,
         t1.`status`,
         t1.body,
@@ -45,10 +45,13 @@
         t1.create_time,
         t1.respond_result,
         t1.head,
-        t4.username as createUser
+        t1.target_to,
+        t1.message_type,
+        t1.channel_code,
+        t4.username as createUser,
+        t1.phone_number
         FROM
         `ums_message` t1
-        LEFT JOIN ums_admin t2 ON t1.target_from = t2.id
         left join ums_admin t4 on t1.create_user = t4.id
         LEFT JOIN ums_message_column t3 ON t3.id = t1.message_type
         <where>
@@ -58,8 +61,14 @@
             <if test="messageParam.channelCode !='' and messageParam.channelCode != null">
                 and t1.channel_code=#{messageParam.channelCode}
             </if>
+            <if test="messageParam.targetTo !='' and messageParam.targetTo != null">
+                and t1.target_to=#{messageParam.targetTo}
+            </if>
             <if test="messageParam.messageType != null">
                 and t1.message_type=#{messageParam.messageType}
+            </if>
+            <if test="messageParam.isView != null">
+                and t1.is_view=#{messageParam.isView}
             </if>
             <if test="messageParam.startTime != null and messageParam.startTime != '' and messageParam.endTime != null and messageParam.endTime != '' ">
                 and t1.create_time between #{messageParam.startTime} and #{messageParam.endTime}
@@ -69,7 +78,7 @@
                 and t1.status=#{messageParam.status}
             </if>
             <if test="messageParam.respondResult !=null and messageParam.respondResult !='' ">
-                and t1.respond_result={messageParam.respondResult}
+                and t1.respond_result=#{messageParam.respondResult}
             </if>
             <if test="messageParam.sort==1">
                 ORDER BY t1.create_time desc
@@ -78,6 +87,18 @@
                 ORDER BY t1.create_time asc
             </if>
         </where>
+        order by t1.create_time desc 
+    </select>
+
+    <select id="selectUserColumn" resultType="com.ycl.vo.message.MessageColumnUserVO">
+        SELECT
+            t1.*,
+            t2.is_receive
+        FROM
+            ums_message_column t1 LEFT JOIN ums_message_column_set t2 ON t1.id = t2.message_column_id
+        WHERE
+            t2.user_id=#{id}
+          and t1.is_show=1
     </select>
 
 </mapper>

--
Gitblit v1.8.0