sugangqiang 2 years ago
parent
commit
53cb135f20
1 changed files with 1 additions and 1 deletions
  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)