修改校验库存

This commit is contained in:
SongZhang 2024-07-05 11:58:29 +08:00
parent 979e2b3567
commit b16ad91a06
1 changed files with 0 additions and 12 deletions

View File

@ -310,18 +310,6 @@ public class CartService {
Integer buyNum = jsonObject.getInteger("num");
if (buyNum <= 0) {
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("status", "fail");
jsonObject1.put("msg", "参数非法");
jsonObject1.put("data", new ArrayList<>());
jsonObject1.put("reqData", jsonObject);
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), key, jsonObject.getString("userId"), true);
log.error("参数非法 productId:{}", productId);
throw new MsgException("该商品已售罄");
}
String skuId = jsonObject.getString("skuId");
if (tbProduct.getIsStock() == 1) {
// 1:共享库存 0:独立库存