|
|
@ -89,12 +89,14 @@ public class OrderController { |
|
|
|
} |
|
|
|
} |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(reqBodyStr); |
|
|
|
JSONObject jsonObject = JSONObject.parseObject(reqBodyStr); |
|
|
|
Long orderId = jsonObject.getLong("orderId"); |
|
|
|
Long orderId = jsonObject.getLong("orderId"); |
|
|
|
|
|
|
|
String orderType = jsonObject.getString("orderScene"); // 订单类型
|
|
|
|
String openId = jsonObject.getString("openId"); // openId
|
|
|
|
String openId = jsonObject.getString("openId"); // openId
|
|
|
|
if ( orderId == null || StringUtils.isBlank(openId)) { |
|
|
|
if ( orderId == null || StringUtils.isBlank(orderType) || StringUtils.isBlank(openId)) { |
|
|
|
log.error("orderToPay error!", "参数错误"); |
|
|
|
log.error("orderToPay error!", "参数错误"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HighOrder order = highOrderService.getOrderById(orderId); |
|
|
|
HighOrder order = highOrderService.getOrderById(orderId); |
|
|
|
if(order == null) { |
|
|
|
if(order == null) { |
|
|
|
log.error("OrderController --> orderToPay() ERROR", "未找到订单信息"); |
|
|
|
log.error("OrderController --> orderToPay() ERROR", "未找到订单信息"); |
|
|
@ -142,7 +144,7 @@ public class OrderController { |
|
|
|
weChatPayReqInfo.setSpbill_create_ip("139.159.177.244"); //终端ip
|
|
|
|
weChatPayReqInfo.setSpbill_create_ip("139.159.177.244"); //终端ip
|
|
|
|
weChatPayReqInfo.setNotify_url(SysConst.getSysConfig().getNotifyUrl()); //通知url
|
|
|
|
weChatPayReqInfo.setNotify_url(SysConst.getSysConfig().getNotifyUrl()); //通知url
|
|
|
|
weChatPayReqInfo.setTrade_type("JSAPI"); //交易类型
|
|
|
|
weChatPayReqInfo.setTrade_type("JSAPI"); //交易类型
|
|
|
|
// weChatPayReqInfo.setAttach(map.get("orderScene").toString()); //附加数据,区分订单类型
|
|
|
|
weChatPayReqInfo.setAttach(map.get("orderScene").toString()); //附加数据,区分订单类型
|
|
|
|
Map<String,String> payMap = new HashMap<>(); |
|
|
|
Map<String,String> payMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
payMap.put("app_id",SysConst.getSysConfig().getWxSubAppId()); |
|
|
|
payMap.put("app_id",SysConst.getSysConfig().getWxSubAppId()); |
|
|
|