sugangqiang 2 năm trước cách đây
mục cha
commit
53cb135f20
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)