mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
bug fix
This commit is contained in:
parent
fe641bb3c5
commit
728f9b69c9
@ -85,7 +85,7 @@ public class OrderController {
|
|||||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||||
memberId = ordersEntitys.getMemberId();
|
memberId = ordersEntitys.getMemberId();
|
||||||
mobile = ordersEntitys.getPhoneNumber();
|
mobile = ordersEntitys.getPhoneNumber();
|
||||||
buyCount = buyCount + ordersEntitys.getBuyCount();
|
buyCount = buyCount + ordersEntitys.getBuyCount();1
|
||||||
}
|
}
|
||||||
ordersEntity.setOrderAddress(orderAddress);
|
ordersEntity.setOrderAddress(orderAddress);
|
||||||
ordersEntity.setProductCode(productId.substring(0,productId.length()-1));
|
ordersEntity.setProductCode(productId.substring(0,productId.length()-1));
|
||||||
@ -175,12 +175,12 @@ public class OrderController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("royalcanin/updateOrderAliPay")
|
@PostMapping("royalcanin/updateOrderAliPay")
|
||||||
public String alipayNotify(HttpServletRequest request) throws Exception {
|
public ResponseDTO<String> alipayNotify(HttpServletRequest request) throws Exception {
|
||||||
// 获取支付宝的请求信息
|
// 获取支付宝的请求信息
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
Map<String, String[]> requestParams = request.getParameterMap();
|
Map<String, String[]> requestParams = request.getParameterMap();
|
||||||
if(requestParams.isEmpty()) {
|
if(requestParams.isEmpty()) {
|
||||||
return "failure";
|
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
|
||||||
}
|
}
|
||||||
// 将 Map<String,String[]> 转为 Map<String,String>
|
// 将 Map<String,String[]> 转为 Map<String,String>
|
||||||
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
||||||
@ -197,8 +197,10 @@ public class OrderController {
|
|||||||
// 验签通过
|
// 验签通过
|
||||||
if (signVerified) {
|
if (signVerified) {
|
||||||
//支付成功后进行操作
|
//支付成功后进行操作
|
||||||
|
aliPayService.orderCallBackAliPay(map.get("out_trade_no"),map.get("total_amount"));
|
||||||
|
return ResponseDTO.succ();
|
||||||
}
|
}
|
||||||
return "failure";
|
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user