进店即会员 取消

长链接 异常打印
This commit is contained in:
2024-05-31 10:18:40 +08:00
parent c403b69102
commit c81a2106d0
5 changed files with 104 additions and 92 deletions

View File

@@ -44,6 +44,13 @@ public class CartConsumer {
} else if(jsonObject.getString("type").equals("createOrder")){
String cartDetail = redisUtil.getMessage(RedisCst.TABLE_CART.concat(tableId).concat("-").concat(shopId));
if (StringUtils.isEmpty(cartDetail)){
log.info("createOrder购物车为空");
// JSONObject jsonObject1 = new JSONObject();
// jsonObject1.put("status", "success");
// jsonObject1.put("msg", "订单已存在");
// jsonObject1.put("type", jsonObject.getString("type"));
// jsonObject1.put("data", "{\"id\": \"-1\"}");
// AppWebSocketServer.AppSendInfo(jsonObject1,tableId+"-"+shopId, jsonObject.getString("userId"), true);
throw new MsgException("购物车为空无法下单");
}
JSONArray array = JSON.parseArray(cartDetail);