From 9ca0dc6e7833715b875cc9b6b91d5c497b2bae8b Mon Sep 17 00:00:00 2001 From: zf <1603559716@qq.com> Date: 星期三, 30 八月 2023 09:05:45 +0800 Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/hazardInvestigationSystem into zf --- src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml index c456458..a7f2e16 100644 --- a/src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml +++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml @@ -39,6 +39,7 @@ <result column="password" property="password" jdbcType="VARCHAR" /> <result column="email" property="email" jdbcType="VARCHAR" /> <result column="company" property="company" jdbcType="VARCHAR" /> + <result column="companyid" property="companyid" jdbcType="BIGINT" /> <result column="department" property="department" jdbcType="VARCHAR" /> <result column="job" property="job" jdbcType="VARCHAR" /> <result column="createdby" property="createdby" jdbcType="VARCHAR" /> @@ -70,6 +71,8 @@ <result column="city" property="city" jdbcType="VARCHAR" /> <result column="county" property="county" jdbcType="VARCHAR" /> <result column="professional_level" property="professionalLevel" jdbcType="INTEGER" /> + <result column="speciality_id" property="specialityId" jdbcType="BIGINT" /> + <result column="speciality_name" property="specialityName" jdbcType="VARCHAR" /> <association property="companyInfo" javaType="com.gk.hotwork.Domain.CompanyInfo"> <result column="company_id" property="id" /> <result column="company" property="company" /> @@ -208,6 +211,9 @@ <if test="record.roleId != null"> and r.roleid = #{record.roleId} </if> + <if test="record.companyid != null"> + and c.id = #{record.companyid} + </if> </where> </select> <select id="selectSuperviseUserDataList" resultMap="UserVo"> @@ -257,7 +263,7 @@ and user.realname like concat ('%',#{record.realname,jdbcType=VARCHAR},'%') </if> <if test="record.company != null and record.company !=''"> - and user.company like concat ('%',#{record.company,jdbcType=VARCHAR},'%') + and user.company like concat ('%',#{record.company},'%') </if> <if test="record.job != null and record.job !=''"> and user.job like concat ('%',#{record.job,jdbcType=VARCHAR},'%') @@ -365,10 +371,12 @@ select `user`.*, c.ismain AS isMainCompany, - d.department departmentname + d.department departmentname, + s.name as speciality_name from `user` as user LEFT JOIN company as c ON c.id = `user`.companyid left join department as d on d.id = user.department and d.isdel = 0 + left join speciality as s on s.id = `user`.speciality_id where `user`.username = #{username,jdbcType=VARCHAR} and `user`.status = 1 @@ -556,12 +564,26 @@ left join userroles r on r.userid = u.id where u.status = 1 - and u.type != 1 - and r.roleid = 36 + and u.type = 4 <if test="realname != null and realname != ''"> u.realname like concat("%",#{realname},"%") </if> </select> + <select id="selectUserVoById" resultType="com.gk.hotwork.Domain.Vo.UserVo"> + select + `user`.*, + c.ismain AS isMainCompany, + d.department departmentname, + s.name as speciality_name + from `user` as user + LEFT JOIN company as c ON c.id = `user`.companyid + left join department as d on d.id = user.department and d.isdel = 0 + left join speciality as s on s.id = `user`.speciality_id + where + `user`.id = #{userId} + and `user`.status = 1 + </select> + </mapper> -- Gitblit v1.9.2