Commit 84baab25 authored by 张永's avatar 张永

V1.1.7.8

parent 066fe8c5
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
</executions> </executions>
<configuration> <configuration>
<repository>dockerhub.linkfern.com/b2c/shopapi</repository> <repository>dockerhub.linkfern.com/b2c/shopapi</repository>
<tag>V1.1.7.7</tag> <tag>V1.1.7.8</tag>
<buildArgs> <buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE> <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs> </buildArgs>
......
...@@ -444,7 +444,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -444,7 +444,7 @@ public class OrderServiceImpl implements OrderService {
try { try {
if(returnMap.size() >0 ) { if(returnMap.size() >0 ) {
Map<String,Object> orderMap = returnMap.get(0); Map<String,Object> orderMap = returnMap.get(0);
logger.info("检查是否要推送蔬东坡-------"+GsonUtil.toJson(orderMap)); logger.info("支付单号 :"+sOutTradeNO+" 检查是否要推送蔬东坡-------"+GsonUtil.toJson(orderMap));
String Status = orderMap.get("Status")+""; String Status = orderMap.get("Status")+"";
String salesOrderID = orderMap.get("SalesOrderID")+""; String salesOrderID = orderMap.get("SalesOrderID")+"";
String IsPush = orderMap.get("IsPush")+""; String IsPush = orderMap.get("IsPush")+"";
...@@ -463,7 +463,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -463,7 +463,7 @@ public class OrderServiceImpl implements OrderService {
String result = HttpsUtil.doGet(url+"?salesOrderID="+salesOrderID); String result = HttpsUtil.doGet(url+"?salesOrderID="+salesOrderID);
logger.info("推送到蔬东坡的订单 :{},结果:{} ",salesOrderID,result); logger.info("推送到蔬东坡的订单 :{},结果:{} ",salesOrderID,result);
}else { }else {
logger.info("推送到蔬东坡的订单地址未配置 "); logger.info("推送到蔬东坡的订单: {} 地址未配置 ",salesOrderID);
} }
} }
...@@ -473,7 +473,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -473,7 +473,7 @@ public class OrderServiceImpl implements OrderService {
logger.info("支付单号{},返回的过程处理结果为空 {}-------",sOutTradeNO, GsonUtil.toJson(returnMap)); logger.info("支付单号{},返回的过程处理结果为空 {}-------",sOutTradeNO, GsonUtil.toJson(returnMap));
} }
} catch (Exception e) { } catch (Exception e) {
logger.info("推送到蔬东坡的订单 异常 ",e); logger.info("支付单号{}, 推送到蔬东坡的订单 异常 ",sOutTradeNO,e);
} }
} }
...@@ -1254,9 +1254,9 @@ public class OrderServiceImpl implements OrderService { ...@@ -1254,9 +1254,9 @@ public class OrderServiceImpl implements OrderService {
// 回调标记已补款 // 回调标记已补款
public List<Map<String, Object>> payCallback(WxPayResponse postData,String xmlMsg,String callBackFilePath) { public List<Map<String, Object>> payCallback(WxPayResponse postData,String xmlMsg,String callBackFilePath) {
List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>();
try {
String OutTradeNO = postData.getOut_trade_no(); String OutTradeNO = postData.getOut_trade_no();
try {
String TransactionID = postData.getTransaction_id(); String TransactionID = postData.getTransaction_id();
String PayCardNO = postData.getOpenid(); String PayCardNO = postData.getOpenid();
String PayAmount = postData.getTotal_fee().toString(); String PayAmount = postData.getTotal_fee().toString();
...@@ -1265,14 +1265,14 @@ public class OrderServiceImpl implements OrderService { ...@@ -1265,14 +1265,14 @@ public class OrderServiceImpl implements OrderService {
String OpenID = postData.getOpenid(); String OpenID = postData.getOpenid();
String paydate = DateUtil.format(DateUtil.parse(PayDate, DateUtil.FMT_YYYYMMddHHMMSS), String paydate = DateUtil.format(DateUtil.parse(PayDate, DateUtil.FMT_YYYYMMddHHMMSS),
DateUtil.FMT_DATE_SECOND); DateUtil.FMT_DATE_SECOND);
logger.info("支付回调单号: {}", OutTradeNO); logger.info("开始处理支付回调单号: {}", OutTradeNO);
returnMap = this.doCallBack(OutTradeNO, TransactionID, PayCardNO, PayAmount, paydate, PayChannel, OpenID,callBackFilePath,xmlMsg); returnMap = this.doCallBack(OutTradeNO, TransactionID, PayCardNO, PayAmount, paydate, PayChannel, OpenID,callBackFilePath,xmlMsg);
logger.info("回调支付单号: "+OutTradeNO+",结果:"+GsonUtil.toJson(returnMap)); logger.info("结束处理回调支付单号: "+OutTradeNO+",结果:"+GsonUtil.toJson(returnMap));
} catch (Exception e) { } catch (Exception e) {
logger.info("支付回调异常 ,{} ", e); logger.info("结束处理支付回调单号:{} 回调异常 ,{} ",OutTradeNO, e);
} }
return returnMap; return returnMap;
} }
...@@ -1282,13 +1282,15 @@ public class OrderServiceImpl implements OrderService { ...@@ -1282,13 +1282,15 @@ public class OrderServiceImpl implements OrderService {
List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>();
// 补款后缀是_D,结算单后缀是_S // 补款后缀是_D,结算单后缀是_S
if (OutTradeNO.contains("_D")) { if (OutTradeNO.contains("_D")) {
String sql = "exec up_B2BSalesOrderDebtPayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '" /*String sql = "exec up_B2BSalesOrderDebtPayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '"
+ PayCardNO + "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' "; + PayCardNO + "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' ";
returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0); returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);*/
returnMap = this.payCallBack_D(OutTradeNO, TransactionID, PayCardNO, PayAmount, paydate, PayChannel);
} else if (OutTradeNO.contains("_S")) { } else if (OutTradeNO.contains("_S")) {
String sql = "exec up_CreateSettlePayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '" + PayCardNO /*String sql = "exec up_CreateSettlePayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '" + PayCardNO
+ "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' "; + "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' ";
returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0); returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);*/
returnMap = this.payCallBack_S(OutTradeNO, TransactionID, PayCardNO, PayAmount, paydate, PayChannel);
} else {// 普通订单 } else {// 普通订单
String[] ary = OutTradeNO.split("_", 2); String[] ary = OutTradeNO.split("_", 2);
this.createPayFile(ary[0], PayChannel, callBackFilePath, xmlMsg); this.createPayFile(ary[0], PayChannel, callBackFilePath, xmlMsg);
...@@ -1296,6 +1298,49 @@ public class OrderServiceImpl implements OrderService { ...@@ -1296,6 +1298,49 @@ public class OrderServiceImpl implements OrderService {
} }
return returnMap; return returnMap;
} }
//补款回调
public List<Map<String, Object>> payCallBack_D(String OutTradeNO,String TransactionID,String PayCardNO,String PayAmount,String paydate,String PayChannel){
List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>();
for(int i =1;i<=3;i++) {
String sql = "exec up_B2BSalesOrderDebtPayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '"
+ PayCardNO + "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' ";
returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);
String returnStr = GsonUtil.toJson(returnMap);
logger.info("补款回调支付单号: "+OutTradeNO+"第"+i+"次回调结果:"+returnStr);
//需求 #16796
//{"Status":99,"ErrorMsg":"订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\n订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\nTransaction (Process ID 72) was deadlocked on lock resources with another process and has been ","IsPush":0,"SalesOrderID":"S2024032620001460"}
if(returnStr.contains("Process")) { //事物锁,重试
//重试
}else {
break;
}
}
return returnMap;
}
//结算单回调
public List<Map<String, Object>> payCallBack_S(String OutTradeNO,String TransactionID,String PayCardNO,String PayAmount,String paydate,String PayChannel){
List<Map<String, Object>> returnMap = new ArrayList<Map<String, Object>>();
for(int i =1;i<=3;i++) {
String sql = "exec up_CreateSettlePayCallBack '" + OutTradeNO + "' ,'" + TransactionID + "' , '" + PayCardNO
+ "' , '" + PayAmount + "' , '" + paydate + "' , '" + PayChannel + "' ";
returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);
String returnStr = GsonUtil.toJson(returnMap);
logger.info("结算单回调支付单号: "+OutTradeNO+"第"+i+"次回调结果:"+returnStr);
//需求 #16796
//{"Status":99,"ErrorMsg":"订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\n订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\nTransaction (Process ID 72) was deadlocked on lock resources with another process and has been ","IsPush":0,"SalesOrderID":"S2024032620001460"}
if(returnStr.contains("Process")) { //事物锁,重试
//重试
}else {
break;
}
}
return returnMap;
}
/** /**
* 微企付的回调 PayTypeID=140 * 微企付的回调 PayTypeID=140
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<el-divider content-position="left">V1.1.7.8 2024-7-20</el-divider>
<p class="title">1.解决补款单、结算单回调 遇到Process时 重试最多3次</p>
<el-divider content-position="left">V1.1.7.7 2024-7-18</el-divider> <el-divider content-position="left">V1.1.7.7 2024-7-18</el-divider>
<p class="title">1.解决一个空值</p> <p class="title">1.解决购物车一个空值</p>
<el-divider content-position="left">V1.1.7.6 2024-7-18</el-divider> <el-divider content-position="left">V1.1.7.6 2024-7-18</el-divider>
<p class="title">1.支付回调失败状态为99的,刚写文件,需求 #16796</p> <p class="title">1.支付回调失败状态为99的,刚写文件,需求 #16796</p>
<p class="title">2.改取IP方法,需求 #16869</p> <p class="title">2.改取IP方法,需求 #16869</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment