From d98c7875c62e6551ad8aee081242aad8d5f13efe Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Mon, 27 Apr 2026 17:14:18 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/AgentUserMapper.xml | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/src/main/resources/mapper/AgentUserMapper.xml b/src/main/resources/mapper/AgentUserMapper.xml
index f6dd862..3aa981d 100644
--- a/src/main/resources/mapper/AgentUserMapper.xml
+++ b/src/main/resources/mapper/AgentUserMapper.xml
@@ -20,16 +20,18 @@
<arg column="total_money" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
<arg column="site_lever" jdbcType="VARCHAR" javaType="java.lang.String" />
<arg column="on_line_services" jdbcType="VARCHAR" javaType="java.lang.String"/>
+ <arg column="google_auth_secret" jdbcType="VARCHAR" javaType="java.lang.String"/>
+ <arg column="google_auth_bind" jdbcType="BIT" javaType="java.lang.Boolean"/>
</constructor>
</resultMap>
<sql id="Base_Column_List" >
- id, agent_name, agent_pwd, agent_real_name, agent_phone, agent_code, add_time, is_lock,
+ id, agent_name, agent_pwd, agent_real_name, agent_phone, agent_code, add_time, is_lock,
parent_id, parent_name, agent_level,poundage_scale,deferred_fees_scale,receive_dividends_scale,
- total_money,site_lever,on_line_services
+ total_money,site_lever,on_line_services,google_auth_secret,google_auth_bind
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
- <include refid="Base_Column_List" />
+ *
from agent_user
where id = #{id,jdbcType=INTEGER}
</select>
@@ -43,13 +45,13 @@
add_time, is_lock, parent_id,
parent_name, agent_level,poundage_scale,
deferred_fees_scale,receive_dividends_scale,total_money,
- site_lever,on_line_services)
+ site_lever,on_line_services,google_auth_secret,google_auth_bind)
values (#{agentName,jdbcType=VARCHAR}, #{agentPwd,jdbcType=VARCHAR},
#{agentRealName,jdbcType=VARCHAR}, #{agentPhone,jdbcType=VARCHAR}, #{agentCode,jdbcType=VARCHAR},
#{addTime,jdbcType=TIMESTAMP}, #{isLock,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
#{parentName,jdbcType=VARCHAR}, #{agentLevel,jdbcType=INTEGER}
, #{poundageScale,jdbcType=DECIMAL}, #{deferredFeesScale,jdbcType=DECIMAL}, #{receiveDividendsScale,jdbcType=DECIMAL}
- , #{totalMoney,jdbcType=DECIMAL},#{siteLever,jdbcType=VARCHAR},#{onLineServices,jdbcType=VARCHAR}
+ , #{totalMoney,jdbcType=DECIMAL},#{siteLever,jdbcType=VARCHAR},#{onLineServices,jdbcType=VARCHAR},#{googleAuthSecret,jdbcType=VARCHAR},#{googleAuthBind,jdbcType=BIT}
)
</insert>
@@ -170,6 +172,12 @@
<if test="onLineServices != null" >
on_line_services = #{onLineServices,jdbcType=VARCHAR},
</if>
+ <if test="googleAuthSecret != null" >
+ google_auth_secret = #{googleAuthSecret,jdbcType=VARCHAR},
+ </if>
+ <if test="googleAuthBind != null" >
+ google_auth_bind = #{googleAuthBind,jdbcType=BIT},
+ </if>
</set>
where id = #{id,jdbcType=INTEGER}
@@ -185,7 +193,9 @@
is_lock = #{isLock,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
parent_name = #{parentName,jdbcType=VARCHAR},
- site_lever = #{siteLever,jdbcType=VARCHAR}
+ site_lever = #{siteLever,jdbcType=VARCHAR},
+ google_auth_secret = #{googleAuthSecret,jdbcType=VARCHAR},
+ google_auth_bind = #{googleAuthBind,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
@@ -202,6 +212,21 @@
WHERE agent_code = #{agentCode} and id != #{id}
</select>
+ <select id="findByParentId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+ SELECT
+ <include refid="Base_Column_List"/>
+ FROM agent_user
+ WHERE parent_id = #{parentId}
+ </select>
+
+ <select id="getParensAgent" resultMap="BaseResultMap">
+ SELECT
+ <include refid="Base_Column_List"/>
+ FROM agent_user
+ WHERE agent_level = 0 or agent_level = 1
+ ORDER BY id asc
+ </select>
+
<select id="findByPhone" resultMap="BaseResultMap" parameterType="string">
SELECT
--
Gitblit v1.9.3