['name', 'status'] ]; } /** * @notes 资产信息列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2022/2/16 3:18 下午 */ public function lists(): array { $lists = (new AssetInfo())->field('id,name,address,images,contacts,mobile,area,content,status,create_time,sort') ->append(['status_desc']) ->where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength) ->Order('sort desc') ->select() ->toArray(); return $lists; } /** * @notes 资产信息数量 * @return int * @author ljj * @date 2022/2/16 3:18 下午 */ public function count(): int { return (new AssetInfo())->where($this->searchWhere)->count(); } }