|
|
@@ -368,7 +368,12 @@ public class AccountServiceImpl implements AccountService {
|
|
|
|
|
|
Account account = findByMobile(accountAddDTO.getMobile());
|
|
|
//绑定企业
|
|
|
- bindCompany(account.getId(), companyId);
|
|
|
+ int count = accountCompanyMapper.hasUnBindData(account.getId(), companyId);
|
|
|
+ if (count > 0) {
|
|
|
+ updateBindCompanyStatus(account.getId(), companyId, "1");
|
|
|
+ }else {
|
|
|
+ bindCompany(account.getId(), companyId);
|
|
|
+ }
|
|
|
//绑定角色
|
|
|
bindRoles(account.getId(), accountAddDTO.getRoleIds());
|
|
|
//清除缓存
|