$this->user["type"]]); } public function list() { $type = $this->user["type"]; $params = \StrUtil::batchGetRequestDecodeParam($this->request); $order = $params["order"] ?: "desc"; $offset = $params["offset"] ?: 0; $limit = $params["limit"] ?: 10; $where = []; $where[] = ["enterpriseId", "=", $this->user["uid"]]; if ($params["talentName"]) { $where[] = ["talentName", "like", "%" . $params["talentName"] . "%"]; } if ($params["idCard"]) { $where[] = ["idCard", "like", "%" . $params["idCard"] . "%"]; } if ($params["enterpriseName"]) { $where[] = ["enterpriseName", "like", "%" . $params["enterpriseName"] . "%"]; } if ($params["talentArrange"]) { $where[] = ["talentArrange", "=", $params["talentArrange"]]; } $count = TqModel::where($where)->count(); $list = TqModel::where($where)->limit($offset, $limit)->order("createTime " . $order)->select()->toArray(); $talentArrangeMap = \app\common\api\DictApi::selectByParentCode("talent_arrange"); foreach ($list as &$item) { $item["talentArrangeName"] = $talentArrangeMap[$item["talentArrange"]]; }unset($item); return json(["total" => $count, "rows" => $list]); } public function apply() { return view(); } public function view() { return view(); } }