增加查询购物车功能

This commit is contained in:
wangguocheng
2024-05-15 09:42:35 +08:00
parent 383bd5a6cb
commit 6de9614473
3 changed files with 22 additions and 1 deletions

View File

@@ -50,7 +50,9 @@ public class CartConsumer {
throw new MsgException("商品数量错误");
}
cartService.createCart(jsonObject);
}else if(jsonObject.getString("type").equals("createOrder")){
}else if (jsonObject.getString("type").equals("queryCart") ) {
cartService.queryCart(jsonObject);
} else if(jsonObject.getString("type").equals("createOrder")){
String cartDetail = redisUtil.getMessage(RedisCst.TABLE_CART.concat(tableId).concat("-").concat(shopId));
if (StringUtils.isEmpty(cartDetail)){
throw new MsgException("购物车为空无法下单");