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