瀏覽代碼

提现限制

Kirin 2 年之前
父節點
當前提交
8678006d4d
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      app/admin/model/system/SystemStore.php

+ 8 - 1
app/admin/model/system/SystemStore.php

@@ -92,7 +92,14 @@ class SystemStore extends BaseModel
             $model = $model->where('id|name|introduction', 'like', '%' . $where['name'] . '%');
         }
         if (isset($where['cid']) && $where['cid'] != '') {
-            $model = $model->where('find_in_set("'.$where['cid'].'",cid)');
+            $cid = $where['cid'];
+            $model = $model->where(function ($query) use ($cid) {
+                $query->where('find_in_set("' . $cid . '",cid)');
+                $cids = SystemStoreCategory::where('pid', $cid)->column('id');
+                foreach ($cids as $v) {
+                    $query->whereOr('find_in_set("' . $v . '",cid)');
+                }
+            });
         }
         if (isset($where['type']) && $where['type'] != '' && ($data = self::setData($where['type']))) {
             $model = $model->where($data);