diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java index 9192519b..7908936e 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java @@ -45,7 +45,12 @@ public class WechatPayController { String notifyXml = null; // 微信支付系统发送的数据(格式) notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8"); - /*if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) { + log.info("微信支付系统发送的数据:" + notifyXml); + SortedMap map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8"); + + resXml = notifyService.wechatNotify(map); + +/* if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) { log.info("微信支付系统发送的数据:" + notifyXml); SortedMap map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8"); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java index fd8f8a3c..7c3a531a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java @@ -116,6 +116,7 @@ public class HighUserServiceImpl implements HighUserService { } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户金币处理异常"); } + highUserMapper.updateByPrimaryKey(user); HighGoldRec highGoldRec = new HighGoldRec(); highGoldRec.setUserId(user.getId()); diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/NotifyServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/NotifyServiceImpl.java index c81c165c..d8cd592b 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/NotifyServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/NotifyServiceImpl.java @@ -75,10 +75,8 @@ public class NotifyServiceImpl implements NotifyService { if ("SUCCESS".equals(paramsMap.get("return_code")) && "SUCCESS".equals(paramsMap.get("result_code"))) { log.info("微信支付 -> 异步通知:支付成功,进入订单处理"); - String orderScene = paramsMap.get("attach"); - JSONObject object = JSONObject.parseObject(orderScene); // 订单类型 - String orderType = object.getString("orderScene"); + String orderType = paramsMap.get("attach"); PayService payService = getPayService(orderType); if (payService != null) { payService.paySuccess(paramsMap, "WechatPay"); // 商户内部实际的交易业务处理