From 5d2cfd4562f74496a5263db3451c1e78ff53aead Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期四, 27 三月 2025 08:44:16 +0800 Subject: [PATCH] 单据增加查询返回字段 --- assess-system/src/main/resources/mapper/SysUserMapper.xml | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/assess-system/src/main/resources/mapper/SysUserMapper.xml b/assess-system/src/main/resources/mapper/SysUserMapper.xml index 5ebd431..fdc1b7a 100644 --- a/assess-system/src/main/resources/mapper/SysUserMapper.xml +++ b/assess-system/src/main/resources/mapper/SysUserMapper.xml @@ -46,13 +46,15 @@ <id property="id" column="agency_id" /> <result property="name" column="agency_name" /> <result property="creditCode" column="credit_code" /> + <result property="attribute" column="attribute" /> + <result property="businessType" column="business_type" /> </resultMap> <sql id="selectUserVo"> select u.id,u.username, u.name,u.identity,u.user_type,u.phone,u.sex,u.status, u.del_flag,u.manage_region,u.expert_type,u.agency_id,u.post,u.job_title, u.major,u.state,u.create_time,u.remark,u.level,u.id_photo,u.certificate_no, - a.id as agency_id,a.name as agency_name,a.credit_code + a.id as agency_id,a.name as agency_name,a.credit_code,a.attribute,a.business_type from sys_user u left join sys_agency a on u.agency_id=a.id </sql> @@ -90,8 +92,20 @@ <if test="status != null"> AND u.status = #{status} </if> + <if test="state != null"> + AND u.state = #{state} + </if> + <if test="attribute != null"> + AND a.attribute = #{attribute} + </if> <if test="phone != null and phone != ''"> AND u.phone like concat('%', #{phone}, '%') + </if> + <if test="agencyName != null and agencyName != ''"> + AND a.name like concat('%', #{agencyName}, '%') + </if> + <if test="businessType != null and businessType != 0"> + AND a.business_type like concat('%', #{businessType}, '%') </if> </where> order by u.create_time desc @@ -128,6 +142,9 @@ <if test="post != null and post != ''"> AND u.post =#{post} </if> + <if test="agencyName != null and agencyName != ''"> + AND a.name like concat('%', #{agencyName}, '%') + </if> </where> order by u.create_time desc @@ -155,7 +172,7 @@ </select> <select id="checkPhoneUnique" resultType="com.gkhy.assess.system.domain.SysUser"> - select id,phone from sys_user where phone=#{phone} and del_flag=0 limit 1 + select id,phone from sys_user where phone=#{phone} and identity=#{identity} and del_flag=0 limit 1 </select> <select id="checkEmailUnique" resultType="com.gkhy.assess.system.domain.SysUser"> @@ -163,8 +180,8 @@ </select> <select id="getUserByUsernamePhone" resultType="com.gkhy.assess.system.domain.SysUser"> - select id,username,name,password,salt,identity,state,status,del_flag,agency_id from sys_user - where (username=#{username} or phone=#{username}) and del_flag=0 + select id,username,name,password,salt,identity,id_photo,state,status,del_flag,agency_id from sys_user + where (username=#{username} or phone=#{username}) and del_flag=0 and identity=#{identity} </select> -- Gitblit v1.9.2