ZQN
2024-06-19 e59e6a8a2fcf3ac2194a69927cd5690453a83e91
project-system/src/main/java/com/project/system/service/impl/SysCompanyServiceImpl.java
@@ -60,6 +60,7 @@
    public Boolean insertByBo(SysCompanyBo bo)
    {
        SysCompany add = Convert.convert(SysCompany.class, bo);
        add.setCompanyStatus(1);
        validEntityBeforeSave(add);
        boolean save = this.save(add);
        addCompanyUser(add, 0);
@@ -77,7 +78,7 @@
            if (!delUser) {
                throw new BaseException("原企业用户清除失败,请联系管理员!");
            }
            this.addCompanyUser(update, 0);
            this.addCompanyUser(update, update.getCompanyStatus()==0 ? 1 : 0);
        }
        validEntityBeforeSave(update);
        return this.updateById(update);
@@ -269,6 +270,7 @@
        user.setPassword(phone);
        user.setDeptId(one.getCompanyId());
        user.setUserType("02");
        user.setRecommendUser(user.getPassword());
        if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user)))
        {
            return;
@@ -285,7 +287,6 @@
        }
        user.setCreateBy(SecurityUtils.getUsername());
        user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
        user.setRecommendUser(user.getPassword());
        userService.insertUser(user);
    }