This commit is contained in:
caixiang
2023-02-27 15:49:58 +08:00
parent fed8f82ff0
commit bb8986c98d
11 changed files with 35 additions and 43 deletions

View File

@@ -5,7 +5,7 @@
<select id="getList" resultType="com.cnbm.admin.entity.SysUserEntity">
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.super_admin = 0 AND t1.valid = 1
where t1.super_admin = 0
<if test="username != null and username.trim() != ''">
and t1.username like #{username}
</if>
@@ -25,19 +25,19 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysUserEntity">
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName from sys_user t1
where t1.id = #{value} AND t1.valid = 1
where t1.id = #{value}
</select>
<select id="getByUsername" resultType="com.cnbm.admin.entity.SysUserEntity">
select * from sys_user where username = #{value} AND valid = 1
select * from sys_user where username = #{value}
</select>
<update id="updatePassword">
update sys_user set password = #{newPassword} where id = #{id} AND valid = 1
update sys_user set password = #{newPassword} where id = #{id}
</update>
<select id="getCountByDeptId" resultType="int">
select count(*) from sys_user where dept_id = #{value} AND valid = 1
select count(*) from sys_user where dept_id = #{value}
</select>
<select id="getUserIdListByDeptId" resultType="Long">
@@ -45,7 +45,6 @@
<foreach item="deptId" collection="list" open="(" separator="," close=")">
#{deptId}
</foreach>
AND valid = 1
</select>
</mapper>