'提交代码'

dev-discount
= 3 years ago
parent 545e0c57fc
commit 7a23915980
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/pay/QzOrderController.java
  2. 9
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  3. 2
      hai-service/src/main/java/com/hai/config/QianZhuConfig.java
  4. 2
      hai-service/src/main/java/com/hai/service/pay/impl/CinemaOrderService.java
  5. 2
      hai-service/src/main/java/com/hai/service/pay/impl/KfcOrderService.java
  6. 1
      hai-service/src/main/resources/dev/commonConfig.properties
  7. 1
      hai-service/src/main/resources/prod/commonConfig.properties

@ -39,7 +39,7 @@ public class QzOrderController {
@RequestMapping(value = "/orderNotify", method = RequestMethod.POST) @RequestMapping(value = "/orderNotify", method = RequestMethod.POST)
@ApiOperation(value = "千猪订单回调") @ApiOperation(value = "千猪订单回调")
public void orderPaymentNotify(@RequestBody String reqBodyStr,HttpServletRequest request, HttpServletResponse response) { public void orderNotify(@RequestBody String reqBodyStr,HttpServletRequest request, HttpServletResponse response) {
try { try {
log.info(reqBodyStr); log.info(reqBodyStr);
JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class); JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class);

@ -18,6 +18,7 @@ public class CommonSysConfig {
private String qinzhuUrl; private String qinzhuUrl;
private String qinzhuPlatformId; private String qinzhuPlatformId;
private String qinzhuSecret; private String qinzhuSecret;
private String qianzhuOrderNotify;
private String wx_cert; private String wx_cert;
@ -26,6 +27,14 @@ public class CommonSysConfig {
private String telMemberId; private String telMemberId;
private String telUrl; private String telUrl;
public String getQianzhuOrderNotify() {
return qianzhuOrderNotify;
}
public void setQianzhuOrderNotify(String qianzhuOrderNotify) {
this.qianzhuOrderNotify = qianzhuOrderNotify;
}
public String getTuanYouUrl() { public String getTuanYouUrl() {
return tuanYouUrl; return tuanYouUrl;
} }

@ -69,7 +69,7 @@ public class QianZhuConfig {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId()); map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId());
map.put("timestamp", new Date().getTime()); map.put("timestamp", new Date().getTime());
map.put("notifyUrl", ""); map.put("notifyUrl", CommonSysConst.getSysConfig().getQianzhuOrderNotify());
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase()); map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase());
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuUrl()+"/openApi/v1/orders/payKfcOrder", JSONObject.toJSONString(map)); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuUrl()+"/openApi/v1/orders/payKfcOrder", JSONObject.toJSONString(map));

@ -26,7 +26,7 @@ public class CinemaOrderService implements PayService {
} }
if (payType.equals("WechatPay")) { if (payType.equals("WechatPay")) {
HighOrder order = highOrderService.getOrderByOrderNo(map.get("out_trade_no")); HighOrder order = highOrderService.getOrderByOrderNo(map.get("out_trade_no"));
if (order != null && order.getOrderStatus() != 1) { if (order != null && order.getOrderStatus() == 1) {
order.setPaySerialNo(map.get("transaction_id")); // 支付流水号 order.setPaySerialNo(map.get("transaction_id")); // 支付流水号
order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额 order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间

@ -27,7 +27,7 @@ public class KfcOrderService implements PayService {
} }
if (payType.equals("WechatPay")) { if (payType.equals("WechatPay")) {
HighOrder order = highOrderService.getOrderByOrderNo(map.get("out_trade_no")); HighOrder order = highOrderService.getOrderByOrderNo(map.get("out_trade_no"));
if (order != null && order.getOrderStatus() != 1) { if (order != null && order.getOrderStatus() == 1) {
order.setPaySerialNo(map.get("transaction_id")); // 支付流水号 order.setPaySerialNo(map.get("transaction_id")); // 支付流水号
order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额 order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额
order.setPayTime(new Date()); // 支付时间 order.setPayTime(new Date()); // 支付时间

@ -7,6 +7,7 @@ tuanYouGasolineAccount=9b115e5g4400
qinzhuUrl=https://live-test.qianzhu8.com qinzhuUrl=https://live-test.qianzhu8.com
qinzhuPlatformId=10376 qinzhuPlatformId=10376
qinzhuSecret=ktxb49sh2jfhgn8g qinzhuSecret=ktxb49sh2jfhgn8g
qianzhuOrderNotify=https://hsgcs.dctpay.com/crest/qianzhu/orderNotify
wx_cert=/home/project/wx_cert/ wx_cert=/home/project/wx_cert/

@ -7,6 +7,7 @@ tuanYouGasolineAccount=9b115e5g4400
qinzhuUrl=https://live-test.qianzhu8.com/ qinzhuUrl=https://live-test.qianzhu8.com/
qinzhuPlatformId=10376 qinzhuPlatformId=10376
qinzhuSecret=ktxb49sh2jfhgn8g qinzhuSecret=ktxb49sh2jfhgn8g
qianzhuOrderNotify=https://hsg.dctpay.com/crest/qianzhu/orderNotify
wx_cert=/home/project/wx_cert/ wx_cert=/home/project/wx_cert/

Loading…
Cancel
Save