商业合作伙伴推送人姓名字段添加

This commit is contained in:
zhaoqing
2026-05-14 11:31:26 +08:00
parent 43c64779ce
commit e8dfcd723f
8 changed files with 21 additions and 13 deletions
@@ -96,7 +96,7 @@ public class BusinessPartnerApplicationService {
GwLog gwLog = new GwLog();
gwLog.setType("商业合作伙伴");
gwLog.setBusinessId(businessPartnerDTO.getShipperId());
gwLog.setBusinessId(Long.valueOf(businessPartnerDTO.getShipperId()));
gwLog.setRequestBody(JSONObject.toJSONString(body));
gwLog.setResponseBody("");
gwLog.setStatus(1);
@@ -109,7 +109,7 @@ public class BusinessPartnerApplicationService {
gwLog.setDelFlag(1);
gwLogMapper.insert(gwLog);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),2,new Date(),pushBy);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),2,new Date(),pushBy,pushByName);
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(PUSH_API_URL);
@@ -125,12 +125,12 @@ public class BusinessPartnerApplicationService {
if(response.getStatusLine().getStatusCode() == 200){
gwLog.setStatus(2);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),3, new Date(), pushBy);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),3, new Date(), pushBy,pushByName);
successCount++;
}else{
gwLog.setStatus(3);
gwLog.setErrorMsg(responseString);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),4, new Date(), pushBy);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),4, new Date(), pushBy,pushByName);
failCount++;
failMsg.append("CorpCode:").append(businessPartnerDTO.getCorpCode()).append("失败:");
}
@@ -143,7 +143,7 @@ public class BusinessPartnerApplicationService {
gwLog.setStatus(3);
gwLog.setErrorMsg(e.getMessage());
gwLogMapper.updateById(gwLog);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),4, new Date(), pushBy);
updatePushStatus(Long.valueOf(businessPartnerDTO.getShipperId()),4, new Date(), pushBy,pushByName);
failCount++;
failMsg.append("CorpCode:").append(businessPartnerDTO.getCorpCode()).append("异常:").append(e.getMessage()).append(":");
log.error("GW推送异常:shipperId={} error={}",businessPartnerDTO.getShipperId(),e.getMessage());
@@ -169,11 +169,11 @@ 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,String pushByName) {
try {
// 调用user-center的Feign接口,更新货主的推送状态
String pushTimeStr = pushTime != null ? DateUtil.format(pushTime, "yyyy-MM-dd HH:mm:ss") : null;
AjaxResult result = userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTimeStr, pushBy);
AjaxResult result = userServiceFeign.updatePushStatus(shipperId, pushStatus, pushTimeStr, pushBy, pushByName);
log.info("更新返回结果:{}",result);
} catch (Exception e) {
// 如果更新失败,记录错误日志,但不阻断主流程