diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java index d99a28b8a..37e2cffba 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java @@ -214,6 +214,6 @@ public interface UserServiceFeign { @PostMapping("/userShipperApi/updatePushStatus") public AjaxResult updatePushStatus(@RequestParam(value = "shipperId") Long shipperId, @RequestParam(value = "pushStatus", required = false) Integer pushStatus, - @RequestParam(value = "pushTime", required = false) Date pushTime, + @RequestParam(value = "pushTime", required = false) String pushTime, @RequestParam(value = "pushBy", required = false) Long pushBy); } \ No newline at end of file diff --git a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java index 85a7f0d36..dd85a7f9b 100644 --- a/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java +++ b/mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/factory/RemoteUserFeignFallbackFactory.java @@ -189,7 +189,7 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) { + public AjaxResult updatePushStatus(Long shipperId, Integer pushStatus, String pushTime, Long pushBy) { return AjaxResult.error("更新失败" + throwable.getMessage()); } }; diff --git a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java index aaff62243..9faccfa09 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java +++ b/mhd-user-center/src/main/java/com/mhd/user/application/service/UserShipperApplicationService.java @@ -1221,11 +1221,13 @@ public class UserShipperApplicationService { * @param pushBy * @return */ - public int updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) { + public int updatePushStatus(Long shipperId, Integer pushStatus, String pushTime, Long pushBy) { UserShipperEntity userShipper = new UserShipperEntity(); userShipper.setShipperId(shipperId); userShipper.setPushStatus(pushStatus); - userShipper.setPushTime(pushTime); + if (pushTime != null && !"".equals(pushTime)) { + userShipper.setPushTime(DateUtil.parse(pushTime)); + } userShipper.setPushBy(pushBy); return userShipperMapper.updatePushStatus(userShipper); } diff --git a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java index 484768893..a21505014 100644 --- a/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java +++ b/mhd-user-center/src/main/java/com/mhd/user/interfaces/facade/UserShipperAPI.java @@ -241,9 +241,8 @@ public class UserShipperAPI extends BaseController { @PostMapping("/updatePushStatus") public AjaxResult updatePushStatus(@RequestParam("shipperId") Long shipperId, @RequestParam("pushStatus") Integer pushStatus, - @RequestParam("pushTime") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date pushTime, - @RequestParam("pushBy") Long pushBy){ + @RequestParam(value = "pushTime", required = false) String pushTime, + @RequestParam(value = "pushBy", required = false) Long pushBy){ try{ int result = userShipperApplicationService.updatePushStatus(shipperId,pushStatus,pushTime,pushBy); diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessPartner/BusinessPartnerApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessPartner/BusinessPartnerApplicationService.java index fb1e26a78..46645d011 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessPartner/BusinessPartnerApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessPartner/BusinessPartnerApplicationService.java @@ -173,7 +173,8 @@ public class BusinessPartnerApplicationService { private void updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) { try { // 调用user-center的Feign接口,更新货主的推送状态 - AjaxResult result = userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTime, pushBy); + String pushTimeStr = pushTime != null ? DateUtil.format(pushTime, "yyyy-MM-dd HH:mm:ss") : null; + AjaxResult result = userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTimeStr, pushBy); log.info("更新返回结果:{}",result); } catch (Exception e) { // 如果更新失败,记录错误日志,但不阻断主流程