|
|
@@ -24,6 +24,9 @@ func (self *OrderController) CreateCart() {
|
|
|
if product == nil {
|
|
|
self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
}
|
|
|
+ if count > product.Count {
|
|
|
+ self.ReturnError(403, apps.ProductStockNotEnough, "", nil)
|
|
|
+ }
|
|
|
uId := self.GetCurrentUserId()
|
|
|
wxUId := self.GetCurrentWxUserId()
|
|
|
|