Althars123 пре 3 година
родитељ
комит
ba4fb47887

+ 1 - 1
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxController.java

@@ -109,7 +109,7 @@ public class WxController extends BaseController {
         Double dprice = Double.valueOf(values[0]);
         Double v =dprice* 100;
         order.setTotal(v.intValue());
-//        order.setOrderDataJson(values[2]);
+        order.setOrderDataJson(values[2]);
         return order;
     }
 

+ 2 - 0
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxNotifyController.java

@@ -85,6 +85,8 @@ public class WxNotifyController {
 
 
 
+
+
     private String getBodyString(HttpServletRequest request) {
             BufferedReader br = null;
             StringBuilder sb = new StringBuilder("");

+ 4 - 4
twzd-admin/src/main/java/com/miaxis/app/controller/wx/XcxWxController.java

@@ -72,8 +72,8 @@ public class XcxWxController extends BaseController {
 
     @Value("${xcx.appId}")
     private String appId;
-    @Value("${wxpay.xcxNotifyUrl}")
-    private  String xcxNotifyUrl ;
+    @Value("${wxpay.notifyUrl}")
+    private  String notifyUrl ;
 
 
 
@@ -90,7 +90,7 @@ public class XcxWxController extends BaseController {
         //创建本地微信订单
         WxOrder order = createOrder(values);
         wxOrderService.save(order);
-        return Response.success(placeWxOrder(order, sysDictData.getDictLabel(),xcxNotifyUrl));
+        return Response.success(placeWxOrder(order, sysDictData.getDictLabel(),notifyUrl));
 
 
     }
@@ -105,7 +105,7 @@ public class XcxWxController extends BaseController {
         Double dprice = Double.valueOf(values[0]);
         Double v =dprice* 100;
         order.setTotal(v.intValue());
-        //order.setOrderDataJson(values[2]);
+        order.setOrderDataJson(values[2]);
         return order;
     }
 

+ 2 - 2
twzd-admin/src/main/resources/application-dev.yml

@@ -99,8 +99,8 @@ wxpay:
     v3key: 8604f2a6eb6338cfa64e7df4ec2c08b3
     notifyUrl: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/wxpay
     notifyUrlRefund: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/refund
-    xcxNotifyUrl: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/wxpay
-    xcxNotifyUrlRefund: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/refund
+    xcxNotifyUrl: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/xcxWxpay
+    xcxNotifyUrlRefund: http://1.15.26.233:8080/twzd-admin/open-api/wx/notify/xcxRefund
     appId: wx67ca1b8c9816ef28
 
 # 腾讯cos

+ 2 - 2
twzd-admin/src/main/resources/application-prod.yml

@@ -97,8 +97,8 @@ wxpay:
     v3key: 8604f2a6eb6338cfa64e7df4ec2c08b3
     notifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/wxpay
     notifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/refund
-    xcxNotifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/wxpay
-    xcxNotifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/refund
+    xcxNotifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/xcxWxpay
+    xcxNotifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/xcxRefund
 
 
 # 腾讯cos

+ 2 - 2
twzd-admin/src/main/resources/application-prodtest.yml

@@ -97,8 +97,8 @@ wxpay:
     v3key: 8604f2a6eb6338cfa64e7df4ec2c08b3
     notifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/wxpay
     notifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/refund
-    xcxNotifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/wxpay
-    xcxNotifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/refund
+    xcxNotifyUrl: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/xcxWxpay
+    xcxNotifyUrlRefund: http://jpcj-h5.zzxcx.net/prod-api/open-api/wx/notify/xcxRefund
 
 
 # 腾讯cos

+ 6 - 3
twzd-service/src/main/java/com/miaxis/wx/service/impl/WxOrderServiceImpl.java

@@ -284,10 +284,13 @@ public class WxOrderServiceImpl extends ServiceImpl<WxOrderMapper, WxOrder> impl
         userInfoService.updateById(userinfo);
 
         //发送模板消息
-        messageTemplateSend(userinfo,wxOrder);
+        if (wxOrder.getOpenid()!=null){
+            messageTemplateSend(userinfo,wxOrder);
+
+            // 分成
+            wxExtensionIncomeService.addExtensionIncomeBySourceId(wxOrder.getOutTradeNo(),wxOrder.getOpenid(),wxOrder.getTotal());
+        }
 
-        // 分成
-        wxExtensionIncomeService.addExtensionIncomeBySourceId(wxOrder.getOutTradeNo(),wxOrder.getOpenid(),wxOrder.getTotal());
 
     }