From 4143b201e989ad70c221644ae06ba96c5f9fd3ea Mon Sep 17 00:00:00 2001
From: zhangzy <15710074375@163.com>
Date: 星期三, 07 四月 2021 15:03:42 +0800
Subject: [PATCH] 相册修改

---
 app/Http/Controllers/Api/v1/AlbumController.php    |    8 ++++----
 app/Http/Controllers/Api/v1/ArchivesController.php |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/Http/Controllers/Api/v1/AlbumController.php b/app/Http/Controllers/Api/v1/AlbumController.php
index d5652da..adf879a 100644
--- a/app/Http/Controllers/Api/v1/AlbumController.php
+++ b/app/Http/Controllers/Api/v1/AlbumController.php
@@ -29,7 +29,7 @@
         $rule = [
             'classCode' => 'required|integer|min:1',
             'orgId' => 'required|integer|min:1',
-            'roleId' => 'required|integer|min:1',
+            'roleId' => 'required|string',
         ];
         $error = $this->_validate($request, $rule);
         if(!empty($error))
@@ -41,7 +41,7 @@
             'isDel' => 0,
         ];
         $param = $request->all();
-        if($request->roleId == 2026)
+        if(in_array("2026",explode(',',$request->roleId)))
         {
             $list = DB::table('anni_album as a')
                 ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
@@ -185,7 +185,7 @@
     {
         $rule = [
             'orgId' => 'required|integer|min:1',
-            'roleId' => 'required|integer|min:1',
+            'roleId' => 'required|string',
         ];
         $error = $this->_validate($request, $rule);
         if(!empty($error))
@@ -197,7 +197,7 @@
             'isDel' => 0,
         ];
         $param = $request->all();
-        if($request->roleId = 2026)
+        if(in_array("2026",explode(',',$request->roleId)))
         {
             $query = DB::table('anni_album as a')
                 ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
diff --git a/app/Http/Controllers/Api/v1/ArchivesController.php b/app/Http/Controllers/Api/v1/ArchivesController.php
index 2d9d634..5e622b2 100644
--- a/app/Http/Controllers/Api/v1/ArchivesController.php
+++ b/app/Http/Controllers/Api/v1/ArchivesController.php
@@ -48,7 +48,7 @@
             #'studentId' => $request->studentId,
             'isDel' => 0
         ];
-        if(isset($request->classCode) && !empty($request->classCode))
+        if(isset($request->classCode) && !empty($request->classCode)    )
         {
             $where['classCode'] = $request->classCode;
         }

--
Gitblit v1.8.0