diff --git a/jeecg-module-sync/src/main/java/org/jeecg/dataSource/controller/StasDataSourceController.java b/jeecg-module-sync/src/main/java/org/jeecg/dataSource/controller/StasDataSourceController.java index 1f48d7c..2a60d14 100644 --- a/jeecg-module-sync/src/main/java/org/jeecg/dataSource/controller/StasDataSourceController.java +++ b/jeecg-module-sync/src/main/java/org/jeecg/dataSource/controller/StasDataSourceController.java @@ -19,7 +19,9 @@ import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.base.entity.StasDataSource; import org.jeecg.dataSource.service.IStasDataSourceService; import org.jeecg.modules.base.entity.StasSyncStrategy; +import org.jeecg.modules.base.entity.StasTaskConfig; import org.jeecg.modules.base.service.BaseCommonService; +import org.jeecg.taskConfig.service.IStasTaskConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.*; @@ -40,6 +42,8 @@ public class StasDataSourceController extends JeecgController queryTargetUserList(@RequestParam(name="sourceId",required=false) String sourceId) { + public Result queryUserList(@RequestParam(name="sourceId",required=false) String sourceId) { List tableNameList= stasDataSourceService.queryUserList(sourceId); if (tableNameList != null && !"".equals(tableNameList)){ return Result.OK(tableNameList); @@ -85,6 +89,24 @@ public class StasDataSourceController extends JeecgController queryTargetUserList(@RequestParam(name="taskId",required=false) String taskId) { + StasTaskConfig taskConfig = stasTaskConfigService.getById(taskId); + List tableNameList= stasDataSourceService.queryUserList(taskConfig.getSourceId()); + if (tableNameList != null && !"".equals(tableNameList)){ + return Result.OK(tableNameList); + } + return Result.error("获取源端用户为空"); + } + /** * 查询数据源表 *