From 30e592bd0975b41e0b4b4140c4b794c2e1e121de Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Mon, 09 Feb 2026 15:21:44 +0800
Subject: [PATCH] 平仓
---
src/main/resources/mapper/UserRechargeMapper.xml | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/main/resources/mapper/UserRechargeMapper.xml b/src/main/resources/mapper/UserRechargeMapper.xml
index 3f5580d..fa0443b 100644
--- a/src/main/resources/mapper/UserRechargeMapper.xml
+++ b/src/main/resources/mapper/UserRechargeMapper.xml
@@ -15,7 +15,8 @@
<result column="add_time" property="addTime"/>
<result column="pay_time" property="payTime"/>
<result column="pay_id" property="payId"/>
- <result column="img" property="img"/>
+ <result column="img" property="img"/>
+ <result column="assets_type" property="assetsType"/>
</resultMap>
<sql id="Base_Column_List" >
id, user_id, nick_name, agent_id, order_sn, pay_sn, pay_channel, pay_amt, order_status,
@@ -25,12 +26,12 @@
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
+ order_desc, add_time, pay_time,pay_id,img
)
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}
+ #{orderDesc,jdbcType=VARCHAR}, #{addTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, #{payId,jdbcType=INTEGER}, #{img,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.nq.pojo.UserRecharge" >
@@ -214,12 +215,10 @@
<select id="listByAdmin" parameterType="map" resultType="com.nq.pojo.UserRecharge">
SELECT
s.id, s.user_id, s.nick_name, s.agent_id, s.order_sn, s.pay_sn, s.pay_channel,
- s.pay_amt, s.order_status,s.order_desc,s.add_time,s.pay_time,s.pay_id,s.img ,p.channel_name,p.assets_type
+ s.pay_amt, s.order_status,s.order_desc,s.add_time,s.pay_time,s.pay_id,s.img
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
@@ -228,20 +227,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