郑永安
2023-07-24 0645153dfa233b51a749db73f9bd5a8c5127c595
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"  />
@@ -365,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
@@ -556,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>