就餐模式获取修改
This commit is contained in:
@@ -52,17 +52,7 @@ public class CartConsumer {
|
||||
else if (jsonObject.getString("type").equals("queryCart") ) {
|
||||
cartService.queryCart(jsonObject);
|
||||
} else if(jsonObject.getString("type").equals("createOrder")){
|
||||
ShopEatTypeInfoDTO eatModel = shopUtils.getEatModel(tableId, shopId);
|
||||
String tableCartKey = RedisCst.getTableCartKey(shopId, eatModel.isOpenDineIn() ? tableId : null, userId);
|
||||
String cartDetail = redisUtil.getMessage(tableCartKey);
|
||||
if (StringUtils.isEmpty(cartDetail)){
|
||||
log.info("createOrder购物车为空");
|
||||
throw new MsgException("购物车为空无法下单");
|
||||
}
|
||||
JSONArray array = JSON.parseArray(cartDetail);
|
||||
if (!array.isEmpty()){
|
||||
cartService.createOrder(jsonObject);
|
||||
}
|
||||
cartService.createOrder(jsonObject);
|
||||
}
|
||||
// else if(jsonObject.getString("type").equals("clearCart")){
|
||||
// cartService.clearCart(jsonObject);
|
||||
|
||||
Reference in New Issue
Block a user