mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-05 03:36:39 +08:00
!187 fitler data except H5 data
Merge pull request !187 from Admin/sit-Carl-V3
This commit is contained in:
commit
05785b37fb
@ -90,6 +90,9 @@ public class OrderController {
|
||||
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||
JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
|
||||
|
||||
if (jsonObjectData.getString("udf2") != "H5"){
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.COUPON_USE_FAIL);
|
||||
}
|
||||
ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ? jsonObjectData.getString("discount") : jsonObjectData.getString("couponAmount"));
|
||||
ordersEntity.setCouponCode(jsonObjectData.getString("couponCode"));
|
||||
ordersEntity.setCouponName(jsonObjectData.getString("couponName"));
|
||||
@ -222,7 +225,7 @@ public class OrderController {
|
||||
|
||||
@ApiOperation(value = "微信支付JSAPI订单", notes = "生成JSAPI订单")
|
||||
@PostMapping("royalcanin/generateOrderWXJSAPI")
|
||||
public ResponseDTO<Map<String, String>> generateOrderWXJSAPI(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
||||
public ResponseDTO<Map<String, String>> generateOrderWXJSAPI(@RequestBody List<OrdersEntity> ordersEntityList,String resp) throws Exception {
|
||||
StringBuffer productId = new StringBuffer();
|
||||
StringBuffer productName = new StringBuffer();
|
||||
String memberId = "";
|
||||
@ -293,7 +296,7 @@ public class OrderController {
|
||||
Map<String, String> returnMap = new HashMap<>();
|
||||
returnMap.put("orderNumber",ordersEntity.getOrderNo());
|
||||
returnMap.put("orderAmount",ordersEntity.getOrderAmount());
|
||||
return ResponseDTO.succData(returnMap,wxpayService.dounifiedOrderJSAPI(wxPayEntity));
|
||||
return ResponseDTO.succData(returnMap,wxpayService.dounifiedOrderJSAPI(wxPayEntity,resp));
|
||||
}
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||
}
|
||||
@ -358,7 +361,7 @@ public class OrderController {
|
||||
|
||||
@ApiOperation(value = "重新支付(JSAPI)", notes = "重新支付(JSAPI)")
|
||||
@PostMapping("royalcanin/repayOrderJSAPI")
|
||||
public ResponseDTO<String> repayOrderWXJSAPI(String orderNo) throws Exception {
|
||||
public ResponseDTO<String> repayOrderWXJSAPI(String orderNo,String rsp) throws Exception {
|
||||
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
||||
if(ordersEntity != null){
|
||||
QueryEntity queryEntity = new QueryEntity();
|
||||
@ -371,7 +374,7 @@ public class OrderController {
|
||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||
wxPayEntity.setTotal_fee(jsonObject.getString("salesAmount"));
|
||||
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||
return ResponseDTO.succData(wxpayService.dounifiedOrderJSAPI(wxPayEntity));
|
||||
return ResponseDTO.succData(wxpayService.dounifiedOrderJSAPI(wxPayEntity,rsp));
|
||||
}else {
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR,orderInfo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user