From 0645153dfa233b51a749db73f9bd5a8c5127c595 Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: 星期一, 24 七月 2023 09:27:53 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/hazardInvestigationSystem.git

---
 src/main/java/com/gk/hotwork/Mapper/mybatis/UserInfoMapper.xml |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 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..612b83c 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>
@@ -244,7 +252,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>
@@ -314,7 +322,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 +368,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 +561,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