查询省市

会员关联
桌码绑定新的 旧的清除
This commit is contained in:
2024-06-13 09:35:21 +08:00
parent c34518631b
commit 6ab2a32c9f
18 changed files with 189 additions and 90 deletions

View File

@@ -53,16 +53,18 @@ 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")){
}
// 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);
}
} catch (Exception e) {