|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Http\Controllers\Wap\Order;
|
|
|
|
|
|
+use App\Modules\Subscribe\Models\Order;
|
|
|
use App\Http\Controllers\Wap\BaseController;
|
|
|
use App\Modules\Book\Services\BookConfigService;
|
|
|
use App\Modules\Channel\Services\ChannelService;
|
|
@@ -36,6 +37,8 @@ class OrdersController extends BaseController
|
|
|
|
|
|
private $force_subscribe_info;
|
|
|
|
|
|
+ private $chargeList;
|
|
|
+
|
|
|
/**
|
|
|
* @apiVersion 1.0.0
|
|
|
* @apiDescription 充值列表
|
|
@@ -263,7 +266,8 @@ class OrdersController extends BaseController
|
|
|
if (!$res) {
|
|
|
return response()->error('WAP_SYS_ERROR');
|
|
|
}
|
|
|
-
|
|
|
+ $this->chargeList = $res;
|
|
|
+ $this->exchangeList();
|
|
|
/*if ($this->send_order_id) {
|
|
|
try {
|
|
|
Redis::sadd('pay_page_uv' . $this->send_order_id, $this->uid);
|
|
@@ -797,4 +801,14 @@ class OrdersController extends BaseController
|
|
|
-1, $template_id);
|
|
|
return '';
|
|
|
}
|
|
|
+
|
|
|
+ public function exchangeList(){
|
|
|
+ foreach ($this->chargeList as &$item){
|
|
|
+ if(!$item->switch_to) continue;
|
|
|
+ $order = Order::where('uid',$this->uid)->where('status','PAID')->where('product_id',$item->id)->first();
|
|
|
+ if($order){
|
|
|
+ $item = ProductService::getProductSingle($item->switch_to);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|