作者 何书鹏
1 个管道 的构建 通过 耗费 4 秒

合并分支 'heshupeng' 到 'master'

错题训练优化



查看合并请求 !310
... ... @@ -510,7 +510,7 @@ class Almighty extends Api
$question_list = Question::alias('q')
->join('mobile_question_answer qa','q.id = qa.question_id and user_id='.$this->auth->id,'left')
->where('qa.is_wrong','1')
->field('q.id,q.target_type,q.target_id,q.type')
->field('q.id,q.target_type,if(q.target_type=1,0,q.target_id) target_id,q.type')
->select();
$list = [];
foreach ($question_list as $v) {
... ...
... ... @@ -160,6 +160,7 @@ class Simulation extends Api
$total = count($list);
// 删除原来的做题记录
QuestionAnswer::where('question_id','in',array_column($list, 'id'))
->where('is_wrong','0')
->where('user_id',$user_id)
->delete();
// 把题目ID存到缓存
... ...