['name'], '=' => ['attr'], ]; } /** * @notes 广告位列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author ljj * @date 2022/2/14 4:35 下午 */ public function lists(): array { $lists = (new AdPosition())->field('id,name,attr,status,create_time') ->order('id','desc') ->append(['attr_desc']) ->where($this->searchWhere) ->limit($this->limitOffset,$this->limitLength) ->select() ->toArray(); return $lists; } /** * @notes 广告位总数 * @return int * @author ljj * @date 2022/2/14 4:36 下午 */ public function count(): int { return (new AdPosition())->where($this->searchWhere)->count(); } }