From 2818327f844e65e1efc398271b7e4ebf9e8d8364 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Thu, 15 Jan 2026 18:44:53 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/UserRechargeMapper.xml |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/resources/mapper/UserRechargeMapper.xml b/src/main/resources/mapper/UserRechargeMapper.xml
index 2f36d6c..df43a22 100644
--- a/src/main/resources/mapper/UserRechargeMapper.xml
+++ b/src/main/resources/mapper/UserRechargeMapper.xml
@@ -20,18 +20,18 @@
   </resultMap>
   <sql id="Base_Column_List" >
     id, user_id, nick_name, agent_id, order_sn, pay_sn, pay_channel, pay_amt, order_status,
-    order_desc, add_time, pay_time, pay_id,img
+    order_desc, add_time, pay_time, pay_id,img,assets_type
   </sql>
   <insert id="insert" parameterType="com.nq.pojo.UserRecharge" >
     insert into user_recharge (id, user_id, nick_name,
       agent_id, order_sn, pay_sn,
       pay_channel, pay_amt, order_status,
-      order_desc, add_time, pay_time,pay_id,img
+      order_desc, add_time, pay_time,pay_id,img,assets_type
       )
     values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR},
       #{agentId,jdbcType=INTEGER}, #{orderSn,jdbcType=VARCHAR}, #{paySn,jdbcType=VARCHAR},
       #{payChannel,jdbcType=VARCHAR}, #{payAmt,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER},
-      #{orderDesc,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, #{payId,jdbcType=INTEGER}, #{img,jdbcType=VARCHAR}
+      #{orderDesc,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, #{payId,jdbcType=INTEGER}, #{img,jdbcType=VARCHAR},#{assetsType,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.nq.pojo.UserRecharge" >
@@ -219,8 +219,8 @@
     FROM user_recharge s
     join site_pay p
     on s.pay_id = p.id
-    where  agent_id != 1
-    <if test="agentId != null">
+    where  1=1
+    <if test="agentId != null and agentId != ''">
       and ( agent_id = #{agentId}
       or agent_id in (
       select agent_user.id
@@ -229,20 +229,20 @@
       )
       )
     </if>
-    <if test="userId != null">
+    <if test="userId != null and agentId != ''">
       and user_id = #{userId}
     </if>
     <if test="realName != null and realName != '' ">
       and nick_name like CONCAT('%','${realName}','%')
     </if>
-    <if test="state != null">
+    <if test="state != null and agentId != ''">
       and order_status = #{state}
     </if>
 
-    <if test="begin_time != null ">
+    <if test="begin_time != null  and agentId != ''">
       and pay_time <![CDATA[>=]]> #{begin_time}
     </if>
-    <if test="end_time != null ">
+    <if test="end_time != null and agentId != ''">
       and pay_time <![CDATA[<=]]> #{end_time}
     </if>
     ORDER BY s.id DESC

--
Gitblit v1.9.3