|
@@ -17,60 +17,66 @@
|
|
|
|
|
|
<!-- 列表查询共用字段-->
|
|
<!-- 列表查询共用字段-->
|
|
<sql id="pageColumn">
|
|
<sql id="pageColumn">
|
|
- id,
|
|
|
|
- username,
|
|
|
|
- nickname,
|
|
|
|
- photo,
|
|
|
|
- phone,
|
|
|
|
- company,
|
|
|
|
- role_code,
|
|
|
|
- visible
|
|
|
|
|
|
+ u.id,
|
|
|
|
+ u.username,
|
|
|
|
+ u.nickname,
|
|
|
|
+ u.photo,
|
|
|
|
+ u.phone,
|
|
|
|
+ u.company,
|
|
|
|
+ u.role_code,
|
|
|
|
+ u.use_type,
|
|
|
|
+ u.visible,
|
|
|
|
+ u.create_time,
|
|
|
|
+ t.username as createUserName
|
|
</sql>
|
|
</sql>
|
|
<!-- 列表查询共用查询条件-->
|
|
<!-- 列表查询共用查询条件-->
|
|
<sql id="pageWhere">
|
|
<sql id="pageWhere">
|
|
<if test="username != null and username != ''">
|
|
<if test="username != null and username != ''">
|
|
- and username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
|
|
|
+ and u.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
</if>
|
|
</if>
|
|
<if test="nickname != null and nickname != ''">
|
|
<if test="nickname != null and nickname != ''">
|
|
- and nickname like CONCAT('%',#{nickname,jdbcType=VARCHAR},'%')
|
|
|
|
|
|
+ and u.nickname like CONCAT('%',#{nickname,jdbcType=VARCHAR},'%')
|
|
</if>
|
|
</if>
|
|
<if test="company != null and company != ''">
|
|
<if test="company != null and company != ''">
|
|
- and company like CONCAT('%',#{company,jdbcType=VARCHAR},'%')
|
|
|
|
|
|
+ and u.company like CONCAT('%',#{company,jdbcType=VARCHAR},'%')
|
|
</if>
|
|
</if>
|
|
<if test="roleCode != null and roleCode != ''">
|
|
<if test="roleCode != null and roleCode != ''">
|
|
- and role_code = #{roleCode,jdbcType=VARCHAR}
|
|
|
|
|
|
+ and u.role_code = #{roleCode,jdbcType=VARCHAR}
|
|
</if>
|
|
</if>
|
|
<if test="visible != null and visible != ''">
|
|
<if test="visible != null and visible != ''">
|
|
- and visible = #{visible,jdbcType=VARCHAR}
|
|
|
|
|
|
+ and u.visible = #{visible,jdbcType=VARCHAR}
|
|
</if>
|
|
</if>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="getUserPageLista" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
<select id="getUserPageLista" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
SELECT
|
|
SELECT
|
|
<include refid="pageColumn"></include>
|
|
<include refid="pageColumn"></include>
|
|
- FROM system_user
|
|
|
|
- WHERE is_deleted = '0' AND role_code <> '0'
|
|
|
|
- <include refid="pageWhere"></include>
|
|
|
|
- ORDER BY modify_time DESC
|
|
|
|
|
|
+ FROM system_user u
|
|
|
|
+ JOIN system_user t ON u.create_user_id = t.id
|
|
|
|
+ WHERE u.is_deleted = '0' AND u.role_code <> '0' and u.role_code <> '3'
|
|
|
|
+ <include refid="pageWhere"></include>
|
|
|
|
+ ORDER BY u.modify_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getUserPageListb" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
<select id="getUserPageListb" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
SELECT
|
|
SELECT
|
|
<include refid="pageColumn"></include>
|
|
<include refid="pageColumn"></include>
|
|
- FROM system_user
|
|
|
|
- WHERE is_deleted = '0' AND role_code <> '0' and role_code <> '1'
|
|
|
|
|
|
+ FROM system_user u
|
|
|
|
+ JOIN system_user t ON u.create_user_id = t.id
|
|
|
|
+ WHERE u.is_deleted = '0' AND u.role_code = '2'
|
|
<include refid="pageWhere"></include>
|
|
<include refid="pageWhere"></include>
|
|
- ORDER BY modify_time DESC
|
|
|
|
|
|
+ ORDER BY u.modify_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getUserPageListc" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
<select id="getUserPageListc" parameterType="api.common.pojo.param.system.UserParam" resultType="api.common.pojo.vo.system.UserVO">
|
|
SELECT
|
|
SELECT
|
|
<include refid="pageColumn"></include>
|
|
<include refid="pageColumn"></include>
|
|
- FROM system_user
|
|
|
|
- WHERE is_deleted = '0' AND role_code = '3'
|
|
|
|
|
|
+ FROM system_user u
|
|
|
|
+ JOIN system_user t ON u.create_user_id = t.id
|
|
|
|
+ WHERE u.is_deleted = '0' AND u.role_code = '3'
|
|
<include refid="pageWhere"></include>
|
|
<include refid="pageWhere"></include>
|
|
- and create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
|
- ORDER BY modify_time DESC
|
|
|
|
|
|
+ and u.create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
|
+ ORDER BY u.modify_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
|
<select id="selectCount" resultType="java.lang.Integer">
|
|
@@ -99,6 +105,7 @@
|
|
phone,
|
|
phone,
|
|
company,
|
|
company,
|
|
role_code,
|
|
role_code,
|
|
|
|
+ use_type,
|
|
visible,
|
|
visible,
|
|
create_time,
|
|
create_time,
|
|
modify_time,
|
|
modify_time,
|
|
@@ -115,6 +122,7 @@
|
|
#{phone,jdbcType=VARCHAR},
|
|
#{phone,jdbcType=VARCHAR},
|
|
#{company,jdbcType=VARCHAR},
|
|
#{company,jdbcType=VARCHAR},
|
|
#{roleCode,jdbcType=VARCHAR},
|
|
#{roleCode,jdbcType=VARCHAR},
|
|
|
|
+ #{useType,jdbcType=VARCHAR},
|
|
#{visible,jdbcType=VARCHAR},
|
|
#{visible,jdbcType=VARCHAR},
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
#{modifyTime,jdbcType=TIMESTAMP},
|
|
#{modifyTime,jdbcType=TIMESTAMP},
|
|
@@ -128,13 +136,13 @@
|
|
update system_user set
|
|
update system_user set
|
|
username = #{username,jdbcType=VARCHAR},
|
|
username = #{username,jdbcType=VARCHAR},
|
|
nickname = #{nickname,jdbcType=VARCHAR},
|
|
nickname = #{nickname,jdbcType=VARCHAR},
|
|
- photo = #{photo,jdbcType=VARCHAR},
|
|
|
|
|
|
+ <!--photo = #{photo,jdbcType=VARCHAR},-->
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
company = #{company,jdbcType=VARCHAR},
|
|
company = #{company,jdbcType=VARCHAR},
|
|
- visible = #{visible,jdbcType=VARCHAR},
|
|
|
|
|
|
+ <!--visible = #{visible,jdbcType=VARCHAR},-->
|
|
|
|
|
|
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
@@ -146,4 +154,13 @@
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+ <update id="saveVisible" parameterType="api.common.pojo.po.system.UserPO">
|
|
|
|
+ update system_user set
|
|
|
|
+ visible = #{visible,jdbcType=VARCHAR},
|
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|