request["id"] && $this->request["type"]) { $params = []; switch ($this->request["type"]) { case ProjectState::HOUSE: $info = \app\common\api\HouseApi::getInfoById($this->request["id"]); $params = ["type" => $this->request["type"], "year" => $info["year"], "first_submit_time" => $info["firstSubmitTime"]]; break; } return json(BatchApi::checkBatchValid($params, $user["type"])); } return json(BatchApi::checkBatchValid($this->request->param(), $user["type"])); } public function listBatchByType() { $projectType = $this->request["type"]; $talentType = $this->request["source"]; return json(BatchApi::getValidBatchs($projectType, $talentType)); } }