OMS-GW推送-商业合作伙伴
This commit is contained in:
@@ -210,10 +210,10 @@ public interface UserServiceFeign {
|
||||
@RequestParam(value = "updateTimeTo", required = false) String updateTimeTo,
|
||||
@RequestParam(value = "shipperType", required = false) Integer shipperType);
|
||||
|
||||
@ApiOperation("商业合作伙伴-更新推送")
|
||||
|
||||
@PostMapping("/userShipperApi/updatePushStatus")
|
||||
void updatePushStatus(@RequestParam(value = "shipperId") Long shipperId,
|
||||
@RequestParam(value = "pushStatus") Integer pushStatus,
|
||||
@RequestParam(value = "pushTime") Date pushTime,
|
||||
@RequestParam(value = "pushBy") Long pushBy);
|
||||
public AjaxResult<?> updatePushStatus(@RequestParam(value = "shipperId") Long shipperId,
|
||||
@RequestParam(value = "pushStatus", required = false) Integer pushStatus,
|
||||
@RequestParam(value = "pushTime", required = false) Date pushTime,
|
||||
@RequestParam(value = "pushBy", required = false) Long pushBy);
|
||||
}
|
||||
+2
-2
@@ -189,8 +189,8 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) {
|
||||
log.error("更新失败" + throwable.getMessage());
|
||||
public AjaxResult<?> updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) {
|
||||
return AjaxResult.error("更新失败" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mhd.user.interfaces.vo.SettlementInfoQueryVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -240,7 +241,8 @@ public class UserShipperAPI extends BaseController {
|
||||
@PostMapping("/updatePushStatus")
|
||||
public AjaxResult updatePushStatus(@RequestParam("shipperId") Long shipperId,
|
||||
@RequestParam("pushStatus") Integer pushStatus,
|
||||
@RequestParam("pushTime") Date pushTime,
|
||||
@RequestParam("pushTime")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date pushTime,
|
||||
@RequestParam("pushBy") Long pushBy){
|
||||
|
||||
try{
|
||||
|
||||
+3
-2
@@ -110,7 +110,7 @@ public class BusinessPartnerApplicationService {
|
||||
gwLog.setDelFlag(1);
|
||||
gwLogMapper.insert(gwLog);
|
||||
|
||||
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),2,null,pushBy);
|
||||
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),2,new Date(),pushBy);
|
||||
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(PUSH_API_URL);
|
||||
@@ -173,7 +173,8 @@ public class BusinessPartnerApplicationService {
|
||||
private void updatePushStatus(Long shipperId, Integer pushStatus, Date pushTime, Long pushBy) {
|
||||
try {
|
||||
// 调用user-center的Feign接口,更新货主的推送状态
|
||||
userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTime, pushBy);
|
||||
AjaxResult result = userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTime, pushBy);
|
||||
log.info("更新返回结果:{}",result);
|
||||
} catch (Exception e) {
|
||||
// 如果更新失败,记录错误日志,但不阻断主流程
|
||||
log.info("更新推送状态失败: shipperId={}, error={}", shipperId, e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user