shish пре 2 година
родитељ
комит
a48575e5a3
1 измењених фајлова са 6 додато и 4 уклоњено
  1. 6 4
      app-ghs/controllers/ItemController.php

+ 6 - 4
app-ghs/controllers/ItemController.php

@@ -178,18 +178,20 @@ class ItemController extends BaseController
                         $needCgList[$biProductId] = $biInfo->needCgNum;
                     }
                 }
-                print_r($myIds);die;
                 if ($globalCgMyCharge == 1) {
-                    if(!empty($myIds)){
+                    if (!empty($myIds)) {
                         $where['id'] = ['in', $myIds];
-                    }else{
+                    } else {
                         $where['id'] = ['in', [0]];
                     }
                 }
+            } else {
+                if ($globalCgMyCharge == 1) {
+                    $where['id'] = ['in', [0]];
+                }
             }
         }
 
-
         $result = ProductClass::getList($field, $where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC]);
         $list = $result['list'] ?? [];
         if ($requestType == 'hasStockList') {