修改优惠券面额逻辑

This commit is contained in:
wangguocheng
2024-05-14 09:14:12 +08:00
parent 6f6d1c3a7b
commit a654cff84d
6 changed files with 237 additions and 6 deletions

View File

@@ -59,6 +59,15 @@ public class CartConsumer {
if (array.size() > 0){
cartService.createOrder(jsonObject);
}
}else if(jsonObject.getString("type").equals("pendingOrder")){
String cartDetail = redisUtil.getMessage(RedisCst.TABLE_CART.concat(tableId).concat("-").concat(shopId));
if (StringUtils.isEmpty(cartDetail)){
throw new MsgException("购物车为空无法下单");
}
JSONArray array = JSON.parseArray(cartDetail);
if (array.size() > 0){
cartService.pendingOrder(jsonObject);
}
}else if(jsonObject.getString("type").equals("clearCart")){
cartService.clearCart(jsonObject);
}