diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java index 01f76ad73..77bfdf1fc 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/mt/controller/MtFactoryDataController.java @@ -108,7 +108,8 @@ public class MtFactoryDataController extends BladeController { @PostMapping("/data") @ApiOperationSupport(order = 1) @ApiOperation(value = "通常数据推送", notes = "传入factoryOrderDTO") - public R data(@Validated @RequestBody MtFactoryDataDTO mtFactoryDataDTO, HttpServletRequest request) { +// public R data(@Validated @RequestBody MtFactoryDataDTO mtFactoryDataDTO, HttpServletRequest request) { + public R data(@Validated @RequestBody Map mtFactoryDataDTO, HttpServletRequest request) { log.info("############data:{} ", mtFactoryDataDTO); String corpId = request.getHeader("corpId"); @@ -120,8 +121,10 @@ public class MtFactoryDataController extends BladeController { orderStatusLog.setBrand("梦天"); orderStatusLogService.save(orderStatusLog); try { + // 解析 map 为 MtFactoryDataDTO 对象 + MtFactoryDataDTO dto = JSONObject.parseObject(JSONObject.toJSONString(mtFactoryDataDTO), MtFactoryDataDTO.class); //数据存入数据库 - R r = mtFactoryDataService.dealWithData(mtFactoryDataDTO); + R r = mtFactoryDataService.dealWithData(dto); int code = r.getCode(); Map map = (Map) r.getData();