['name'], '=' => ['code', 'status'] ]; } /** * @notes 获取管理列表 * @return array * @author heshihu * @date 2022/2/21 17:11 */ public function lists(): array { $lists = Jobs::where($this->searchWhere) ->append(['status_desc']) ->limit($this->limitOffset, $this->limitLength) ->order(['sort' => 'desc', 'id' => 'desc']) ->select() ->toArray(); return $lists; } /** * @notes 获取数量 * @return int * @author 段誉 * @date 2022/5/26 9:48 */ public function count(): int { return Jobs::where($this->searchWhere)->count(); } /** * @notes 导出文件名 * @return string * @author 段誉 * @date 2022/11/24 16:17 */ public function setFileName(): string { return '岗位列表'; } /** * @notes 导出字段 * @return string[] * @author 段誉 * @date 2022/11/24 16:17 */ public function setExcelFields(): array { return [ 'code' => '岗位编码', 'name' => '岗位名称', 'remark' => '备注', 'status_desc' => '状态', 'create_time' => '添加时间', ]; } }