From 16b704d18a875d1fb63827aaa507790ba2bef5be Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期二, 23 四月 2024 11:44:13 +0800 Subject: [PATCH] JK最终代码提交 --- guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppUserMapper.xml | 126 +++++++++-------------------------------- 1 files changed, 28 insertions(+), 98 deletions(-) diff --git a/guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppUserMapper.xml b/guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppUserMapper.xml index a92adbb..81d38dd 100644 --- a/guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppUserMapper.xml +++ b/guns-management/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AppUserMapper.xml @@ -2,106 +2,36 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.stylefeng.guns.modular.system.dao.AppUserMapper"> - <select id="searchIntermediaryList" - resultType="com.stylefeng.guns.modular.system.warpper.res.SearchIntermediaryListRes"> - select t1.id,t1.profile_photo as profilePhoto,t1.nickname as nickname,t1.company_name as companyName, - t1.company_address as companyAddress,t1.introduce as introduce,t1.phone as phone, - COUNT(t2.id) AS houseCount - from t_app_user t1 - left join t_house_resource t2 on t1.id = t2.insert_user_id - <where> - <if test="null != req.name and '' != req.name"> - and t1.nickname = CONCAT('%', #{req.name}, '%') - </if> - <if test="null != cityIds"> - and t1.city_id in - <foreach collection="cityIds" item="item" index="index" separator="," open="(" close=")"> - #{item} - </foreach> - </if> - <if test="null != districtIds"> - and t1.district_id in - <foreach collection="districtIds" item="item" index="index" separator="," open="(" close=")"> - #{item} - </foreach> - </if> - and t1.audit_status = 2 - and t1.status = 1 - and t1.user_type = 3 - and t2.auth_status = 2 - and t2.is_delete = 0 - and t2.status = 1 - and t2.type=2 - </where> - group by t1.id - order by houseCount desc + <!-- 通用查询映射结果 --> + <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.AppUser"> + <id column="id" property="id" /> + </resultMap> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + id, code, name, phone, password, openId, appleId, birthday, gender, height, weight, unit, headImg, balance, constellation, clockIn, inviteUserId, address + </sql> + <select id="inviteUserList" resultType="com.stylefeng.guns.modular.system.vo.InviteUserVO"> + select t1.* from t_user t1 + where t1.inviteUserId = #{req.id} AND t1.state != 3 </select> - <select id="listHost" resultType="com.stylefeng.guns.modular.system.dto.Host"> - SELECT id,insert_time as insertTime,nickname,profile_photo as profilePhoto,user_type as userType,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status - from t_app_user - <where> - status != 3 - <if test="null != nickname and '' != nickname"> - and nickname like CONCAT('%', #{nickname}, '%') - </if> - <if test="null != userType"> - and user_type = #{userType} - </if> - <if test="null != status"> - and status = #{status} - </if> - <if test="null != phone and '' != phone"> - and phone like CONCAT('%', #{phone}, '%') - </if> - </where> - ORDER BY insert_time desc - + <select id="teamList" resultType="com.stylefeng.guns.modular.system.vo.TeamDetailVO"> + select t1.* from t_user </select> - <select id="listMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> - SELECT id,insert_time as insertTime,nickname,company_name as companyName,agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status - from t_app_user - <where> - status != 3 and auth = 2 - <if test="null != nickname and '' != nickname"> - and nickname like CONCAT('%', #{nickname}, '%') - </if> - <if test="null != userType"> - and user_type = #{userType} - </if> - <if test="null != status"> - and status = #{status} - </if> - <if test="null != phone and '' != phone"> - and phone like CONCAT('%', #{phone}, '%') - </if> - </where> - - - </select> - - <select id="listAuMedium" resultType="com.stylefeng.guns.modular.system.dto.Medium"> - SELECT id,insert_time as insertTime,nickname,company_name as companyName, - agent_licence_code as agentLicenceCode,ifnull(wechat_qr_code1,wechat_qr_code) as wechatQrCode,ifnull(watch_app1,watch_app) as watchApp,phone as phone,status,auth as auditStatus,audit_note as auditNote - ,refuse_date as refuseDate - from t_app_user - <where> - status != 3 and auth != 0 - <if test="null != nickname and '' != nickname"> - and nickname like CONCAT('%', #{nickname}, '%') - </if> - <if test="null != userType"> - and user_type = #{userType} - </if> - <if test="null != status"> - and auth = #{status} - </if> - <if test="null != phone and '' != phone"> - and phone like CONCAT('%', #{phone}, '%') - </if> - </where> - - + <select id="selectList1" resultType="com.stylefeng.guns.modular.system.model.AppUser"> + select * + from t_user + where 1=1 + <if test="name !=null and name!=''"> + AND name LIKE concat('%',#{name},'%') + </if> + <if test="phone !=null and phone!=''"> + AND phone LIKE concat('%',#{phone},'%') + </if> + and state!=3 + and !ISNULL(phone) + order by insertTime desc </select> -</mapper> \ No newline at end of file +</mapper> -- Gitblit v1.7.1