Commit d356e028 authored by 张永's avatar 张永

V1.1.7.8.3

parent d5d5f75f
...@@ -73,12 +73,20 @@ public class OrderController { ...@@ -73,12 +73,20 @@ public class OrderController {
@ApiImplicitParam(paramType = "query", name="data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"terminal\": \"wechat\",\"langID\": \"936\",\"payTypeID\":1,\"addrID\":\"111111\",\"orderMemo\":\"备注\",\"couponNO\":\"\",\"couponTypeID\":\"\", \"bankType\": \"xxx\", 'bankAccount': 'xxx', 'bankAccountName': 'xxx', 'revBankType': 'xxx', 'revBankAccount': 'xxx', 'revBankAccountNo': 'xxx', 'formId': 'xxx', 'email': 'xxx', 'salesmanNo': 'xxx','onlinePayTypeID':'xxx','payCardNO':'PayCardNO'}"), @ApiImplicitParam(paramType = "query", name="data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"terminal\": \"wechat\",\"langID\": \"936\",\"payTypeID\":1,\"addrID\":\"111111\",\"orderMemo\":\"备注\",\"couponNO\":\"\",\"couponTypeID\":\"\", \"bankType\": \"xxx\", 'bankAccount': 'xxx', 'bankAccountName': 'xxx', 'revBankType': 'xxx', 'revBankAccount': 'xxx', 'revBankAccountNo': 'xxx', 'formId': 'xxx', 'email': 'xxx', 'salesmanNo': 'xxx','onlinePayTypeID':'xxx','payCardNO':'PayCardNO'}"),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, value = "终端标识", defaultValue = "wechat"), @ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"), @ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "balanceAmount", dataType = "String", required = false, value = "余额", defaultValue = "需求 #17203"),
}) })
@RequestMapping(value = "/submit",method=RequestMethod.POST,produces = "application/json") @RequestMapping(value = "/submit",method=RequestMethod.POST,produces = "application/json")
@IDCLogResource(name="订单正式提交(JSON格式)") @IDCLogResource(name="订单正式提交(JSON格式)")
public String submit(HttpServletRequest request) { public String submit(HttpServletRequest request) {
String reqJson = request.getParameter("data"); String reqJson = request.getParameter("data");
String balanceAmount = request.getParameter("balanceAmount");
JSONObject jsonObj = JSONObject.parseObject(reqJson); JSONObject jsonObj = JSONObject.parseObject(reqJson);
if(StringUtil.isNotUndefinedAndNull(balanceAmount)) {
jsonObj.put("balanceAmount",balanceAmount);
}else {
jsonObj.put("balanceAmount",0);
}
System.out.println("submit-------"+reqJson); System.out.println("submit-------"+reqJson);
return orderService.submit(jsonObj); return orderService.submit(jsonObj);
} }
......
...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.GsonUtil; import com.egolm.common.GsonUtil;
import com.egolm.common.HttpsUtil; import com.egolm.common.HttpsUtil;
import com.egolm.common.LogBackUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.shop.api.service.OrderService; import com.egolm.shop.api.service.OrderService;
import com.egolm.shop.bean.WxPayResponse; import com.egolm.shop.bean.WxPayResponse;
...@@ -49,6 +50,19 @@ public class PayNotifyController { ...@@ -49,6 +50,19 @@ public class PayNotifyController {
WxPayResponse postData = null; WxPayResponse postData = null;
try {
//设置一个requetId
String traceId = req.getHeader(LogBackUtil.TRACE_ID);
if(!StringUtil.isNotBlank(traceId)) {
traceId = StringUtil.getId(32,"S");
}
LogBackUtil.setTraceId(traceId);
resp.setHeader(LogBackUtil.TRACE_ID, traceId);
} catch (Exception e1) {
}
try { try {
// 转换微信post过来的xml内容 // 转换微信post过来的xml内容
ServletInputStream in = req.getInputStream(); ServletInputStream in = req.getInputStream();
...@@ -64,7 +78,7 @@ public class PayNotifyController { ...@@ -64,7 +78,7 @@ public class PayNotifyController {
postData = (WxPayResponse) xs.fromXML(xmlMsg); postData = (WxPayResponse) xs.fromXML(xmlMsg);
List<Map<String, Object>> returnMap = orderService.payCallback(postData,xmlMsg,callBackFilePath); List<Map<String, Object>> returnMap = orderService.payCallback(postData,xmlMsg,callBackFilePath);
logger.info("从egoPay中接收到支付信息结果 {}",GsonUtil.toJson(returnMap)); logger.info("从egoPay中接收到支付信息处理结果 {}",GsonUtil.toJson(returnMap));
} catch (Exception e) { } catch (Exception e) {
logger.info("处理从egoPay中接收到支付回调信息异常:{} ",e); logger.info("处理从egoPay中接收到支付回调信息异常:{} ",e);
......
...@@ -141,11 +141,13 @@ public class OrderServiceImpl implements OrderService { ...@@ -141,11 +141,13 @@ public class OrderServiceImpl implements OrderService {
revBankAccount = StringUtil.isBlank(revBankAccount) ? "" : revBankAccount; revBankAccount = StringUtil.isBlank(revBankAccount) ? "" : revBankAccount;
revBankAccountNo = StringUtil.isBlank(revBankAccountNo) ? "" : revBankAccountNo; revBankAccountNo = StringUtil.isBlank(revBankAccountNo) ? "" : revBankAccountNo;
String balanceAmount = submitObj.containsKey("balanceAmount")?submitObj.getString("balanceAmount"):"0"; //需求 #17203
String sql = "exec up_NewCreatetSalesOrder '" + shopNO + "',null, '" + payID + "', '" + terminalTypeID String sql = "exec up_NewCreatetSalesOrder '" + shopNO + "',null, '" + payID + "', '" + terminalTypeID
+ "', '" + addrID + "', '" + orderMemo + "', '" + couponNO + "','" + couponTypeID + "', '', '1', '" + "', '" + addrID + "', '" + orderMemo + "', '" + couponNO + "','" + couponTypeID + "', '', '1', '"
+ (bankType == null ? "" : bankType) + "', '" + (bankAccount == null ? "" : bankAccount) + "', '" + (bankType == null ? "" : bankType) + "', '" + (bankAccount == null ? "" : bankAccount) + "', '"
+ bankAccountName + "', '" + revBankType + "', '" + revBankAccount + "', '" + revBankAccountNo + bankAccountName + "', '" + revBankType + "', '" + revBankAccount + "', '" + revBankAccountNo
+ "','0','','"+onlinePayTypeID+"' ,'"+payCardNO+"' "; + "','0','','"+onlinePayTypeID+"' ,'"+payCardNO+"','"+balanceAmount+"' ";
List<Map<String, Object>> commitMap = jdbcTemplate.executeMutil(sql).getDatas().get(0); List<Map<String, Object>> commitMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);
logger.info("提交订单:{}, 提交结果: {}",submitObj,GsonUtil.toJson(commitMap)); logger.info("提交订单:{}, 提交结果: {}",submitObj,GsonUtil.toJson(commitMap));
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<div id="app"> <div id="app">
<el-divider content-position="left">V1.1.7.8.3 2024-8-15</el-divider> <el-divider content-position="left">V1.1.7.8.3 2024-8-15</el-divider>
<p class="title">1.需求 #17240</p> <p class="title">1.需求 #17240</p>
<p class="title">2. 订单提交增加参数,需求 #17203</p>
<el-divider content-position="left">V1.1.7.8.2 2024-8-14</el-divider> <el-divider content-position="left">V1.1.7.8.2 2024-8-14</el-divider>
<p class="title">1.回调增加个日志,便于查。</p> <p class="title">1.回调增加个日志,便于查。</p>
<p class="title">2.confirmReceipt 长度扩36</p> <p class="title">2.confirmReceipt 长度扩36</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