数据初始化修改

dev
wany 2025-03-13 11:33:11 +08:00
parent ac7c0e5ef7
commit 9ee460c187
1 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package com.cowr.service.ssjygl.init;
import com.alibaba.fastjson.JSONObject;
import com.cowr.common.view.Result;
import com.cowr.model.SyncTask;
import com.cowr.service.ssjygl.base.BaseSyncService;
import com.cowr.service.ssjygl.synctask.SyncTaskService;
@ -79,7 +80,7 @@ public class InitDataSyncService extends BaseSyncService {
tableIdMap.put("truck_weight_limit", "truck_license");
}
public String syncData(Integer supermarketId) {
public Result syncData(Integer supermarketId) {
log.info("超市%s开始初始化数据", supermarketId);
StringBuilder str = new StringBuilder();
@ -119,13 +120,13 @@ public class InitDataSyncService extends BaseSyncService {
});
if (ret) {
return str.toString();
return Result.success(str.toString());
} else {
return "同步失败";
return Result.failed("同步失败");
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return "同步失败";
return Result.failed("同步失败");
}
}
}