Commit f5ded753 by 黄小葱

关闭bhg同步渠道 新增定时任务同步

1 parent d8f780e3
......@@ -31,6 +31,11 @@ public final class Constants {
*/
public static final String TRIALDRIVE_VEHICLE_CONFIG = "trialdrive_vehicle_config";
/**
* 同步渠道 timed_task:定时任务渠道
*/
public static final String SYNC_CHANNEL_TIMED_TASK = "edun_timed_task";
}
package cn.com.glsx.admin.modules.controller;
import cn.com.glsx.admin.common.constants.Constants;
import cn.com.glsx.admin.modules.model.*;
import cn.com.glsx.admin.modules.model.export.TrialDriveVehicleExport;
import cn.com.glsx.admin.modules.model.imports.TrialDriveVehicleImport;
......@@ -145,7 +146,10 @@ public class VehicleController {
public R syncVehicleInfoFromBhg(@RequestBody @Validated(ValidateGroups.Insert.class) SyncVehicleBo vehicleBo) {
String errorMess = "";
try {
errorMess = vehicleService.syncVehicleInfoFromBhg(vehicleBo);
String chanle = vehicleBo.getChanle();
if (StringUtils.isNotBlank(chanle) && Constants.SYNC_CHANNEL_TIMED_TASK.equals(chanle)) {
errorMess = vehicleService.syncVehicleInfoFromBhg(vehicleBo);
}
} catch (Exception e) {
log.info("包活干同步车辆信息 异常:message:" + e.getMessage());
return R.error(e.getMessage());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!