Explorar el Código

去掉原系统的数据权限过滤

gao.qiang hace 2 años
padre
commit
7030c74295

+ 1 - 3
base-common/src/main/java/com/ozs/common/core/domain/entity/SysUser.java

@@ -260,9 +260,7 @@ public class SysUser extends BaseEntity {
     public void setAvatar(String avatar) {
         this.avatar = avatar;
     }
-
-    @NotBlank(message = "用户密码不能为空")
-    @Size(min = 8, max = 20, message = "密码长度只能为8-20位")
+    
     public String getPassword() {
         return password;
     }

+ 7 - 6
base-system/src/main/java/com/ozs/system/service/impl/SysUserServiceImpl.java

@@ -501,10 +501,10 @@ public class SysUserServiceImpl extends JoinServiceImpl<SysUserMapper, SysUser>
     @Override
     @Transactional
     public int deleteUserByIds(Long[] userIds) {
-        for (Long userId : userIds) {
-            checkUserAllowed(new SysUser(userId));
-            checkUserDataScope(userId);
-        }
+//        for (Long userId : userIds) {
+//          checkUserAllowed(new SysUser(userId));
+//            checkUserDataScope(userId);
+//        }
         // 删除用户与角色关联
         userRoleMapper.deleteUserRole(userIds);
         return userMapper.deleteUserByIds(userIds);
@@ -563,8 +563,8 @@ public class SysUserServiceImpl extends JoinServiceImpl<SysUserMapper, SysUser>
                     successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功");
                 } else if (isUpdateSupport) {
                     BeanValidators.validateWithException(validator, user);
-                    checkUserAllowed(sysUser);
-                    checkUserDataScope(sysUser.getId());
+//                    checkUserAllowed(sysUser);
+//                    checkUserDataScope(sysUser.getId());
                     sysUser.setUpdateBy(operName);
                     SysDept sysDept = deptMapper.selectDeptByDeptName(user.getDeptName());
                     sysUser.setDeptId(sysDept.getDeptId());
@@ -595,6 +595,7 @@ public class SysUserServiceImpl extends JoinServiceImpl<SysUserMapper, SysUser>
     public int saveUser(SysUser user) {
         // 新增用户信息
         user.setUserId(IdUtils.fastSimpleUUID());
+        user.setPassword(SecurityUtils.encryptPassword(defaultPassword));
         int rows = userMapper.insertUser(user);
         // 新增用户与角色管理
         insertUserRole(user);

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

@@ -195,7 +195,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="phoneNum != null ">phone_num = #{phoneNum},</if>
  			<if test="sex != null and sex != ''">sex = #{sex},</if>
  			<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
- 			<if test="password != null and password != ''">password = #{password},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
  			<if test="loginDate != null">login_date = #{loginDate},</if>