1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00

1.修正chapter_user中duration重复计数的问题

This commit is contained in:
xiaochong0302 2024-04-10 18:58:55 +08:00
parent b9827418c1
commit dcf03e5620
3 changed files with 3 additions and 7 deletions

View File

@ -69,7 +69,7 @@ class SyncLearningTask extends Task
} else { } else {
$dbLearning->duration += $cacheLearning->duration; $dbLearning->duration = $cacheLearning->duration;
$dbLearning->position = $cacheLearning->position; $dbLearning->position = $cacheLearning->position;
$dbLearning->active_time = $cacheLearning->active_time; $dbLearning->active_time = $cacheLearning->active_time;

View File

@ -23,9 +23,9 @@ class Learning extends LogicService
{ {
$post = $this->request->getPost(); $post = $this->request->getPost();
$chapter = $this->checkChapter($id); $chapter = $this->checkChapterCache($id);
$user = $this->getLoginUser(); $user = $this->getLoginUser(true);
$validator = new LearningValidator(); $validator = new LearningValidator();

View File

@ -21,10 +21,6 @@ class Learning extends AppService
*/ */
protected $lifetime = 86400; protected $lifetime = 86400;
/**
* @param LearningModel $learning
* @param int $intervalTime
*/
public function addItem(LearningModel $learning, $intervalTime = 10) public function addItem(LearningModel $learning, $intervalTime = 10)
{ {
$cache = $this->getCache(); $cache = $this->getCache();