|
|
@@ -16,6 +16,7 @@ import com.inspur.customer.infrastructure.convertor.SmsbDepartmentConvertor;
|
|
|
import com.inspur.customer.infrastructure.mapper.org.SmsbDepartmentMapper;
|
|
|
import com.inspur.customer.infrastructure.object.org.SmsbDepartmentDO;
|
|
|
import com.inspur.customer.object.org.*;
|
|
|
+import com.inspur.device.client.core.manage.SmsbUsersDeviceAttentionService;
|
|
|
import com.inspur.device.client.core.relation.DeviceAllocateService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -47,6 +48,8 @@ public class SmsbDepartmentServiceImpl extends ServiceImpl<SmsbDepartmentMapper
|
|
|
private SmsbDepartmentUserService userService;
|
|
|
@DubboReference
|
|
|
private DeviceAllocateService deviceAllocateService;
|
|
|
+ @DubboReference
|
|
|
+ private SmsbUsersDeviceAttentionService attentionService;
|
|
|
|
|
|
@Override
|
|
|
public Response addDepartment(String userId , SmsbDepartmentAdd smsbDepartmentAdd) {
|
|
|
@@ -290,8 +293,10 @@ public class SmsbDepartmentServiceImpl extends ServiceImpl<SmsbDepartmentMapper
|
|
|
path = smsbRegrouping.getTenant();
|
|
|
result = departmentUserService.updateRelation(smsbRegrouping.getUserId(), null ,null);
|
|
|
}
|
|
|
- // 2、更新attribute
|
|
|
- if(result){
|
|
|
+ // 2、关注设备权限判断
|
|
|
+ Response attentionResul = attentionService.userRegroupHandle(smsbRegrouping.getUserId(), path);
|
|
|
+ // 3、更新attribute
|
|
|
+ if(result && attentionResul.isSuccess()){
|
|
|
service.addAttributesByUserId(smsbRegrouping.getUserId() , "org" ,
|
|
|
Collections.singletonList(path));
|
|
|
return Response.buildSuccess();
|