ソースを参照

three depart edit

abiao 4 年 前
コミット
8e4cca06fa
共有1 個のファイルを変更した4 個の追加1 個の削除を含む
  1. 4 1
      go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

+ 4 - 1
go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

@@ -298,9 +298,12 @@ func (self *OrderController) MultShopCreate() {
 		if product == nil {
 			self.ReturnError(403, apps.NoExist, "", nil)
 		}
-		if product.Ptype != product_model.SHOP_SALE {
+		//专区商品改为判断主商品
+		relatePrd := product_model.GetProductById(product.RelateProductId, true)
+		if relatePrd != nil && relatePrd.Ptype != product_model.SHOP_SALE {
 			self.ReturnError(403, apps.NoShopSale, "", nil)
 		}
+
 		if product.SinglePurchLimit > 0 {
 			if product.SinglePurchLimit < cNums {
 				self.ReturnError(403, []string{apps.SingleOverLimitCount[0], fmt.Sprintf("%s商品单次限购%d件", product.Name, product.SinglePurchLimit)}, "", nil)