|
|
@@ -23,8 +23,6 @@ import com.zhongshu.card.server.core.domain.org.OrganizationUser;
|
|
|
import com.zhongshu.card.server.core.domain.org.UserAccount;
|
|
|
import com.zhongshu.card.server.core.event.OrgUserBindUpdateSyncEvent;
|
|
|
import com.zhongshu.card.server.core.service.base.SuperService;
|
|
|
-import com.zhongshu.card.server.core.service.projectAbout.CardInfoServiceImpl;
|
|
|
-import com.zhongshu.card.server.core.service.projectAbout.OrgUserFaceService;
|
|
|
import com.zhongshu.card.server.core.service.user.UserAccountServiceImpl;
|
|
|
import com.zhongshu.card.server.core.util.BeanUtils;
|
|
|
import com.zhongshu.card.server.core.util.CommonUtil;
|
|
|
@@ -179,13 +177,21 @@ public class DevicePermissService extends SuperService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 机构用户信息发送变化
|
|
|
+ *
|
|
|
+ * @param event
|
|
|
+ */
|
|
|
@EventListener(classes = OrgUserBindUpdateSyncEvent.class)
|
|
|
@Async
|
|
|
@SneakyThrows
|
|
|
public void syncOrgUserChangeInfo(OrgUserBindUpdateSyncEvent event) {
|
|
|
executorService.execute(() -> {
|
|
|
log.info("机构用户信息发生变化 syncOrgUserChangeInfo...");
|
|
|
+
|
|
|
+ // 机构用户改变类型
|
|
|
DataOperationType dataOperationType = event.getDataOperationType();
|
|
|
+ // 机构用户数据ID
|
|
|
List<String> organizationUserIds = event.getOrganizationUserIds();
|
|
|
if (dataOperationType != null) {
|
|
|
List<OrganizationUser> organizationUsers = organizationUserDao.findByIdIn(organizationUserIds);
|
|
|
@@ -292,8 +298,7 @@ public class DevicePermissService extends SuperService {
|
|
|
public List<String> getUserAllDeviceIds(String projectOid, List<String> userIds) {
|
|
|
List<String> deviceIds = Lists.newArrayList();
|
|
|
if (StringUtils.isNotEmpty(projectOid) && ObjectUtils.isNotEmpty(userIds)) {
|
|
|
- List<DevicePermiss> list = devicePermissDao.findByUserIdInAndProjectOidAndDataState(
|
|
|
- userIds, projectOid, DataState.Enable);
|
|
|
+ List<DevicePermiss> list = devicePermissDao.findByUserIdInAndProjectOidAndDataState(userIds, projectOid, DataState.Enable);
|
|
|
if (ObjectUtils.isNotEmpty(list)) {
|
|
|
deviceIds = list.stream().map(it -> it.getDeviceId()).collect(Collectors.toList());
|
|
|
}
|