database
This commit is contained in:
@@ -336,13 +336,18 @@ class Course extends Model
|
|||||||
if($get['courseId'] == '1877654905222135809') {
|
if($get['courseId'] == '1877654905222135809') {
|
||||||
Log::info('$freeWatch==' . $freeWatch);
|
Log::info('$freeWatch==' . $freeWatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 已购买剧集ID集合
|
// 已购买剧集ID集合
|
||||||
$detailsId = [];
|
$detailsId = [];
|
||||||
if (!$freeWatch) {
|
if (!$freeWatch) {
|
||||||
$det_db = Db::connect(DatabaseRoute::getConnection('course_user', ['user_id' => $user['user_id']]));
|
$det_db = Db::connect(DatabaseRoute::getConnection('course_user', ['user_id' => $user['user_id']]));
|
||||||
$detailsId = $det_db->name('course_user')->where(['course_id' => $courseId, 'classify' => 2])->column('course_details_id');
|
$detailsId = $det_db->name('course_user')->where(['course_id' => $courseId, 'classify' => 2])->column('course_details_id');
|
||||||
|
if($get['courseId'] == '1877654905222135809') {
|
||||||
|
Log::info('已购买剧集ID集合-----------' . json_encode($detailsId));
|
||||||
|
}
|
||||||
$detailsId = array_flip(array_flip($detailsId)); // 去重
|
$detailsId = array_flip(array_flip($detailsId)); // 去重
|
||||||
if($get['courseId'] == '1877654905222135809') {
|
if($get['courseId'] == '1877654905222135809') {
|
||||||
|
Log::info('已购买剧集ID集合' . json_encode($detailsId));
|
||||||
Log::info('已购买剧集ID集合111==' . DatabaseRoute::getConnection('course_user', ['user_id' => $user['user_id']]));
|
Log::info('已购买剧集ID集合111==' . DatabaseRoute::getConnection('course_user', ['user_id' => $user['user_id']]));
|
||||||
Log::info('已购买剧集ID集合222==' . json_encode($detailsId));
|
Log::info('已购买剧集ID集合222==' . json_encode($detailsId));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user