OMS-GW推送-商业合作伙伴

This commit is contained in:
zhaoqing
2026-05-06 14:16:14 +08:00
parent 4d732b1bf8
commit d32e7e97f6
5 changed files with 10 additions and 8 deletions
@@ -214,6 +214,6 @@ public interface UserServiceFeign {
@PostMapping("/userShipperApi/updatePushStatus") @PostMapping("/userShipperApi/updatePushStatus")
public AjaxResult<?> updatePushStatus(@RequestParam(value = "shipperId") Long shipperId, public AjaxResult<?> updatePushStatus(@RequestParam(value = "shipperId") Long shipperId,
@RequestParam(value = "pushStatus", required = false) Integer pushStatus, @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); @RequestParam(value = "pushBy", required = false) Long pushBy);
} }
@@ -189,7 +189,7 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
} }
@Override @Override
public AjaxResult<?> 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()); return AjaxResult.error("更新失败" + throwable.getMessage());
} }
}; };
@@ -1221,11 +1221,13 @@ public class UserShipperApplicationService {
* @param pushBy * @param pushBy
* @return * @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(); UserShipperEntity userShipper = new UserShipperEntity();
userShipper.setShipperId(shipperId); userShipper.setShipperId(shipperId);
userShipper.setPushStatus(pushStatus); userShipper.setPushStatus(pushStatus);
userShipper.setPushTime(pushTime); if (pushTime != null && !"".equals(pushTime)) {
userShipper.setPushTime(DateUtil.parse(pushTime));
}
userShipper.setPushBy(pushBy); userShipper.setPushBy(pushBy);
return userShipperMapper.updatePushStatus(userShipper); return userShipperMapper.updatePushStatus(userShipper);
} }
@@ -241,9 +241,8 @@ public class UserShipperAPI extends BaseController {
@PostMapping("/updatePushStatus") @PostMapping("/updatePushStatus")
public AjaxResult updatePushStatus(@RequestParam("shipperId") Long shipperId, public AjaxResult updatePushStatus(@RequestParam("shipperId") Long shipperId,
@RequestParam("pushStatus") Integer pushStatus, @RequestParam("pushStatus") Integer pushStatus,
@RequestParam("pushTime") @RequestParam(value = "pushTime", required = false) String pushTime,
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date pushTime, @RequestParam(value = "pushBy", required = false) Long pushBy){
@RequestParam("pushBy") Long pushBy){
try{ try{
int result = userShipperApplicationService.updatePushStatus(shipperId,pushStatus,pushTime,pushBy); int result = userShipperApplicationService.updatePushStatus(shipperId,pushStatus,pushTime,pushBy);
@@ -173,7 +173,8 @@ public class BusinessPartnerApplicationService {
private void updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) { private void updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) {
try { try {
// 调用user-center的Feign接口,更新货主的推送状态 // 调用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); log.info("更新返回结果:{}",result);
} catch (Exception e) { } catch (Exception e) {
// 如果更新失败,记录错误日志,但不阻断主流程 // 如果更新失败,记录错误日志,但不阻断主流程