Pārlūkot izejas kodu

租户系统上传文件修改4

whitefang 1 gadu atpakaļ
vecāks
revīzija
8c84b90708

+ 1 - 1
app/tenantapi/controller/FileController.php

@@ -102,7 +102,7 @@ class FileController extends BaseAdminController
      */
     public function addCate()
     {
-        $params = (new FileValidate())->post()->goCheck('addCate');
+        $params = (new FileValidate())->post()->goCheck('addCate',['tenant_id'=>$this->adminInfo['tenant_id']]);
         FileLogic::addCate($params);
         return $this->success('添加成功', [], 1, 1);
     }

+ 1 - 0
app/tenantapi/logic/FileLogic.php

@@ -86,6 +86,7 @@ class FileLogic extends BaseLogic
     public static function addCate($params)
     {
         TenantFileCate::create([
+            'tenant_id'=> $params['tenant_id'],
             'type' => $params['type'],
             'pid' => $params['pid'],
             'name' => $params['name']