|
@@ -375,6 +375,15 @@ public class AuthServiceImpl implements AuthService {
|
|
|
String[] relaIdArr = auth.getRelationId().split(",");
|
|
|
for(int i=0;i<relaIdArr.length;i++){
|
|
|
Integer id = Integer.valueOf(relaIdArr[i]);
|
|
|
+ //先获取该机构是否与其他机构关联,有则合并
|
|
|
+ CmBrandAuthPo relationInfo = authMapper.getRelationInfo(id);
|
|
|
+ if(StringUtils.isNotEmpty(relationInfo.getRelationId())&&StringUtils.isNotEmpty(relationInfo.getRelationName())){
|
|
|
+ //避免保存一样的数据
|
|
|
+ if(!relationInfo.getRelationId().contains(relaId)&&!relationInfo.getRelationName().contains(relaName)){
|
|
|
+ relaId=relaId+","+relationInfo.getRelationId();
|
|
|
+ relaName=relaName+","+relationInfo.getRelationName();
|
|
|
+ }
|
|
|
+ }
|
|
|
authMapper.updateRelaByAuthId(id,relaId,relaName);
|
|
|
}
|
|
|
}
|