diff --git a/hai-cweb/src/main/java/com/cweb/controller/WechatController.java b/hai-cweb/src/main/java/com/cweb/controller/WechatController.java index 982a03d6..de09c6c3 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/WechatController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/WechatController.java @@ -139,6 +139,7 @@ public class WechatController { user.setPhone(phoneNoInfo.getPurePhoneNumber()); highUserService.insertUser(user); } else { + user.setPhone(phoneNoInfo.getPurePhoneNumber()); user.setOpenId(openId);; highUserService.updateUser(user); } diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java index 08ff6b59..28ee5cc5 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java @@ -89,9 +89,9 @@ public class OrderController { } JSONObject jsonObject = JSONObject.parseObject(reqBodyStr); Long orderId = jsonObject.getLong("orderId"); - String orderType = jsonObject.getString("orderScene"); // 订单类型 + String orderScene = jsonObject.getString("orderScene"); // 订单类型 String openId = jsonObject.getString("openId"); // openId - if ( orderId == null || StringUtils.isBlank(orderType) || StringUtils.isBlank(openId)) { + if ( orderId == null || StringUtils.isBlank(orderScene) || StringUtils.isBlank(openId)) { log.error("orderToPay error!", "参数错误"); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } @@ -109,7 +109,7 @@ public class OrderController { // 商品类型 1:卡卷 2:金币充值 for (HighChildOrder childOrder : order.getHighChildOrderList()) { - if (childOrder.getGoodsType() == 2) { + if (childOrder.getGoodsType() == 1) { HighCouponModel coupon = highCouponService.getCouponById(childOrder.getGoodsId()); // 支付类型:1.微信支付 2.金币支付 if (coupon.getPayType() != 1) { @@ -122,6 +122,7 @@ public class OrderController { Map map = new HashMap<>(); map.put("orderNo", order.getOrderNo()); map.put("payPrice", order.getPayPrice()); + map.put("orderScene", orderScene); map.put("body","购买卡券"); map.put("subject","购买卡券"); 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 b7229a64..9192519b 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,7 @@ public class WechatPayController { String notifyXml = null; // 微信支付系统发送的数据(格式) notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8"); - if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) { + /*if (SignatureUtil.reCheckIsSignValidFromWeiXin(notifyXml, SysConst.getSysConfig().getWxApiKey(), "UTF-8")) { log.info("微信支付系统发送的数据:" + notifyXml); SortedMap map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8"); @@ -56,7 +56,7 @@ public class WechatPayController { log.error("返回信息:" + notifyXml); resXml = "" + "" + "" + " "; - } + }*/ BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream()); out.write(resXml.getBytes());