@@ -137,6 +137,10 @@ def live_order_create(request): |
||
137 | 137 |
except: |
138 | 138 |
return response(400001, 'Room Goods Not Found', description='直播间商品不存在') |
139 | 139 |
|
140 |
+ #库存校验 |
|
141 |
+ if room_goods_info.inventory <= 0: |
|
142 |
+ return response(400001, 'Room Goods Not En', description='商品库存不足') |
|
143 |
+ |
|
140 | 144 |
# 金额校验 |
141 | 145 |
try: |
142 | 146 |
goods_info = liveGoodsInfo.objects.get(goods_id=goods_id) |