add
This commit is contained in:
@@ -5,18 +5,16 @@ namespace app\controller;
|
||||
use app\api\model\CourseCollect;
|
||||
use app\api\model\CourseDetails;
|
||||
use app\api\model\TbUser;
|
||||
use app\model\DatabaseRoute;
|
||||
use app\common\library\DatabaseRoute;
|
||||
use app\model\Test;
|
||||
use support\Request;
|
||||
use think\facade\Db;
|
||||
use think\facade\Log;
|
||||
|
||||
class IndexController
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
|
||||
\support\Log::info('来了' . date('Y-m-d H:i:s'));
|
||||
$get['courseId'] = $course_id = '1877654905222135809';
|
||||
$user['user_id'] = $user_id = '14240';
|
||||
$user = DatabaseRoute::getDb('tb_user', $user_id)->find();
|
||||
@@ -132,6 +130,7 @@ class IndexController
|
||||
$detailsId = $det_db->name('course_user')->where(['course_id' => $courseId, 'classify' => 2])->column('course_details_id');
|
||||
$det_db->close();
|
||||
$detailsId = array_flip(array_flip($detailsId)); // 去重
|
||||
\support\Log::info('啦啦啦' . date('Y-m-d H:i:s'));
|
||||
}
|
||||
// 处理剧集列表
|
||||
$current = null;
|
||||
@@ -162,7 +161,6 @@ class IndexController
|
||||
->where('classify', 2)
|
||||
->limit(1)
|
||||
->count();
|
||||
$isGood_db->close();
|
||||
$s['isGood'] = empty($isGood) || $isGood == 0 ? 0 : 1;
|
||||
}
|
||||
}
|
||||
@@ -184,6 +182,7 @@ class IndexController
|
||||
'collect' => empty($collect) || $collect == 0 ? 0 : 1,
|
||||
'list' => $courseDetailsSetVos
|
||||
];
|
||||
\support\Log::info('即将返回' . date('Y-m-d H:i:s'));
|
||||
return json($map);
|
||||
} catch (\Exception $e) {
|
||||
return json($e->getMessage());
|
||||
|
||||
Reference in New Issue
Block a user