liumiao
2021-04-12 74b470337e4499a3a5efdfbbd49229ab97d82d77
Merge remote-tracking branch 'origin/origin/develop' into pre-release
9 files added
2 files modified
10867 ■■■■■ changed files
app/Http/Controllers/Api/v1/AlbumContentController.php 242 ●●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/AlbumController.php 240 ●●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/ArchivesController.php 215 ●●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/FaceController.php 2 ●●● patch | view | raw | blame | history
app/Models/AlbumContentModel.php 23 ●●●●● patch | view | raw | blame | history
app/Models/AlbumFilesModel.php 23 ●●●●● patch | view | raw | blame | history
app/Models/AlbumModel.php 23 ●●●●● patch | view | raw | blame | history
app/Models/ArchivesFilesModel.php 23 ●●●●● patch | view | raw | blame | history
app/Models/ArchivesModel.php 23 ●●●●● patch | view | raw | blame | history
package-lock.json 10039 ●●●●● patch | view | raw | blame | history
routes/api.php 14 ●●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/AlbumContentController.php
New file
@@ -0,0 +1,242 @@
<?php
/**
 * Created by 相册内容.
 * User: zzy
 * Date: 2021/2/24
 * Time: 11:12
 */
namespace App\Http\Controllers\Api\v1;
use App\Http\Controllers\ApiController;
use App\Common\ResponseCode;
use App\Models\AlbumContentModel;
use App\Models\AlbumFilesModel;
use App\Models\AlbumModel;
use App\Models\FaceAttendanceModel;
use Illuminate\Http\Request;
use Validator;
use Illuminate\Support\Facades\DB;
class AlbumContentController extends ApiController
{
    /**
     * 相册详情
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function showList(Request $request)
    {
        $rule = [
            'classCode' => 'required|integer|min:1',
            'aid' => 'required|string',
            'orgId' => 'required|integer|min:1',
            'roleId' => 'required|integer|min:1',
            'page' => 'required|integer|min:1',
            'pageSize' => 'required|integer|min:1',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $param = $request->all();
        $where = [
            'aid' => $request->aid,
            'classCode' => $request->classCode,
        ];
        $currentPage = $param['page'];
        $perage = $param['pageSize'];
        $limitprame = ($currentPage - 1) * $perage;
        $param = $request->all();
        if($request->roleId == 2026)
        {
            $query = AlbumContentModel::where($where);
            $total_nums = $query->count();
            $list = $query->orderBy('id', 'desc')->skip($limitprame)->take($perage)->get()->toArray();
        }
        else
        {
            $query = AlbumContentModel::where($where)->orWhere(function ($query) use ($where, $param) {
                $where['orgId'] = $param['orgId'];
                $where['teacherId'] = $param['teacherId'];
                $where['jurisdiction'] = 3;
                $query->where($where);
            });
            $total_nums = $query->count();
            $list = $query->orderBy('id', 'desc')->skip($limitprame)->take($perage)->get()->toArray();
        }
        foreach($list as $k => $v)
        {
            $fileList = AlbumFilesModel::where('acid', '=', $v['id'])->get()->toArray();
            foreach($fileList as $k1 => $v1)
            {
                $fileList[$k1]['httpUrl'] = $this->fun->stitchingPath($v1['fileUrl']);
            }
            $list[$k]['tags'] = [
                '1', '2'
            ];
            $list[$k]['fileList'] = $fileList;
        }
        $result = [
            'total' => $total_nums,
            'list' => $list
        ];
        return $this->_response($result, ResponseCode::SUCCESS, '相册详情');
    }
    /**
     * 添加数据
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function addOrEdit(Request $request)
    {
        $rule = [
            'classCode' => 'required|integer|min:1',
            'title' => 'required|string',
            'intro' => 'required|string',
            'aid' => 'required|integer',
            'id' => 'required|integer',
            'jurisdiction' => 'required|integer',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $acid = $request->id;
        $data = [
            'classCode' => $request->classCode,
            'title' => $request->title,
            'intro' => $request->intro,
            'aid' => $request->aid,
            'jurisdiction' => $request->jurisdiction,
        ];
        $pathArr = json_decode($request->pathJson, true);
        if($acid == -1)
        {
            $data['createdTime'] = date('Y-m-d H:i:s');
            $res = AlbumContentModel::insert($data);
            if(!$res)
            {
                return $this->_response([], ResponseCode::PARAM_ERROR, '添加失败');
            }
            $acid = DB::getPdo()->lastInsertId();
        }
        else
        {
            $data['updatedTime'] = date('Y-m-d H:i:s');
            $where = [
                'id' => $request->id,
                'classCode' => $request->classCode
            ];
            $res = AlbumContentModel::where($where)->update($data);
            if(!$res)
            {
                return $this->_response([], ResponseCode::PARAM_ERROR, '修改失败');
            }
            AlbumFilesModel::where('acid', '=', $acid)->delete();
        }
        if(is_array($pathArr) && count($pathArr) != 0)
        {
            $fileData = [];
            foreach($pathArr as $k => $v)
            {
                $fileData[] = [
                    'aid' => $request->aid,
                    'acid' => $acid,
                    'fileUrl' => $v
                ];
            }
            AlbumFilesModel::insert($fileData);
        }
        return $this->_response([], ResponseCode::SUCCESS, '请求成功');
    }
    /**
     * 批量删除照片
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function delFileUrl(Request $request)
    {
        $rule = [
            'fidS' => 'required|string',
            'aid' => 'required|integer',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $idsArr = json_decode($request->fidS, true);
        if(!is_array($idsArr) || count($idsArr) == 0)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '参数错误');
        }
        $res = AlbumFilesModel::where('aid', '=', $request->aid)->whereIn('id', $idsArr)->delete();
        if(!$res)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '删除失败');
        }
        return $this->_response([], ResponseCode::SUCCESS, '删除成功');
    }
    /**
     * 人脸详情
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function faceDetails(Request $request)
    {
        $rule = [
            'classCode' => 'required|integer',
            'page' => 'required|integer|min:1',
            'pageSize' => 'required|integer|min:1',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $where = [
            'classCode' => $request->classCode
        ];
        $param = $request->all();
        $query = FaceAttendanceModel::where($where)->select('id', 'dates')->groupBy('dates');
        $currentPage = $param['page'];
        $perage = $param['pageSize'];
        $limitprame = ($currentPage - 1) * $perage;
        $total_nums = $query->count();
        $arr = $query->orderBy('dates', 'desc')->skip($limitprame)->take($perage)->get()->toArray();
        foreach($arr as $k => $v)
        {
            $where = [
                'dates' => $v['dates'],
                'classCode' => $request->classCode
            ];
            $res = FaceAttendanceModel::where($where)->select('id', 'faceImg', 'createdTime')
                ->orderBy('id', 'desc')->get()->toArray();
            foreach($res as $k1 => $v1)
            {
                $res[$k1]['httpUrl'] = $this->fun->stitchingPath($v1['faceImg']);
            }
            $arr[$k]['faceList'] = $res;
        }
        $result = [
            'total' => $total_nums,
            'list' => $arr
        ];
        return $this->_response($result, ResponseCode::SUCCESS, '相册详情');
    }
}
app/Http/Controllers/Api/v1/AlbumController.php
New file
@@ -0,0 +1,240 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:27
 */
namespace App\Http\Controllers\Api\v1;
use App\Http\Controllers\ApiController;
use App\Common\ResponseCode;
use App\Models\AlbumModel;
use App\Models\FaceAttendanceModel;
use Illuminate\Http\Request;
use Validator;
use Illuminate\Support\Facades\DB;
class AlbumController extends ApiController
{
    /**
     * 相册列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function showList(Request $request)
    {
        $rule = [
            'classCode' => 'required|integer|min:1',
            'orgId' => 'required|integer|min:1',
            'roleId' => 'required|string',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $where = [
            'classCode' => $request->classCode,
            'isDel' => 0,
        ];
        $param = $request->all();
        if(in_array("2026",explode(',',$request->roleId)))
        {
            $list = DB::table('anni_album as a')
                ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
                    DB::raw('(select count(id) from anni_album_files where aid=a.id) as num'))
                ->where($where)->orderBy('isDefault', 'desc')->get()->toArray();
        }
        else
        {
            $list = DB::table('anni_album as a')
                ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
                    DB::raw('(select count(id) from anni_album_files where aid=a.id) as num'))
                ->where($where)->where('jurisdiction', '!=', 3)
                ->orWhere(function ($query) use ($where, $param) {
                    $where['orgId'] = $param['orgId'];
                    $where['teacherId'] = $param['teacherId'];
                    $where['jurisdiction'] = 3;
                    $query->where($where);
                })->orderBy('isDefault', 'desc')
                ->get()->toArray();
        }
        $tmpArr = [
            'id' => 0,
            'name' => '人脸签到记录',
            'classCode' => (int)$request->classCode,
            'jurisdiction' => 3,
            'coverUrl' => '',
            'isDefault' => 1,
        ];
        $isDefault = 0;
        foreach($list as $k => $v)
        {
            if($v['isDefault'] == 1)
            {
                $isDefault = 1;
                $list[$k]['num'] = FaceAttendanceModel::where(['classCode' => $request->classCode])->count();
            }
            $list[$k]['httpUrl'] = $this->fun->stitchingPath($v['coverUrl']);
        }
        if($isDefault != 1)
        {
            $tmpArr['num'] = FaceAttendanceModel::where(['classCode' => $request->classCode])->count();
            array_unshift($list, $tmpArr);
        }
        $result = [
            'list' => $list
        ];
        return $this->_response($result, ResponseCode::SUCCESS, '相册列表');
    }
    /**
     * 添加或修改相册
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function addOrEditData(Request $request)
    {
        $rule = [
            'id' => 'required|integer',
            'name' => 'required|string',
            'classCode' => 'required|integer',
            'orgId' => 'required|integer',
            'jurisdiction' => 'required|integer',
            #'coverUrl' => 'required|string',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $id = $request->id;
        $data = [
            'name' => $request->name,
            'classCode' => $request->classCode,
            'orgId' => $request->orgId,
            'jurisdiction' => $request->jurisdiction,
            'coverUrl' => $request->coverUrl,
            'teacherId' => $request->teacheId,
        ];
        if($id == -1)
        {
            $data['isDefault'] = 0;
            $data['createdTime'] = date('Y-m-d H:i:s');
            $res = AlbumModel::insert($data);
        }
        else if($id == 0)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '默认相册无法修改');
        }
        else
        {
            $data['updatedTime'] = date('Y-m-d H:i:s');
            $where = [
                'id' => $request->id,
                'classCode' => $request->classCode
            ];
            $res = AlbumModel::where($where)->update($data);
        }
        if(!$res)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '请求失败');
        }
        return $this->_response([], ResponseCode::SUCCESS, '请求成功');
    }
    /**
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function delAlbum(Request $request)
    {
        $rule = [
            'id' => 'required|integer',
            'classCode' => 'required|integer',
            'isDefault' => 'required|integer',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        if($request->id == 0 || $request->isDefault == 1)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '此相册为默认相册,无法删除');
        }
        $where = [
            'id' => $request->id,
            'classCode' => $request->classCode,
        ];
        $res = AlbumModel::where($where)->update(['isDel' => 1]);
        if(!$res)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '删除失败');
        }
        return $this->_response([], ResponseCode::SUCCESS, '删除成功');
    }
    public function myAlbum(Request $request)
    {
        $rule = [
            'orgId' => 'required|integer|min:1',
            'roleId' => 'required|string',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $where = [
            'orgId' => $request->orgId,
            'isDel' => 0,
        ];
        $param = $request->all();
        if(in_array("2026",explode(',',$request->roleId)))
        {
            $query = DB::table('anni_album as a')
                ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
                    DB::raw('(select count(id) from anni_album_files where aid=a.id) as num'))
                ->where($where);
            if(!empty($request->search))
            {
                $query->where('name', 'like', '%' . trim($request->search) . '%');
            }
            $list = $query->orderBy('isDefault', 'desc')->get()->toArray();
        }
        else
        {
            $query = DB::table('anni_album as a')
                ->select('id', 'name', 'classCode', 'jurisdiction', 'coverUrl', 'isDefault',
                    DB::raw('(select count(id) from anni_album_files where aid=a.id) as num'))
                ->where($where)->where('jurisdiction', '!=', 3)
                ->orWhere(function ($query) use ($where, $param) {
                    $where['orgId'] = $param['orgId'];
                    $where['teacherId'] = $param['teacherId'];
                    $where['jurisdiction'] = 3;
                    $query->where($where);
                });
            if(!empty($request->search))
            {
                $query->where('name', 'like', '%' . trim($request->search) . '%');
            }
            $list = $query->orderBy('isDefault', 'desc')
                ->get()->toArray();
        }
        foreach($list as $k => $v)
        {
            $list[$k]['httpUrl'] = $this->fun->stitchingPath($v['coverUrl']);
        }
        $result = [
            'list' => $list
        ];
        return $this->_response($result, ResponseCode::SUCCESS, '相册列表');
    }
}
app/Http/Controllers/Api/v1/ArchivesController.php
New file
@@ -0,0 +1,215 @@
<?php
/**
 * Created by 成长档案.
 * User: zzy
 * Date: 2021/2/24
 * Time: 15:50
 */
namespace App\Http\Controllers\Api\v1;
use App\Http\Controllers\ApiController;
use App\Common\ResponseCode;
use App\Models\ArchivesFilesModel;
use App\Models\ArchivesModel;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Validator;
use Illuminate\Support\Facades\DB;
class ArchivesController extends ApiController
{
    /**
     * 成长档案列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function showList(Request $request)
    {
        $rule = [
            #'classCode' => 'required|integer|min:1',
            #'studentId' => 'required|integer',
            'page' => 'required|integer|min:1',
            'pageSize' => 'required|integer|min:1',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $param = $request->all();
        if(empty($request->classCode) && empty($request->studentId)) {
            return $this->_response([], ResponseCode::PARAM_ERROR, '班级或学员未选择');
        }
        $where = [
            #'classCode' => $request->classCode,
            #'studentId' => $request->studentId,
            'isDel' => 0
        ];
        if(isset($request->classCode) && !empty($request->classCode)    )
        {
            $where['classCode'] = $request->classCode;
        }
        if(isset($request->studentId) && !empty($request->studentId))
        {
            $where['studentId'] = $request->studentId;
        }
        $currentPage = $param['page'];
        $perage = $param['pageSize'];
        $limitprame = ($currentPage - 1) * $perage;
        $query = DB::table('anni_archives as a')
            ->select('a.id', 'a.title', 'a.intro', 'a.audioUrl', 'a.dates', 'a.classCode', 'a.isExcellent',
                'a.isPushParent', 'a.createdTime', 'a.studentId', 'a.username', 'a.teacherId', 'u.EnName', 'u.UserAvatar')
            ->leftJoin('annieportal.sys_user as u', 'a.teacherId', '=', 'u.StaffId')
            ->where($where);
        if(!empty($request->startTime))
        {
            $query->where('a.createdTime', '<=', $request->startTime)->where('a.createdTime', '>=', $request->endTime);
        }
        $total_nums = $query->count();
        $list = $query->orderBy('a.id', 'desc')->skip($limitprame)->take($perage)->get()->toArray();
        foreach($list as $k => $v)
        {
            $list[$k]['EnName'] = $v['EnName'] . '老师';
            $list[$k]['UserAvatar'] = $this->fun->stitchingPath($v['UserAvatar']);
            $list[$k]['httpAudioUrl'] = $this->fun->stitchingPath($v['audioUrl']);
            $fileList = ArchivesFilesModel::where('aid', '=', $v['id'])->get()->toArray();
            foreach($fileList as $k1 => $v1)
            {
                $fileList[$k1]['httpUrl'] = $this->fun->stitchingPath($v1['fileUrl']);
            }
            $list[$k]['fileList'] = $fileList;
        }
        $result = [
            'total' => $total_nums,
            'list' => $list
        ];
        return $this->_response($result, ResponseCode::SUCCESS, '成长档案列表');
    }
    /**
     * 添加数据
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function addOrEdit(Request $request)
    {
        $rule = [
            'classCode' => 'required|integer|min:1',
            'title' => 'required|string',
            #'audioUrl' => 'required|string',
            'date' => 'required|string',
            'time' => 'required|string',
            'intro' => 'required|string',
            'id' => 'required|integer',
            'studentId' => 'required|integer',
            'username' => 'required|string',
            'isExcellent' => 'required|integer',
            'isPushParent' => 'required|integer',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $aid = $request->id;
        $data = [
            'classCode' => $request->classCode,
            'title' => $request->title,
            'intro' => $request->intro,
            'audioUrl' => $request->audioUrl,
            'dates' => $request->date.' '.$request->time,
            'studentId' => $request->studentId,
            'username' => $request->username,
            'teacherId' => $request->teacherId,
            'isExcellent' => $request->isExcellent,
            'isPushParent' => $request->isPushParent,
        ];
        $pathArr = json_decode($request->pathJson, true);
        if($request->isPushParent == 1)
        {
            $data['pushTime'] = date('Y-m-d H:i:s');
        }
        if($aid == -1)
        {
            $data['createdTime'] = date('Y-m-d H:i:s');
            $res = ArchivesModel::insert($data);
            if(!$res)
            {
                return $this->_response([], ResponseCode::PARAM_ERROR, '添加失败');
            }
            $aid = DB::getPdo()->lastInsertId();
        }
        else
        {
            $data['updatedTime'] = date('Y-m-d H:i:s');
            $where = [
                'id' => $request->id,
                'classCode' => $request->classCode
            ];
            $res = ArchivesModel::where($where)->update($data);
            if(!$res)
            {
                return $this->_response([], ResponseCode::PARAM_ERROR, '修改失败');
            }
            ArchivesFilesModel::where('aid', '=', $aid)->delete();
        }
        if(is_array($pathArr) && count($pathArr) != 0)
        {
            $fileData = [];
            foreach($pathArr as $k => $v)
            {
                $fileData[] = [
                    'aid' => $aid,
                    'fileUrl' => $v['fileUrl'],
                    'fileType' => $v['fileType']
                ];
            }
            ArchivesFilesModel::insert($fileData);
        }
        return $this->_response([], ResponseCode::SUCCESS, '请求成功');
    }
    /**
     * 删除成长档案
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function delData(Request $request)
    {
        $rule = [
            'aid' => 'required|integer',
            'classCode' => 'required|integer',
            'studentId' => 'required|integer',
        ];
        $error = $this->_validate($request, $rule);
        if(!empty($error))
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, $error);
        }
        $idsArr = json_decode($request->fidS, true);
        if(!is_array($idsArr) || count($idsArr) == 0)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '参数错误');
        }
        $where = [
            'aid' => $request->aid,
            'classCode' => $request->classCode,
            'studentId' => $request->studentId,
        ];
        $res = ArchivesModel::where($where)->delete();
        if(!$res)
        {
            return $this->_response([], ResponseCode::PARAM_ERROR, '删除失败');
        }
        ArchivesFilesModel::where('aid', '=', $request->aid)->delete();
        return $this->_response([], ResponseCode::SUCCESS, '删除成功');
    }
}
app/Http/Controllers/Api/v1/FaceController.php
@@ -69,7 +69,7 @@
        $search = $faceObj->SearchFace($path);
        if(!isset($faceList['data']['Data']))
        {
            if(!isset($search['data']['Data']['MatchList']) || count($search['data']['Data']['MatchList']) == 0)
            if(!isset($search['data']['Data']['MatchList'])  || count($search['data']['Data']['MatchList']) == 0)
            {
                return $this->_response([], ResponseCode::PARAM_ERROR, '采集失败,未检测到用户人脸');
            }
app/Models/AlbumContentModel.php
New file
@@ -0,0 +1,23 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:30
 */
namespace App\Models;
class  AlbumContentModel extends Model
{
    /**
     * @var string
     */
    protected $table = 'anni_album_content';
    protected $primaryKey = 'id';
    public $incrementing = true;
    public $timestamps = false;
}
app/Models/AlbumFilesModel.php
New file
@@ -0,0 +1,23 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:30
 */
namespace App\Models;
class  AlbumFilesModel extends Model
{
    /**
     * @var string
     */
    protected $table = 'anni_album_files';
    protected $primaryKey = 'id';
    public $incrementing = true;
    public $timestamps = false;
}
app/Models/AlbumModel.php
New file
@@ -0,0 +1,23 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:30
 */
namespace App\Models;
class  AlbumModel extends Model
{
    /**
     * @var string
     */
    protected $table = 'anni_album';
    protected $primaryKey = 'id';
    public $incrementing = true;
    public $timestamps = false;
}
app/Models/ArchivesFilesModel.php
New file
@@ -0,0 +1,23 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:30
 */
namespace App\Models;
class  ArchivesFilesModel extends Model
{
    /**
     * @var string
     */
    protected $table = 'anni_archives_files';
    protected $primaryKey = 'id';
    public $incrementing = true;
    public $timestamps = false;
}
app/Models/ArchivesModel.php
New file
@@ -0,0 +1,23 @@
<?php
/**
 * Created by 相册.
 * User: zzy
 * Date: 2021/2/24
 * Time: 9:30
 */
namespace App\Models;
class  ArchivesModel extends Model
{
    /**
     * @var string
     */
    protected $table = 'anni_archives';
    protected $primaryKey = 'id';
    public $incrementing = true;
    public $timestamps = false;
}
package-lock.json
New file
Diff too large
routes/api.php
@@ -49,10 +49,22 @@
        $api->post('/face/searchPhoneStudent', 'FaceController@searchPhoneStudent');//学院搜索
        $api->post('/face/getFaceInfo', 'FaceController@getFaceInfo');//人脸详情
        $api->post('/face/supplement', 'FaceController@supplement');//人工补录
        //==相册
        $api->post('/album/showList', 'AlbumController@showList');//相册列表
        $api->post('/album/addOrEditData', 'AlbumController@addOrEditData');//添加相册或修改
        $api->post('/album/delAlbum', 'AlbumController@delAlbum');//删除相册
        $api->post('/albumContent/addOrEdit', 'AlbumContentController@addOrEdit');//添加相册内容
        $api->post('/albumContent/showList', 'AlbumContentController@showList');//相册列表
        $api->post('/albumContent/faceDetails', 'AlbumContentController@faceDetails');//人脸相册列表
        $api->post('/albumContent/delFileUrl', 'AlbumContentController@delFileUrl');//删除照片
        //==成长档案
        $api->post('/archives/showList', 'ArchivesController@showList');//成长档案列表
        $api->post('/archives/addOrEdit', 'ArchivesController@addOrEdit');//添加或修改相册内容
        $api->post('/archives/delData', 'ArchivesController@delData');//删除成长档案
        //==我的
        $api->post('/person/menuList', 'PersonController@getMenuList');//我的菜单
        $api->post('/person/userInfo', 'PersonController@userInfo');//我的菜单
        $api->post('/person/myAlbum', 'AlbumController@myAlbum');//相册列表
        //==系统相关
        $api->post('/system/startup', 'SystemController@startup');              //启动页接口
        $api->post('/system/menuList', 'SystemController@bottomMenu');          //底部菜单