['name'], '=' => ['type', 'status'], ]; } /** * @notes 积分商品列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/3/30 11:28 */ public function lists(): array { $lists = IntegralGoods::where($this->searchWhere) ->withoutField(['content', 'update_time', 'delete_time']) ->append(['need_desc', 'type_desc']) ->order(['sort' => 'desc', 'id' => 'desc']) ->limit($this->limitOffset, $this->limitLength) ->select()->toArray(); return $lists; } /** * @notes 积分商品数量 * @return int * @author 段誉 * @date 2022/3/30 11:28 */ public function count(): int { return IntegralGoods::where($this->searchWhere)->count(); } }