commit for pull

This commit is contained in:
caixiang
2023-03-01 12:05:06 +08:00
parent 31bc287207
commit 14745366be
9 changed files with 28 additions and 20 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
where t1.super_admin = 0 AND t1.valid = 1
<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}
where t1.id = #{value} AND t1.valid = 1
</select>
<select id="getByUsername" resultType="com.cnbm.admin.entity.SysUserEntity">
select * from sys_user where username = #{value}
select * from sys_user where username = #{value} AND valid = 1
</select>
<update id="updatePassword">
update sys_user set password = #{newPassword} where id = #{id}
update sys_user set password = #{newPassword} where id = #{id} AND valid = 1
</update>
<select id="getCountByDeptId" resultType="int">
select count(*) from sys_user where dept_id = #{value}
select count(*) from sys_user where dept_id = #{value} AND valid = 1
</select>
<select id="getUserIdListByDeptId" resultType="Long">
@@ -45,6 +45,7 @@
<foreach item="deptId" collection="list" open="(" separator="," close=")">
#{deptId}
</foreach>
AND valid = 1
</select>
</mapper>