|
@@ -70,7 +70,7 @@ public class AppPayController extends BaseController {
|
|
if (null == orderInfo) {
|
|
if (null == orderInfo) {
|
|
return Result.failure("订单不存在");
|
|
return Result.failure("订单不存在");
|
|
}
|
|
}
|
|
- if(OrderPayStatusEnum.PAY_SUCCESS.getStatus().compareTo(orderInfo.getPayStatus()) == 0){
|
|
|
|
|
|
+ if(null != orderInfo.getStatus() && OrderPayStatusEnum.PAY_SUCCESS.getStatus().compareTo(orderInfo.getPayStatus()) == 0){
|
|
return Result.failure("订单已经支付过了,无需重复支付");
|
|
return Result.failure("订单已经支付过了,无需重复支付");
|
|
}
|
|
}
|
|
String nonceStr = DataUtils.getRandomString(32);
|
|
String nonceStr = DataUtils.getRandomString(32);
|
|
@@ -202,6 +202,9 @@ public class AppPayController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
TmOrder orderDetail = tmOrderService.getById(orderId);
|
|
TmOrder orderDetail = tmOrderService.getById(orderId);
|
|
|
|
+ if(null == orderDetail){
|
|
|
|
+ return Result.failure("订单获取失败");
|
|
|
|
+ }
|
|
Map<Object, Object> parame = new TreeMap<Object, Object>();
|
|
Map<Object, Object> parame = new TreeMap<Object, Object>();
|
|
parame.put("appid", ResourceUtil.getConfigByName("wx.appId"));
|
|
parame.put("appid", ResourceUtil.getConfigByName("wx.appId"));
|
|
// 商家账号。
|
|
// 商家账号。
|