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)