From c08844c08e64ad79f25a7e68bbc3f41fea3cded8 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 25 Oct 2023 15:52:18 +0800
Subject: [PATCH] 版本管理

---
 src/main/resources/mapper/modules/ChatUserMapper.xml |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/modules/ChatUserMapper.xml b/src/main/resources/mapper/modules/ChatUserMapper.xml
index 4221dba..514c666 100644
--- a/src/main/resources/mapper/modules/ChatUserMapper.xml
+++ b/src/main/resources/mapper/modules/ChatUserMapper.xml
@@ -20,6 +20,9 @@
         left join chat_wallet b on b.user_id = a.user_id and type = 'USDT'
         <where>
             <if test="record != null">
+                <if test="record.phone != null and record.phone != ''">
+                    and a.phone like CONCAT('%', CONCAT(#{record.phone}, '%'))
+                </if>
                 <if test="record.nickName != null and record.nickName != ''">
                     and a.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%'))
                 </if>
@@ -50,6 +53,9 @@
         left join chat_wallet b on b.user_id = a.user_id and type = 'USDT'
         <where>
             <if test="record != null">
+                <if test="record.phone != null and record.phone != ''">
+                    and a.phone like CONCAT('%', CONCAT(#{record.phone}, '%'))
+                </if>
                 <if test="record.nickName != null and record.nickName != ''">
                     and a.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%'))
                 </if>
@@ -102,6 +108,7 @@
         a.type type,
         a.amount amount,
         b.nick_name nickName,
+        b.phone phone,
         date_format(a.create_time, '%Y-%m-%d %H:%m:%s') createTime,
         a.ava_amount avaAmount,
         a.state state,
@@ -110,6 +117,9 @@
         inner join chat_user b on b.user_id = a.user_id
         <where>
             <if test="record != null">
+                <if test="record.phone != null and record.phone != ''">
+                    and b.phone like CONCAT('%', CONCAT(#{record.phone}, '%'))
+                </if>
                 <if test="record.nickName != null and record.nickName != ''">
                     and b.nick_name = #{record.nickName}
                 </if>
@@ -125,6 +135,7 @@
         select
         date_format(a.created_time, '%Y-%m-%d %H:%m:%s') createdTime,
         b.nick_name nickName,
+        b.phone phone,
         a.amount amount,
         a.last_amount lastAmount,
         a.status status,
@@ -136,6 +147,9 @@
         left join chat_user b on b.user_id = a.user_id
         <where>
             <if test="record != null">
+                <if test="record.phone != null and record.phone != ''">
+                    and b.phone like CONCAT('%', CONCAT(#{record.phone}, '%'))
+                </if>
                 <if test="record.nickName != null and record.nickName != ''">
                     and b.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%'))
                 </if>
@@ -151,6 +165,7 @@
         select
         date_format(a.created_time, '%Y-%m-%d %H:%m:%s') createdTime,
         b.nick_name nickName,
+        b.phone phone,
         a.id id,
         a.amount amount,
         a.type type,
@@ -160,6 +175,9 @@
         left join chat_user b on b.user_id = a.user_id
         <where>
             <if test="record != null">
+                <if test="record.phone != null and record.phone != ''">
+                    and b.phone like CONCAT('%', CONCAT(#{record.phone}, '%'))
+                </if>
                 <if test="record.nickName != null and record.nickName != ''">
                     and b.nick_name like CONCAT('%', CONCAT(#{record.nickName}, '%'))
                 </if>
@@ -375,5 +393,12 @@
         where id = #{id}
     </update>
 
+    <update id="updatePortraitById">
+        update chat_user
+        set
+            portrait = #{portrait}
+        where user_id = #{userId}
+    </update>
+
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1