sugangqiang 1 rok pred
rodič
commit
468615e620
1 zmenil súbory, kde vykonal 13 pridanie a 15 odobranie
  1. 13 15
      app/enterprise/api/TalentApi.php

+ 13 - 15
app/enterprise/api/TalentApi.php

@@ -220,21 +220,19 @@ class TalentApi {
             if ($talentArrange) {
                 $where[] = ["ti.talent_arrange", "=", $talentArrange];
             }
-            if ($checkState) {
-                switch ($checkState) {
-                    case 1:
-                        $where[] = ["tl.state", "=", TalentState::FST_SUBMIT];
-                        break;
-                    case 2:
-                        $where[] = ["tl.state", "=", TalentState::BASE_REJECT];
-                        break;
-                    case 3:
-                        $where[] = ["tl.state", ">=", TalentState::SCND_SUBMIT];
-                        break;
-                    default:
-                        $where[] = ["tl.state", "in", [TalentState::FST_SUBMIT, TalentState::BASE_REJECT]];
-                        $where[] = ["tl.state", ">=", TalentState::SCND_SUBMIT];
-                }
+            switch ($checkState) {
+                case 1:
+                    $where[] = ["tl.state", "=", TalentState::FST_SUBMIT];
+                    break;
+                case 2:
+                    $where[] = ["tl.state", "=", TalentState::BASE_REJECT];
+                    break;
+                case 3:
+                    $where[] = ["tl.state", ">=", TalentState::SCND_SUBMIT];
+                    break;
+                default:
+                    $where[] = ["tl.state", "in", [TalentState::FST_SUBMIT, TalentState::BASE_REJECT]];
+                    $where[] = ["tl.state", ">=", TalentState::SCND_SUBMIT];
             }
             $count = Talent::where($where)->alias("ti")
                     ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")