Ver código fonte

fix:用户批量导入时去掉excel中姓名唯一性校验

caozixuan 3 anos atrás
pai
commit
1e32596e2e

+ 6 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1218,7 +1218,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         InputStream inputStream = (InputStream) map.get("inputStream");
         List<LinkedMultiValueMap<Integer, Object>> finalList = ExcelUtil.excelReader(inputStream, Lists.newArrayList(SysUserImportDto.class, DescribeImportDto.class), (finalExcelList, finalColumnNameList, finalExcelErrorList) -> {
             List<ExcelError> excelErrorTemp = new ArrayList<>();
-            Map<String, String> checkName = new HashMap<>();
+//            Map<String, String> checkName = new HashMap<>();
             Map<String, String> checkCode = new HashMap<>();
             Map<String, String> checkPhoneMap = new HashMap<>();
             for (int i = 0; i < finalExcelList.size(); i++) {
@@ -1237,11 +1237,11 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                     String roleName = sysUserImportDto.getRoleName();
 
                     // 检验excel中
-                    if (checkName.containsKey(name)) {
-                        throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【姓名】:" + name);
-                    } else {
-                        checkName.put(name, code);
-                    }
+//                    if (checkName.containsKey(name)) {
+//                        throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【姓名】:" + name);
+//                    } else {
+//                        checkName.put(name, code);
+//                    }
                     if (checkCode.containsKey(code)) {
                         throw ExceptionResultEnum.ERROR.exception("导入的excel中包含在重复的【工号】:" + code);
                     } else {

+ 15 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/SysUserService.java

@@ -35,6 +35,21 @@ public interface SysUserService extends IService<SysUser> {
 
     boolean resetPassword(Long id) throws NoSuchAlgorithmException;
 
+    /**
+     * 更新用户登录信息(密码、手机号)
+     * <p>
+     *     1.判断用户在系统中是否存在
+     *     2.判断用户原密码是否正确
+     *     3.更新密码 -> 新旧密码不一致判断
+     *     4.更新手机 -> 检验验证码正确新(不为空、正确、未过期)、手机号唯一性校验
+     *     5.若用户已经登陆且进行了密码或手机号修改 -> 清空用户登录信息
+     *     6.如果不是共用验证码则过期该用户验证码
+     *     7.调用用户登录公共方法(验证码参数使用系统共用验证码)登录用户
+     * </p>
+     * @param user 用户信息
+     * @return 登录信息
+     * @throws NoSuchAlgorithmException 异常
+     */
     LoginResult updatePassword(SysUser user) throws NoSuchAlgorithmException;
 
     boolean bindRoles(SysUser sysUser);