function ($query) { $query->visible(['goods_name','goods_image','goods_number','good_unit']); },'service_work'=>function ($query) { $query->visible(['service_status']); }]) ->visible(['id','sn','order_total','order_amount','pay_status','create_time']) ->where([ 'order_type' => 0, 'user_id' => $this->userId, ]) ->order('id', 'desc') ->select() ->toArray(); return $lists; } /** * @notes 获取数量 * @return int */ public function count(): int { return RechargeOrder::where([ 'order_type' => 0, 'user_id' => $this->userId, ]) ->count(); } }