commit for pull

This commit is contained in:
caixiang 2023-03-01 12:05:06 +08:00
bovenliggende 31bc287207
commit 14745366be
9 gewijzigde bestanden met toevoegingen van 28 en 20 verwijderingen

Bestand weergeven

@ -6,8 +6,9 @@
<select id="getList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
<where>
t1.valid = 1
<if test="deptIdList != null">
t1.id in
and t1.id in
<foreach item="id" collection="deptIdList" open="(" separator="," close=")">
#{id}
</foreach>
@ -18,15 +19,15 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1
where t1.id = #{value}
where t1.id = #{value} AND t1.valid = 1
</select>
<select id="getIdAndPidList" resultType="com.cnbm.admin.entity.SysDeptEntity">
select t1.id, t1.pid from sys_dept t1
select t1.id, t1.pid from sys_dept t1 AND t1.valid = 1
</select>
<select id="getSubDeptIdList" resultType="long">
select id from sys_dept where pids like #{id}
select id from sys_dept where pids like #{id} AND valid = 1
</select>
</mapper>

Bestand weergeven

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysDictDataDao">
<select id="getDictDataList" resultType="com.cnbm.admin.entity.DictData">
select dict_type_id, dict_label, dict_value from sys_dict_data order by dict_type_id, sort
select dict_type_id, dict_label, dict_value from sys_dict_data WHERE valid = 1 order by dict_type_id, sort
</select>
</mapper>

Bestand weergeven

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysDictTypeDao">
<select id="getDictTypeList" resultType="com.cnbm.admin.entity.DictType">
select id, dict_type from sys_dict_type order by dict_type, sort
select id, dict_type from sys_dict_type WHERE valid = 1 order by dict_type, sort
</select>
</mapper>

Bestand weergeven

@ -5,7 +5,7 @@
<select id="getById" resultType="com.cnbm.admin.entity.SysMenuEntity">
select t1.*, (select name from sys_menu t2 where t2.id=t1.pid) as parentName from sys_menu t1
where t1.id = #{id} AND t1.valid = 1
where t1.id = #{id} AND t1.valid = 1
</select>
<select id="getMenuList" resultType="com.cnbm.admin.entity.SysMenuEntity">
@ -32,7 +32,7 @@
<select id="getUserPermissionsList" resultType="string">
select t3.permissions from sys_role_user t1 left join sys_role_menu t2 on t1.role_id = t2.role_id
left join sys_menu t3 on t2.menu_id = t3.id
left join sys_menu t3 on t2.menu_id = t3.id
where t1.user_id = #{userId} AND t1.valid = 1 order by t3.sort asc
</select>
@ -43,5 +43,5 @@
<select id="getListPid" resultType="com.cnbm.admin.entity.SysMenuEntity">
select * from sys_menu where pid = #{value} AND valid = 1
</select>
</mapper>

Bestand weergeven

@ -5,7 +5,7 @@
<!-- 根据参数编码查询value -->
<select id="getValueByCode" resultType="String">
select param_value from sys_params where param_code = #{value}
select param_value from sys_params where param_code = #{value} AND valid = 1
</select>
<!-- 获取参数编码列表 -->
@ -14,10 +14,11 @@
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
AND valid = 1
</select>
<!-- 根据参数编码更新value -->
<update id="updateValueByCode">
update sys_params set param_value = #{paramValue} where param_code = #{paramCode}
update sys_params set param_value = #{paramValue} where param_code = #{paramCode} AND valid = 1
</update>
</mapper>

Bestand weergeven

@ -4,12 +4,13 @@
<mapper namespace="com.cnbm.admin.dao.SysRoleDataScopeDao">
<select id="getDeptIdList" resultType="long">
select dept_id from sys_role_data_scope where role_id = #{value}
select dept_id from sys_role_data_scope where role_id = #{value} AND valid = 1
</select>
<select id="getDataScopeList" resultType="long">
select t2.dept_id from sys_role_user t1, sys_role_data_scope t2
where t1.user_id = #{value} and t1.role_id = t2.role_id
AND t1.valid = 1
</select>
<delete id="deleteByRoleIds">
@ -17,6 +18,7 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
</mapper>

Bestand weergeven

@ -4,7 +4,7 @@
<mapper namespace="com.cnbm.admin.dao.SysRoleMenuDao">
<select id="getMenuIdList" resultType="long">
select menu_id from sys_role_menu where role_id = #{value}
select menu_id from sys_role_menu where role_id = #{value} AND valid = 1
</select>
<delete id="deleteByRoleIds">
@ -12,9 +12,10 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
<delete id="deleteByMenuId">
delete from sys_role_menu where menu_id = #{value}
delete from sys_role_menu where menu_id = #{value} AND valid = 1
</delete>
</mapper>

Bestand weergeven

@ -8,6 +8,7 @@
<foreach item="roleId" collection="array" open="(" separator="," close=")">
#{roleId}
</foreach>
AND valid = 1
</delete>
<delete id="deleteByUserIds">
@ -15,10 +16,11 @@
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
AND valid = 1
</delete>
<select id="getRoleIdList" resultType="long">
select role_id from sys_role_user where user_id = #{value}
select role_id from sys_role_user where user_id = #{value} AND valid = 1
</select>
</mapper>

Bestand weergeven

@ -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>