From d4488a987cccd3ddd51a202a9f8aa71d3cdcbced Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 23 Apr 2021 17:12:16 +0800 Subject: [PATCH] 20210423 --- src/main/resources/mapper/system/UserMapper.xml | 78 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/system/UserMapper.xml b/src/main/resources/mapper/system/UserMapper.xml index b7838c0..eac1072 100644 --- a/src/main/resources/mapper/system/UserMapper.xml +++ b/src/main/resources/mapper/system/UserMapper.xml @@ -44,6 +44,10 @@ u.modify_time modifyTime, u.description, u.avatar, + u.invite_id, + u.system, + u.type, + u.agent_name, d.dept_name deptName, GROUP_CONCAT(r.role_id) roleId, GROUP_CONCAT(r.ROLE_NAME) roleName @@ -86,7 +90,11 @@ u.last_login_time, u.modify_time, u.description, - u.avatar + u.avatar, + u.invite_id, + u.system, + u.type, + u.agent_name </sql> <select id="countUserDetail" parameterType="user" resultType="long"> @@ -116,6 +124,10 @@ u.modify_time modifyTime, u.description, u.avatar, + u.invite_id, + u.system, + u.type, + u.agent_name, u.theme, u.is_tab isTab, d.dept_name deptName, @@ -141,6 +153,10 @@ u.modify_time, u.description, u.avatar, + u.invite_id, + u.system, + u.type, + u.agent_name, u.theme, u.is_tab </select> @@ -149,4 +165,64 @@ select user_id userId, dept_id deptId from t_user_data_permission where user_id = #{userId} </select> + + <select id="selectAgentUserList" resultType="com.xcong.excoin.modules.agent.pojo.AgentUser"> + select + a.user_id id, + a.username account, + a.agent_name name, + a.invite_id, + a.create_time, + a.status, + b.return_ratio, + a.mobile telphone, + c.referer_id refererId, + c.account_status accountStatus, + c.certify_status + from t_user a + inner join agent_friend_relation b on a.user_id = b.user_id + inner join member c on b.member_id = c.id + <if test="record != null"> + <where> + <if test="record.refererId!=null and record.refererId!=''"> + find_in_set(#{record.refererId}, b.referer_ids) + </if> + <if test="record.startTime!=null and record.startTime!=''"> + and c.create_time >= #{record.startDate} + </if> + <if test="record.endTime!=null and record.endTime!=''"> + and #{record.endDate} >= c.create_time + </if> + <if test="record.account!=null and record.account!=''"> + and (c.phone = #{record.account} or c.email = #{record.account} or c.invite_id=#{record.account}) + </if> + <if test="record.accountStatus != null and record.accountStatus!='' or record.accountStatus == 0" > + and c.account_status = #{record.accountStatus} + </if> + <if test="record.accountType != null and record.accountType!=''" > + and c.account_type = #{record.accountType} + </if> + <if test="record.certifyStatus!=null and record.certifyStatus!=''and record.certifyStatus!='6' "> + and c.certify_status = #{record.certifyStatus} + </if> + </where> + </if> + </select> + + <select id="selectUserByInviteId" resultType="user"> + select * from t_user where invite_id=#{inviteId} + </select> + + <select id="selectUserInfoById" resultType="user"> + select + a.user_id, + a.agent_name, + a.username, + a.mobile, + a.invite_id, + b.return_ratio + from t_user a + left join agent_friend_relation b on a.user_id=b.user_id + where a.user_id=#{id} + </select> </mapper> -- Gitblit v1.9.1