Browse Source

回收站的试卷不显示

lizhen_gitee 7 months ago
parent
commit
bff10f6b4d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      application/api/controller/Index.php

+ 2 - 0
application/api/controller/Index.php

@@ -22,6 +22,7 @@ class Index extends Api
         $now    = time();
         $papers = Db::name('exam_paper')->field('id,image,title,start_time,end_time,total_score,limit_time')
             ->where('status', 'NORMAL')
+            ->where('deletetime', NULL)
             ->whereRaw("((start_time = 0 and end_time = 0) or (start_time < {$now} and end_time > {$now}))")
 //            ->where('find_in_set(:user_ids,user_ids)', ['user_ids' => $this->auth->id])
             ->limit(3)
@@ -46,6 +47,7 @@ class Index extends Api
             ->where('status', 'NORMAL')
             ->whereRaw("((start_time = 0 and end_time = 0) or (start_time < {$now} and end_time > {$now}))")
             ->where('find_in_set(:user_ids,user_ids)', ['user_ids' => $this->auth->id])
+            ->where('deletetime', NULL)
             ->autopage()
             ->select();