|
@@ -44,11 +44,9 @@ public class DataSyncTask extends AbstractTask {
|
|
|
public void run(ScheduleJob scheduleJob) throws Exception {
|
|
|
|
|
|
String component = scheduleJob.getExt1();
|
|
|
- String methodName = scheduleJob.getExt1();
|
|
|
|
|
|
while (true) {
|
|
|
- List<DataSyncEntity> list = dataSyncRepo
|
|
|
- .findTop10ByComponentAndMethodNameOrderById(component, methodName);
|
|
|
+ List<DataSyncEntity> list = dataSyncRepo.findTop10ByComponent(component);
|
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
|
break;
|
|
@@ -59,6 +57,8 @@ public class DataSyncTask extends AbstractTask {
|
|
|
Class<?> c = Class.forName(paramType);
|
|
|
Object obj = JsonUtil.fromJson(cur.getParamJson(), c);
|
|
|
SyncBaseRequest req = (SyncBaseRequest) obj;
|
|
|
+
|
|
|
+ String methodName = cur.getMethodName();
|
|
|
boolean result = dataSyncService.sync(component, methodName, req, false);
|
|
|
|
|
|
if (result) {
|