|
|
@@ -10,6 +10,7 @@ import com.uas.sso.entity.App;
|
|
|
import com.uas.sso.entity.SyncLog;
|
|
|
import com.uas.sso.entity.User;
|
|
|
import com.uas.sso.entity.UserView;
|
|
|
+import com.uas.sso.sso.backend.service.SyncToSsoService;
|
|
|
import com.uas.sso.sso.backend.util.JacksonUtils;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
@@ -17,8 +18,6 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
|
|
-import com.uas.sso.sync.service.SyncUserService;
|
|
|
-import com.uas.sso.sync.service.SyncUserspaceService;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
@@ -44,18 +43,15 @@ public class SyncThreadPool {
|
|
|
|
|
|
private final AppDao appDao;
|
|
|
|
|
|
- private final SyncUserService syncUserService;
|
|
|
-
|
|
|
- private final SyncUserspaceService syncUserspaceService;
|
|
|
+ @Autowired
|
|
|
+ private SyncToSsoService syncToSsoService;
|
|
|
|
|
|
@Autowired
|
|
|
- public SyncThreadPool(ExecutorService executorService, SyncLogDao syncLogDao, UserDao userDao, AppDao appDao, SyncUserService syncUserService, SyncUserspaceService syncUserspaceService) {
|
|
|
+ public SyncThreadPool(ExecutorService executorService, SyncLogDao syncLogDao, UserDao userDao, AppDao appDao) {
|
|
|
this.executorService = executorService;
|
|
|
this.syncLogDao = syncLogDao;
|
|
|
this.userDao = userDao;
|
|
|
this.appDao = appDao;
|
|
|
- this.syncUserspaceService = syncUserspaceService;
|
|
|
- this.syncUserService = syncUserService;
|
|
|
}
|
|
|
|
|
|
public void transferDataToOtherPlatforms(BackInfoType type, List<App> appList, JSONObject data, String message) {
|
|
|
@@ -65,7 +61,7 @@ public class SyncThreadPool {
|
|
|
if (BackInfoType.BACK_USER_INFO.equals(type)) {
|
|
|
isBackUser = true;
|
|
|
urls = getBackUrl(appList, BACK_USER_URL);
|
|
|
- syncUserService.sendUserToSso(data.getLong("userUU"));
|
|
|
+ syncToSsoService.sendUserToSso(data.getLong("userUU"));
|
|
|
}
|
|
|
|
|
|
if (BackInfoType.BACK_RELATION_INFO.equals(type)) {
|
|
|
@@ -84,7 +80,7 @@ public class SyncThreadPool {
|
|
|
if (!CollectionUtils.isEmpty(map)) {
|
|
|
data.putAll(map);
|
|
|
}
|
|
|
- syncUserspaceService.sendUserspaceToSso(data.getLong("spaceUU"));
|
|
|
+ syncToSsoService.sendUserspaceToSso(data.getLong("spaceUU"));
|
|
|
}
|
|
|
|
|
|
final boolean flag = isBackUser;
|