扫码点餐部分
This commit is contained in:
@@ -36,12 +36,14 @@ public class CartConsumer {
|
||||
String shopId = jsonObject.getString("shopId");
|
||||
if (jsonObject.getString("type").equals("initCart") ) {
|
||||
cartService.initCart(jsonObject);
|
||||
}else if (jsonObject.getString("type").equals("addcart") ) {
|
||||
if (!jsonObject.containsKey("num")) {
|
||||
throw new MsgException("商品数量错误");
|
||||
}
|
||||
cartService.createCart(jsonObject);
|
||||
}else if (jsonObject.getString("type").equals("queryCart") ) {
|
||||
}
|
||||
// else if (jsonObject.getString("type").equals("addcart") ) {
|
||||
// if (!jsonObject.containsKey("num")) {
|
||||
// throw new MsgException("商品数量错误");
|
||||
// }
|
||||
// cartService.createCart(jsonObject);
|
||||
// }
|
||||
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));
|
||||
@@ -54,9 +56,9 @@ public class CartConsumer {
|
||||
cartService.createOrder(jsonObject);
|
||||
}
|
||||
}
|
||||
else if(jsonObject.getString("type").equals("clearCart")){
|
||||
cartService.clearCart(jsonObject);
|
||||
}
|
||||
// else if(jsonObject.getString("type").equals("clearCart")){
|
||||
// cartService.clearCart(jsonObject);
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
log.info("数据处理失败:{}",e.getMessage());
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user