Explorar el Código

Merge branch 'master' of http://124.70.58.209:3000/ytrd-project-management/BaseMonitor

hexiao hace 2 años
padre
commit
38c3d12488

+ 1 - 0
base-system/src/main/java/com/ozs/system/service/DataScoreUtil.java

@@ -50,6 +50,7 @@ public class DataScoreUtil {
             deptIds = sysDepts.stream().map(SysDept::getDeptId).collect(Collectors.toList());
         }
         // 数据权限 1:本人;2:本部门;3:本部门及下级部门;4:本人及本级部门;5:本人及本部门及下级部门;6:全部
+        ds.setDsFlay(false);
         switch (user.getDataPermission().intValue()) {
             case 6:
                 ds.setDsFlay(true);

+ 5 - 5
base-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		where r.del_flag = '0'
+		where r.del_flag = '1'
 		<if test="roleId != null and roleId != 0">
 			AND r.role_id = #{roleId}
 		</if>
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		WHERE r.del_flag = '0' and ur.user_id = #{userId}
+		WHERE r.del_flag = '1' and ur.user_id = #{userId}
 	</select>
 
 	<select id="selectRoleAll" resultMap="SysRoleResult">
@@ -80,17 +80,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		WHERE r.del_flag = '0' and u.user_name = #{userName}
+		WHERE r.del_flag = '1' and u.user_name = #{userName}
 	</select>
 
 	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
+		 where r.role_name=#{roleName} and r.del_flag = '1' limit 1
 	</select>
 
 	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
+		 where r.role_key=#{roleKey} and r.del_flag = '1' limit 1
 	</select>
 	<select id="getRoleId" resultType="java.lang.Long">
 		select role_id from sys_role where role_name = #{roleName}

+ 8 - 8
base-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
 		select u.id,u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phone_num, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,u.update_by,u.update_time, u.remark, d.dept_name, d.leader from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
-		where u.del_flag = '0'
+		where u.del_flag = '1'
 		<if test="id != null and id != 0">
 			AND u.id = #{id}
 		</if>
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.id = ur.user_id
 			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and r.role_id = #{roleId}
+	    where u.del_flag = '1' and r.role_id = #{roleId}
 	    <if test="userName != null and userName != ''">
 			AND u.user_name like concat('%', #{userName}, '%')
 		</if>
@@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.id = ur.user_id
 			 left join sys_role r on r.role_id = ur.role_id
-	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
+	    where u.del_flag = '1' and (r.role_id != #{roleId} or r.role_id IS NULL)
 	    and u.id not in (select u.id from sys_user u inner join sys_user_role ur on u.id = ur.user_id and ur.role_id = #{roleId})
 	    <if test="userName != null and userName != ''">
 			AND u.user_name like concat('%', #{userName}, '%')
@@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
 	    <include refid="selectUserVo"/>
-		where u.user_name = #{userName} and u.del_flag = '0'
+		where u.user_name = #{userName} and u.del_flag = '1'
 	</select>
 
 	<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
@@ -138,15 +138,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 
 	<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
-		select id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
+		select id, user_name from sys_user where user_name = #{userName} and del_flag = '1' limit 1
 	</select>
 
 	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select id, phone_num from sys_user where phone_num = #{phoneNum} and del_flag = '0' limit 1
+		select id, phone_num from sys_user where phone_num = #{phoneNum} and del_flag = '1' limit 1
 	</select>
 
 	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select id, email from sys_user where email = #{email} and del_flag = '0' limit 1
+		select id, email from sys_user where email = #{email} and del_flag = '1' limit 1
 	</select>
 
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="id">
@@ -267,7 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<select id="selectUserByUserId" parameterType="string" resultType="SysUser">
 		select *
-		from system_user
+		from sys_user
 		where user_id = #{userId}
 		  AND del_flag = 1
 		  AND status = 1