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