From 6f25935e24fb1ba17b73649e638fe3152e6ddc09 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 2 Aug 2024 10:04:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=A2=A6=E5=A4=A9?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/mt/controller/MtFactoryDataController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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();