mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-01 17:56:39 +08:00
commit
47982a5126
@ -437,7 +437,7 @@ public class OrderService {
|
||||
orderDatilListJson = (JSONArray) resultMap.get("orderDatilListJson");
|
||||
//得到当前能用优惠券的商品总金额
|
||||
BigDecimal total_Coupon = (BigDecimal) resultMap.get("total_Coupon");
|
||||
BigDecimal minCount = (BigDecimal) resultMap.get("minCount");
|
||||
int minCount = (int) resultMap.get("minCount");
|
||||
|
||||
//校验当前订单金额小于优惠券金额
|
||||
if(jsonObjectData.getString("couponAmount") != null ){
|
||||
@ -449,7 +449,8 @@ public class OrderService {
|
||||
|
||||
//校验当前指定商品的总数量有没有大于等于minCount
|
||||
if(jsonObjectData.getString("minCount") != null ){
|
||||
if(minCount.compareTo(new BigDecimal(jsonObjectData.getString("minCount"))) == -1){
|
||||
int count = Integer.parseInt(jsonObjectData.getString("minCount"));
|
||||
if(minCount < count ){
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.COUPON_USE_FAIL);
|
||||
}
|
||||
}
|
||||
@ -563,7 +564,7 @@ public class OrderService {
|
||||
orderDatilListJson = (JSONArray) resultMap.get("orderDatilListJson");
|
||||
//得到当前能用优惠券的商品总金额
|
||||
BigDecimal total_Coupon = (BigDecimal) resultMap.get("total_Coupon");
|
||||
BigDecimal minCount = (BigDecimal) resultMap.get("minCount");
|
||||
int minCount = (int) resultMap.get("minCount");
|
||||
|
||||
//校验当前订单金额小于优惠券金额
|
||||
if(jsonObjectData.getString("couponAmount") != null ){
|
||||
@ -574,7 +575,8 @@ public class OrderService {
|
||||
}
|
||||
//校验当前指定商品的总数量有没有大于等于minCount
|
||||
if(jsonObjectData.getString("minCount") != null ){
|
||||
if(minCount.compareTo(new BigDecimal(jsonObjectData.getString("minCount"))) == -1){
|
||||
int count = Integer.parseInt(jsonObjectData.getString("minCount"));
|
||||
if(minCount < count ){
|
||||
return ResponseDTO.wrap(OrderResponseCodeConst.COUPON_USE_FAIL);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user