|
@@ -6,6 +6,8 @@ import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.commons.api.request.SyncBaseRequest;
|
|
|
+import cn.com.qmth.examcloud.commons.base.util.JsonUtil;
|
|
|
import cn.com.qmth.examcloud.task.base.AbstractTask;
|
|
|
import cn.com.qmth.examcloud.task.base.ScheduleJob;
|
|
|
import cn.com.qmth.examcloud.task.base.TaskTracker;
|
|
@@ -53,10 +55,16 @@ public class DataSyncTask extends AbstractTask {
|
|
|
|
|
|
for (DataSyncEntity cur : list) {
|
|
|
String paramType = cur.getParamType();
|
|
|
+ Class<?> c = Class.forName(paramType);
|
|
|
+ Object obj = JsonUtil.fromJson(cur.getParamJson(), c);
|
|
|
+ SyncBaseRequest req = (SyncBaseRequest) obj;
|
|
|
+ dataSyncService.sync(component, methodName, req, false);
|
|
|
|
|
|
+ dataSyncRepo.delete(cur);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|