shish 3 years ago
parent
commit
f47e9adcc0
2 changed files with 4 additions and 4 deletions
  1. 3 3
      app-ghs/controllers/ItemController.php
  2. 1 1
      biz-ghs/item/classes/ItemClass.php

+ 3 - 3
app-ghs/controllers/ItemController.php

@@ -320,9 +320,9 @@ class ItemController extends BaseController
         $get = Yii::$app->request->get();
         $customId = $get['customId'] ?? 0;
         $custom = CustomClass::getById($customId, true);
-        if ($custom->ownMainId != $this->mainId) {
-            util::fail('不是你的客户');
-        }
+//        if ($custom->ownMainId != $this->mainId) {
+//            util::fail('不是你的客户');
+//        }
 
         $where['mainId'] = $this->mainId;
         $where['delStatus'] = 0;

+ 1 - 1
biz-ghs/item/classes/ItemClass.php

@@ -190,7 +190,7 @@ class ItemClass extends BaseClass
 
     public static function getShowList($where, $custom)
     {
-        $level = $custom->level ?? 1;
+        $level = isset($custom->level) ? $custom->level : 1;
         $field = 'id,cover,name,cost,itemId,classId,property,skPrice,variety,price,hjPrice,discountPrice,stock,stockWarning,presell,ratioType,smallRatio,smallUnit,bigUnit,ratio,hjAddPrice,addPrice';
         $list = self::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], $field);
         if (empty($list)) {