Kaynağa Gözat

价格控制

shish 3 yıl önce
ebeveyn
işleme
7914a0a91b
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      app-ghs/controllers/ProductController.php

+ 5 - 2
app-ghs/controllers/ProductController.php

@@ -630,8 +630,11 @@ class ProductController extends BaseController
                 if (isset($productInfo->mainId) == false || $productInfo->mainId != $this->mainId) {
                     util::fail('没有权限访问');
                 }
-                if (empty($price)) {
-                    continue;
+                if ($hjPrice > $price) {
+                    util::fail($productName . '会员价大于批发价');
+                }
+                if ($price > $skPrice) {
+                    util::fail($productName . '批发价大于零售价');
                 }
                 $ptItemId = $productInfo->itemId;
                 ProductClass::changeSinglePrice($shop, $ptItemId, $price, $skPrice, $hjPrice, $changeParams);