userId]; return $where; } /** * @notes 文章/帮助列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author Tab * @date 2021/7/14 9:48 */ public function lists(): array { $lists = GoodsVisit::field('id,goods_id,ip,visit,create_time') ->where($this->searchWhere) ->append(['goods']) ->order([ 'id' => 'desc' ]) ->limit($this->limitOffset, $this->limitLength) ->select() ->toArray(); return $lists; } /** * @notes 文章/帮助总记录数 * @return int * @author Tab * @date 2021/7/14 9:48 */ public function count(): int { return GoodsVisit::where($this->searchWhere)->count(); } }