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:
parent
b9827418c1
commit
dcf03e5620
@ -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;
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user