From b8301f003ffec987f9e2ececf2c708a16e29116f Mon Sep 17 00:00:00 2001
From: peter <14100000001@qq.com>
Date: Sat, 15 Nov 2025 14:16:16 +0800
Subject: [PATCH] 修改购买金额问题

---
 src/main/resources/mapper/UserMapper.xml |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 8efe003..8ae0c4d 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -24,16 +24,21 @@
         <result column="auth_msg" property="authMsg"/>
         <result column="withdrawal_Pwd" property="withdrawalPwd"/>
         <result column="vaild_number"  property="vaildNumber"/>
+        <result column="lever" property="lever"/>
+        <result column="fund_ratio"  property="fundRatio"/>
 
     </resultMap>
     <sql id="Base_Column_List">
     id, agent_id, agent_name, phone, user_pwd, with_pwd, nick_name, real_name, id_card, 
     account_type, is_lock, is_login,
     reg_time, reg_ip, reg_address, img1_key, img2_key, img3_key, is_active, auth_msg,
-    withdrawal_Pwd,vaild_number
+    withdrawal_Pwd,vaild_number,lever,fund_ratio
   </sql>
 
 
+    <select id="findByPhone" parameterType="string" resultType="com.nq.pojo.User">
+        select * from user where phone= #{phone}
+    </select>
 
     <select id="login" resultMap="BaseResultMap" parameterType="map">
         SELECT
@@ -47,9 +52,10 @@
         <include refid="Base_Column_List"/>
         FROM user
         <where>
-            (agent_id = #{searchId} or
-             agent_id in (select a.id FROM agent_user a left join agent_distribution_user d on a.id = d.agent_id WHERE d.parent_id = #{searchId})
-            )
+            1=1
+            <if test="searchId != null and searchId != '' ">
+                and agent_id = #{searchId}
+            </if>
             <if test="realName != null and realName != '' ">
                 and real_name like CONCAT('%','${realName}','%')
             </if>
@@ -79,7 +85,7 @@
 
     <select id="listByAdmin" resultMap="BaseResultMap" parameterType="map">
         SELECT
-        <include refid="Base_Column_List"/>
+        *
         FROM user
         <where>
             <if test="searchId != null ">
@@ -94,6 +100,18 @@
             <if test="accountType != null ">
                 and account_type = #{accountType}
             </if>
+            <if test="isLock != null ">
+                and is_lock = #{isLock}
+            </if>
+            <if test="isLogin != null ">
+                and is_login = #{isLogin}
+            </if>
+            <if test="regTime != null and regTime != ''">
+                and  DATE_FORMAT(reg_time, '%Y-%m-%d') = #{regTime}
+            </if>
+            <if test="isActive != null ">
+                and is_active = #{isActive}
+            </if>
         </where>
         ORDER BY id DESC
     </select>

--
Gitblit v1.9.3