|
@@ -88,10 +88,12 @@ public class TOrderController {
|
|
|
// req.getRequestDispatcher(weixin).forward(req,resp);
|
|
|
// resp.sendRedirect(redirect:weixin);
|
|
|
return "redirect:"+wx;
|
|
|
+// return wx;
|
|
|
}else if(userAgent.contains("AlipayClient")){ // 支付宝
|
|
|
// resp.sendRedirect("https://qr.alipay.com/bax04313rso7xxpoizgx258a");
|
|
|
// resp.sendRedirect(apipay);
|
|
|
return "redirect:"+zfb;
|
|
|
+// return zfb;
|
|
|
}
|
|
|
// resp.sendRedirect(weixin);
|
|
|
return "请使用支付宝或微信扫码!";
|
|
@@ -193,7 +195,7 @@ public class TOrderController {
|
|
|
price = new BigDecimal(pri);
|
|
|
}
|
|
|
|
|
|
- if(code!=null){
|
|
|
+ if(StringUtils.isNotEmpty(code)){
|
|
|
BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
|
|
|
price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
|
|
|
}
|
|
@@ -592,7 +594,7 @@ public class TOrderController {
|
|
|
if(StringUtils.isNotEmpty(pri)){
|
|
|
price = new BigDecimal(pri);
|
|
|
}
|
|
|
- if(code!=null){
|
|
|
+ if(StringUtils.isNotEmpty(code)){
|
|
|
BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
|
|
|
price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
|
|
|
}
|
|
@@ -983,7 +985,7 @@ public class TOrderController {
|
|
|
return JsonMessage.error("找不到商品");
|
|
|
}
|
|
|
BigDecimal price = product.getRmbPrice();
|
|
|
- if(code!=null){
|
|
|
+ if(StringUtils.isNotEmpty(code)){
|
|
|
BigDecimal discount = BigDecimal.valueOf(promoCode.getDiscount());
|
|
|
price = product.getRmbPrice().multiply(discount).divide(new BigDecimal(10)).setScale(2, RoundingMode.HALF_DOWN);
|
|
|
}
|
|
@@ -1313,7 +1315,8 @@ public class TOrderController {
|
|
|
|
|
|
// 汇聚支付支付申请返回支付二维码图片
|
|
|
|
|
|
- String code1 = "http://app.sunzee.com.cn/"+"/api/order/aliPay.htm?wx="+rc_Result1+"&zfb="+rc_Result2;
|
|
|
+// String code1 = "http://app.sunzee.com.cn/"+"/api/order/aliPay.htm?wx="+rc_Result1+"&zfb="+rc_Result2;
|
|
|
+ String code1 = "http://szwltest.sunzee.com.cn:49002/PAY-SERVER/tOrder/"+"aliPay?wx="+rc_Result1+"&zfb="+rc_Result2;
|
|
|
String rd_Pic = toQrcode(code1);
|
|
|
JSONObject kindData = new JSONObject();
|
|
|
kindData.put("sn", sn1+"-"+sn2);
|
|
@@ -2316,7 +2319,7 @@ public class TOrderController {
|
|
|
}
|
|
|
@ApiOperation(value = "获取订单")
|
|
|
@GetMapping("/getOrder")
|
|
|
- public ResponseModel<?> getOrder(String id) {
|
|
|
+ public ResponseModel<?> getOrder(@RequestParam String id) {
|
|
|
TOrder order = orderService.getById(id);
|
|
|
return R.ok(order);
|
|
|
}
|