Commit 7ef62dc5 authored by 张永's avatar 张永

需求 #17427

parent 8a564182
...@@ -1849,7 +1849,9 @@ public class OrderServiceImpl implements OrderService { ...@@ -1849,7 +1849,9 @@ public class OrderServiceImpl implements OrderService {
params.put("agentID",agentID); params.put("agentID",agentID);
params.put("onlinePayTypeId", PayTypeID); params.put("onlinePayTypeId", PayTypeID);
for(int ii = 1;ii<=100;ii++) { boolean isPay_170_flag = false; //170分账是否支付成功,true为成功,false为失败
String statusName ="";
for(int ii = 1;ii<=100;ii++) { //需求 #17427 失败了遍历100次,
logger.info("第:{} 次进行扫呗分账支付 ,请求:{} ",ii,payObj.toString()); logger.info("第:{} 次进行扫呗分账支付 ,请求:{} ",ii,payObj.toString());
String cbkResult = payClient.post("/lcsw/fz_cbk_dotrans_f", params,map.get("trace_id")+""); String cbkResult = payClient.post("/lcsw/fz_cbk_dotrans_f", params,map.get("trace_id")+"");
...@@ -1864,10 +1866,11 @@ public class OrderServiceImpl implements OrderService { ...@@ -1864,10 +1866,11 @@ public class OrderServiceImpl implements OrderService {
String returnStr = GsonUtil.toJson(returnMap); String returnStr = GsonUtil.toJson(returnMap);
logger.info("第:{} 次进行扫呗分账支付成功 ,回写结果:{} ",ii,returnStr); logger.info("第:{} 次进行扫呗分账支付成功 ,回写结果:{} ",ii,returnStr);
isPay_170_flag = true;
break; break;
}else { }else {
String statusName = cbkJsonResult.containsKey("err_code_des")?cbkJsonResult.getString("err_code_des"):cbkJsonResult.getString("message"); statusName = cbkJsonResult.containsKey("err_code_des")?cbkJsonResult.getString("err_code_des"):cbkJsonResult.getString("message");
if(StringUtil.isBlank(statusName)) { if(StringUtil.isBlank(statusName)) {
statusName = "分账支付失败."; statusName = "分账支付失败.";
} }
...@@ -1879,6 +1882,13 @@ public class OrderServiceImpl implements OrderService { ...@@ -1879,6 +1882,13 @@ public class OrderServiceImpl implements OrderService {
} }
} }
if(!isPay_170_flag) { //如果100次后还是失败,则订单转为待取消
String csql = "exec up_CancelledSalesOrder '"+salesOrderID+"', 0, '"+statusName+"'";
List<Map<String, Object>> returnMap = jdbcTemplate.executeMutil(csql).getDatas().get(0);
String returnStr = GsonUtil.toJson(returnMap);
logger.info("订单:{} 扫呗分账支付失败 ,订单转为待取消:{}",salesOrderID,returnStr);
}
}else { }else {
payObj.putAll(jdbcTemplate.queryForMap(sqlOrderQuery, salesOrderID)); payObj.putAll(jdbcTemplate.queryForMap(sqlOrderQuery, salesOrderID));
return Rjx.jsonOk().setData(payObj).toJson(); return Rjx.jsonOk().setData(payObj).toJson();
...@@ -1891,7 +1901,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -1891,7 +1901,7 @@ public class OrderServiceImpl implements OrderService {
String sql111 = "exec up_B2BSalesOrderPayCallBack '" + salesOrderID + "'"; String sql111 = "exec up_B2BSalesOrderPayCallBack '" + salesOrderID + "'";
List<Map<String, Object>> returnMap = jdbcTemplate.executeMutil(sql111).getDatas().get(0); List<Map<String, Object>> returnMap = jdbcTemplate.executeMutil(sql111).getDatas().get(0);
Map<String,Object> orderMap = returnMap.get(0); Map<String,Object> orderMap = returnMap.get(0);
logger.info("订单单号 :"+salesOrderID+" 检查是否要推送蔬东坡-------"+GsonUtil.toJson(returnMap)); logger.info("订单单号 :"+salesOrderID+" 存在分账支付检查是否要推送蔬东坡-------"+GsonUtil.toJson(returnMap));
String IsPush = orderMap.get("IsPush")+""; String IsPush = orderMap.get("IsPush")+"";
if(IsPush.equals("1")) { if(IsPush.equals("1")) {
this.doPushOrderToSdongPo(salesOrderID,IsPush,"0"); this.doPushOrderToSdongPo(salesOrderID,IsPush,"0");
......
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