From 1c906b7c79c5e08aac6d5f18412396bf5b07ca04 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 19 Sep 2025 19:03:38 +0800
Subject: [PATCH] 1

---
 trading-order-service/src/main/resources/mapper/user/RealNameAuthRecordMapper.xml |   48 +++++++++++++++++++++++++++---------------------
 1 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/trading-order-service/src/main/resources/mapper/user/RealNameAuthRecordMapper.xml b/trading-order-service/src/main/resources/mapper/user/RealNameAuthRecordMapper.xml
index f785aca..3cf788a 100644
--- a/trading-order-service/src/main/resources/mapper/user/RealNameAuthRecordMapper.xml
+++ b/trading-order-service/src/main/resources/mapper/user/RealNameAuthRecordMapper.xml
@@ -2,26 +2,32 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yami.trading.dao.user.RealNameAuthRecordMapper">
 
-  <select id="pageRecord" resultType="com.yami.trading.bean.user.dto.RealNameAuthDto">
-      SELECT rr.*,u.user_name,u.user_code,u.role_name,u.user_mobile,u.user_mail,
-      ur.user_name AS 'recomUserName',
-      ur.user_code AS 'recomUserCode' FROM tz_real_name_auth_record  rr
-      LEFT JOIN  tz_user  u ON  rr.user_id=u.user_id
-      LEFT JOIN tz_user ur ON u.user_recom=ur.user_id
-           where 1=1  and rr.del_flag=0
-        <if test="rolename!=null and rolename!=''">
-             and u.role_name=#{rolename}
+    <select id="pageRecord" resultType="com.yami.trading.bean.user.dto.RealNameAuthDto">
+        SELECT
+        rr.*,
+        u.user_name,
+        u.user_code,
+        u.role_name,
+        u.user_mobile,
+        u.user_mail,
+        ur.user_name AS recomUserName,
+        ur.user_code AS recomUserCode
+        FROM tz_real_name_auth_record rr
+        LEFT JOIN tz_user u ON rr.user_id = u.user_id
+        LEFT JOIN tz_user ur ON u.user_recom = ur.user_id
+        WHERE rr.del_flag = 0
+        <if test="rolename != null and rolename != ''">
+            AND u.role_name = #{rolename}
         </if>
-
-      <if test="status!=null and status!=''">
-          and rr.status=#{status}
-      </if>
-      <if test="userCode!=null and userCode!=''">
-          and (u.user_name=#{userCode} or u.user_code=#{userCode})
-      </if>
-      <if test="idNumber!=null and idNumber!=''">
-          and rr.id_number=#{idNumber}
-      </if>
-      order by rr.create_time desc
-  </select>
+        <if test="status != null and status != ''">
+            AND rr.status = #{status}
+        </if>
+        <if test="userCode != null and userCode != ''">
+            AND (u.user_name = #{userCode} OR u.user_code = #{userCode})
+        </if>
+        <if test="idNumber != null and idNumber != ''">
+            AND rr.id_number = #{idNumber}
+        </if>
+        ORDER BY rr.create_time DESC
+    </select>
 </mapper>

--
Gitblit v1.9.3