|
@@ -1035,7 +1035,7 @@ class BookController extends BaseController
|
|
|
$distribution_id = $this->distribution_channel_id;
|
|
|
$cacheKey = 'advertisement:uid:'.$uid.':id';
|
|
|
if(empty($order_id)){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
$channel_ad_id = 0;
|
|
|
|
|
@@ -1046,7 +1046,7 @@ class BookController extends BaseController
|
|
|
//判断订单跟广告是否有关系
|
|
|
$order = Order::find($order_id);
|
|
|
if(!$order){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
|
|
|
if($channel_ad_id > 0){
|
|
@@ -1054,22 +1054,22 @@ class BookController extends BaseController
|
|
|
$type = 1;
|
|
|
$advert = ChannelAdvert::find($channel_ad_id);
|
|
|
if(!$advert){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
|
|
|
if($advert->type == '2' && $advert->activity_id != 0){
|
|
|
//广告类型为活动
|
|
|
if($order->activity_id != $advert->activity_id){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
}else{
|
|
|
//广告类型为书籍
|
|
|
$content = explode(';',$advert->content);
|
|
|
if(!isset($content[2])){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
if($order->from_bid == 0 || $order->from_bid != Hashids::decode($content[2])[0]){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
@@ -1077,18 +1077,18 @@ class BookController extends BaseController
|
|
|
$type = 0;
|
|
|
$advert = RecoBanner::find(abs($channel_ad_id));
|
|
|
if(!$advert){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
$result = $this->getBidCidFromUrl($advert->redirect_url);
|
|
|
$bid = $result['bid'];
|
|
|
$cid = $result['cid'];
|
|
|
if($cid){
|
|
|
if($order->from_bid == 0 || $order->from_bid != Hashids::decode($bid)[0]){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
}else{
|
|
|
if($order->activity_id == 0 || $order->from_bid != Hashids::decode($bid)[0]){
|
|
|
- return response()->error();
|
|
|
+ return response()->success();
|
|
|
}
|
|
|
}
|
|
|
}
|