Parcourir la source

增加专区商品限制

abiao il y a 5 ans
Parent
commit
2be337a82d

+ 3 - 0
go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

@@ -230,6 +230,9 @@ func (self *OrderController) MultShopCreate() {
 		if product == nil {
 			self.ReturnError(403, apps.NoExist, "", nil)
 		}
+		if product.Ptype != product_model.SHOP_SALE {
+			self.ReturnError(403, apps.NoShopSale, "", nil)
+		}
 
 		//获取商品属性详情
 		sizeName := ""

+ 1 - 0
go/gopath/src/fohow.com/apps/init.go

@@ -33,6 +33,7 @@ var (
 	NoCart                = []string{"noCart", "请选择您需要结算的产品"}
 	NoExist               = []string{"noExist", "不存在"}
 	HasOver               = []string{"hasOver", "已结束"}
+	NoShopSale            = []string{"noShopSale", "该商品非专区商品"}
 	HasPaied              = []string{"hasPaied", "已支付"}
 	AccountError          = []string{"accountError", "账户异常"}
 	GongZhongHaoNoExist   = []string{"gongZhongHaoNoExist", "公众号不存在"}

+ 1 - 0
go/gopath/src/fohow.com/apps/models/product_model/product.go

@@ -20,6 +20,7 @@ const (
 	//商品类型
 	TYPE_USER_SALE   = "user_sale"   //代销
 	TYPE_DIRECT_SALE = "direct_sale" //直营
+	SHOP_SALE        = "shop_sale"   //店铺专区
 
 	SECKILL_NONE_STATE         = "none"
 	SECKILL_NONE_STATE_CN      = "暂无秒杀"