From 145d0064af5ceca7a2f0d244aa8d50a8f594f3d7 Mon Sep 17 00:00:00 2001
From: zf <1603559716@qq.com>
Date: Fri, 04 Aug 2023 09:42:05 +0800
Subject: [PATCH] bug修改
---
src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml | 41 ++++++++++++++++++++++++++++++++++-------
1 files changed, 34 insertions(+), 7 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 75ec0fb..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" />
@@ -65,6 +66,13 @@
<result column="crossy" property="crossY" jdbcType="DECIMAL" />
<result column="issecurityofficer" property="issecurityofficer" jdbcType="TINYINT" />
<result column="updateat" property="updateat" jdbcType="TIMESTAMP" />
+ <result column="executive_level" property="executiveLevel" jdbcType="INTEGER" />
+ <result column="province" property="province" jdbcType="VARCHAR" />
+ <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" />
@@ -187,7 +195,7 @@
left join userroles as r on r.userid = `user`.id
<where>
`user`.status = 1
- and user.type != 1
+ and user.type = 3
<if test="record.username != null and record.username !=''">
and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
</if>
@@ -202,6 +210,9 @@
</if>
<if test="record.roleId != null">
and r.roleid = #{record.roleId}
+ </if>
+ <if test="record.companyid != null">
+ and c.id = #{record.companyid}
</if>
</where>
</select>
@@ -244,7 +255,7 @@
left join userroles as r on r.userid = `user`.id
<where>
`user`.status = 1
- and user.type != 1
+ and user.type = 2
<if test="record.username != null and record.username !=''">
and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
</if>
@@ -252,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},'%')
@@ -314,7 +325,7 @@
left join speciality as s on s.id = `user`.speciality_id
<where>
`user`.status = 1
- and user.type != 1
+ and user.type = 4
<if test="record.username != null and record.username !=''">
and user.username like concat ('%',#{record.username,jdbcType=VARCHAR},'%')
</if>
@@ -360,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
@@ -551,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