ソースを参照

修改汇聚接口地址

李天标 5 年 前
コミット
83a76f00a9

+ 21 - 4
app-api/src/main/java/com/hboxs/control/api/order/OrderController.java

@@ -19,9 +19,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.io.UnsupportedEncodingException;
+import java.io.*;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.net.URLDecoder;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -50,10 +52,11 @@ public class OrderController extends BaseController {
     private PromoCodeService promoCodeService;
     @Resource(name = "priceServiceImpl")
     private PriceService priceService;
+
     /**
      * 请求在线支付
      *
-     * @param clientId 设备client id
+     * @param clientId    设备client id
      * @param productName 商品名称
      * @param frpCode     支付方式 支付宝:ALIPAY_NATIVE , 微信:WEIXIN_NATIVE
      * @return
@@ -66,7 +69,7 @@ public class OrderController extends BaseController {
         if (!frpCode.equals("ALIPAY_NATIVE") && !frpCode.equals("WEIXIN_NATIVE")) {
             return JsonMessage.error("参数错误");
         }
-        if(equipment==null){
+        if (equipment == null) {
             return JsonMessage.error("找不到设备");
         }
 
@@ -608,7 +611,21 @@ public class OrderController extends BaseController {
         kindData.put("productName" , productName);
 
         PushUtils.push(equipmentService.findByClientId(client).getGtClientId(), "支付成功", "您的订单支付成功", PushUtils.buildJson("pay_success", kindData.toString()).toString());
-
+//        System.out.println("aaaaaaa");
+//        try{
+//            Thread.sleep(5000);
+//        }catch(Exception e){
+//            System.exit(0);//退出程序
+//        }
+//        PushUtils.push(equipmentService.findByClientId(client).getGtClientId(), "支付成功", "您的订单支付成功", PushUtils.buildJson("pay_success", kindData.toString()).toString());
+//        System.out.println("bbbbbbbbbb");
+//        try{
+//            Thread.sleep(5000);
+//        }catch(Exception e){
+//            System.exit(0);//退出程序
+//        }
+//        PushUtils.push(equipmentService.findByClientId(client).getGtClientId(), "支付成功", "您的订单支付成功", PushUtils.buildJson("pay_success", kindData.toString()).toString());
+//        System.out.println("ccccccccccccccc");
     }
 
     @RequestMapping(value = "/send2", method = RequestMethod.GET)

+ 2 - 1
app-service/src/main/java/com/hboxs/service/impl/MchServiceImpl.java

@@ -692,7 +692,8 @@ public class MchServiceImpl extends BaseServiceImpl<Mch, Long> implements MchSer
     @Override
     public String sendCard(Mch mch,String cardPositive,String cardNegative) {
 
-        String url = "https://www.joinpay.com/allocFunds";
+//        String url = "https://www.joinpay.com/allocFunds";
+        String url = "https://upload.joinpay.com/allocFunds";
 
         if(StringUtils.isEmpty(mch.getAlt_mch_no())){
             return "找不到商家编号";

+ 19 - 16
app-service/src/main/java/com/hboxs/service/impl/OrderServiceImpl.java

@@ -276,24 +276,27 @@ public class OrderServiceImpl extends BaseServiceImpl<Order, Long> implements Or
 
         List<OrderTarget> list = new ArrayList<>();
         for (Order order : orders) {
-            OrderTarget orderTarget = new OrderTarget();
-            orderTarget.setSn(order.getSn());
-            orderTarget.setProductName(order.getProductName());
-            orderTarget.setPrice(order.getPrice());
-            orderTarget.setClientId(order.getClientId());
-            orderTarget.setName(adminDao.find(order.getAdminId()).getUsername());
-            orderTarget.setPayDate(order.getPayDate());
-            orderTarget.setRefundDate(order.getRefundDate());
-            orderTarget.setStatus(order.getStatus().toValue());
-            orderTarget.setDistributionDetails(getDistribution(admin, order));
-            if ("WEIXIN_NATIVE".equals(order.getFrp_code())) {
-                order.setFrp_code("微信支付");
-            } else {
-                orderTarget.setFrp_code("支付宝支付");
+            if(!order.getProductName().equals("优惠码")){
+                OrderTarget orderTarget = new OrderTarget();
+                orderTarget.setSn(order.getSn());
+                orderTarget.setProductName(order.getProductName());
+                orderTarget.setPrice(order.getPrice());
+                orderTarget.setClientId(order.getClientId());
+                orderTarget.setName(adminDao.find(order.getAdminId()).getUsername());
+                orderTarget.setPayDate(order.getPayDate());
+                orderTarget.setRefundDate(order.getRefundDate());
+                orderTarget.setStatus(order.getStatus().toValue());
+                orderTarget.setDistributionDetails(getDistribution(admin, order));
+                if ("WEIXIN_NATIVE".equals(order.getFrp_code())) {
+                    order.setFrp_code("微信支付");
+                } else {
+                    orderTarget.setFrp_code("支付宝支付");
+                }
+
+
+                list.add(orderTarget);
             }
 
-
-            list.add(orderTarget);
         }
         return list;
     }