sugangqiang 2 년 전
부모
커밋
53cb135f20
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/common/api/BatchApi.php

+ 1 - 1
app/common/api/BatchApi.php

@@ -159,7 +159,7 @@ class BatchApi {
         if ($params["year"]) {
             $where[] = ["batch", "=", $params["year"]];
         }
-        $batch = Batch::where($where)->findOrEmpty();
+        $batch = Batch::where($where)->order("startTime desc")->order("endTime desc")->findOrEmpty();
         if (!$batch)
             return ["msg" => "该申报未启动"];
         if (strtotime($batch["startTime"]) > $now)