liujie
2023-10-26 e030255c23c7ba3e2cbad1036a810d6d72fa864f
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/UserMgrController.java
@@ -205,8 +205,13 @@
        // 判断账号是否重复
        //Check if the account is duplicated
        User theUser = userService.getByAccount(user.getAccount());
        if (theUser != null) {
        User theUser = new User();
        if (user.getAccount()!=""){
         theUser = userService.getByAccount(user.getAccount());
        }
        System.out.println("=====theUser======="+theUser);
        if (theUser != null&&user.getAccount()!="") {
            throw new GunsException(BizExceptionEnum.USER_ALREADY_REG);
        }
@@ -217,6 +222,8 @@
        user.setCreatetime(new Date());
        User objectUser = UserFactory.createUser(user);
        objectUser.setObjectType(UserExt.getUser().getObjectType());
        objectUser.setObjectId(UserExt.getUser().getObjectId());
        //查找平台所属公司
        //Search for the company that owns the platform.
        this.userService.save(objectUser);