|
|
@@ -6,8 +6,6 @@
|
|
|
<resultMap id="UserMap" type="com.jpsoft.employment.modules.sys.entity.User">
|
|
|
<id property="id" column="id_"/>
|
|
|
<result property="userName" column="user_name"/>
|
|
|
- <result property="companyId" column="company_id" />
|
|
|
- <result property="companyName" column="company_name" />
|
|
|
<result property="password" column="password_"/>
|
|
|
<result property="realName" column="real_name"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
@@ -25,12 +23,11 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into sys_user
|
|
|
- (id_,company_id,user_name,password_,real_name,create_time,update_time,
|
|
|
+ (id_,user_name,password_,real_name,create_time,update_time,
|
|
|
del_flag,create_by,update_by,open_id)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
- ,#{companyId,jdbcType=VARCHAR}
|
|
|
,#{userName,jdbcType=VARCHAR}
|
|
|
,#{password,jdbcType=VARCHAR}
|
|
|
,#{realName,jdbcType=VARCHAR}
|
|
|
@@ -52,9 +49,6 @@
|
|
|
<if test="userName!=null">
|
|
|
user_name=#{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyId!=null">
|
|
|
- company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
<if test="password!=null">
|
|
|
password_=#{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -91,29 +85,13 @@
|
|
|
<select id="list" resultMap="UserMap">
|
|
|
select * from sys_user
|
|
|
</select>
|
|
|
- <select id="findByCompanyId" parameterType="string" resultMap="UserMap">
|
|
|
- select * from sys_user where company_id = #{0} and del_flag = 0
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findByCompanyList" resultMap="UserMap">
|
|
|
- select * from sys_user
|
|
|
- <where>
|
|
|
- del_flag = 0
|
|
|
- <if test="searchParams.companyList!=null">
|
|
|
- <foreach collection="searchParams.companyList" index="index" item="item" open="and company_id in("
|
|
|
- separator="," close=")">
|
|
|
- #{item.id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
<select id="findByUserName" parameterType="string" resultMap="UserMap">
|
|
|
select * from sys_user where user_name=#{userName} and del_flag=0 limit 1
|
|
|
</select>
|
|
|
<select id="search" parameterType="hashmap" resultMap="UserMap">
|
|
|
<![CDATA[
|
|
|
- select a.*,b.company_name as company_name
|
|
|
- from sys_user a LEFT JOIN base_company_info b ON a.company_id = b.id_
|
|
|
+ select a.*
|
|
|
+ from sys_user a
|
|
|
where a.del_flag = 0
|
|
|
]]>
|
|
|
<if test="searchParams.userName != null">
|
|
|
@@ -122,9 +100,6 @@
|
|
|
<if test="searchParams.realName != null">
|
|
|
and a.real_name like #{searchParams.realName}
|
|
|
</if>
|
|
|
- <if test="searchParams.companyId != null">
|
|
|
- and a.company_id = #{searchParams.companyId}
|
|
|
- </if>
|
|
|
<if test="searchParams.roleId != null">
|
|
|
and a.id_ in (select c.user_id from sys_user_role c where c.role_id = #{searchParams.roleId})
|
|
|
</if>
|