无效代码移除

购物车 规格字段
This commit is contained in:
2024-06-19 15:06:46 +08:00
parent 3d6bf6a0ae
commit 04c5f783bd
17 changed files with 790 additions and 2752 deletions

View File

@@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.exception.MsgException;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
import com.chaozhanggui.system.cashierservice.service.CartService1;
import com.chaozhanggui.system.cashierservice.service.CartService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
@@ -25,7 +25,7 @@ public class CartConsumer {
@Autowired
private RedisUtil redisUtil;
@Autowired
private CartService1 cartService;
private CartService cartService;
@RabbitHandler
@RabbitListener(queues = {"${queue}"})
public void listener(String message) {
@@ -54,16 +54,6 @@ public class CartConsumer {
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")){
cartService.clearCart(jsonObject);
}