|
@@ -208,11 +208,11 @@ class BookController extends BaseController
|
|
if(isset($user->uid) && !empty($user->uid)){
|
|
if(isset($user->uid) && !empty($user->uid)){
|
|
if(!$this->send_order_id || $this->send_order_id == 0 ){
|
|
if(!$this->send_order_id || $this->send_order_id == 0 ){
|
|
\Log::info('un_send_order_book:uid:'.$this->uid.' $package:'.$package);
|
|
\Log::info('un_send_order_book:uid:'.$this->uid.' $package:'.$package);
|
|
- $result = $this->getCheckBids($channel,$books,$package_id);
|
|
|
|
|
|
+ $result = $this->getCheckBids($channel,$books,$package_id,$package);
|
|
if(isset($result[1]['books']) && count((array)$result[1]['books']) > 1){
|
|
if(isset($result[1]['books']) && count((array)$result[1]['books']) > 1){
|
|
return response()->success($result);
|
|
return response()->success($result);
|
|
}
|
|
}
|
|
- $result = $this->getCheckBids($channel,$books,0);
|
|
|
|
|
|
+ $result = $this->getCheckBids($channel,$books,0,$package);
|
|
return response()->success($result);
|
|
return response()->success($result);
|
|
}else{
|
|
}else{
|
|
$package_id = 0;
|
|
$package_id = 0;
|
|
@@ -222,7 +222,7 @@ class BookController extends BaseController
|
|
$package_id = 0;
|
|
$package_id = 0;
|
|
}
|
|
}
|
|
\Log::info('un_send_order_book:package_id3:'.$package_id.' $package:'.$package);
|
|
\Log::info('un_send_order_book:package_id3:'.$package_id.' $package:'.$package);
|
|
- $result = $this->getCheckBids($channel,$books,$package_id);
|
|
|
|
|
|
+ $result = $this->getCheckBids($channel,$books,$package_id,$package);
|
|
return response()->success($result);
|
|
return response()->success($result);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -234,12 +234,12 @@ class BookController extends BaseController
|
|
* @param $package_id
|
|
* @param $package_id
|
|
* @return array
|
|
* @return array
|
|
*/
|
|
*/
|
|
- private function getCheckBids($channel,$books,$package_id)
|
|
|
|
|
|
+ private function getCheckBids($channel,$books,$package_id,$package)
|
|
{
|
|
{
|
|
- $hotBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'hot',$package_id),$channel);
|
|
|
|
- $liveBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'live',$package_id),$channel);
|
|
|
|
- $recomBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'recom',$package_id),$channel);
|
|
|
|
- $newBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'new_recom',$package_id),$channel);
|
|
|
|
|
|
+ $hotBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'hot',$package_id),$channel,$package);
|
|
|
|
+ $liveBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'live',$package_id),$channel,$package);
|
|
|
|
+ $recomBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'recom',$package_id),$channel,$package);
|
|
|
|
+ $newBids = $this->getCheckBooks(QappRecommendService::getRecommendByPacketId($channel, 'new_recom',$package_id),$channel,$package);
|
|
|
|
|
|
return array_filter([
|
|
return array_filter([
|
|
['type' => 'reco_banner', 'lable' => '首页banner', 'books' => $books],
|
|
['type' => 'reco_banner', 'lable' => '首页banner', 'books' => $books],
|
|
@@ -255,12 +255,13 @@ class BookController extends BaseController
|
|
* 检测并补充不满足条件的书籍id
|
|
* 检测并补充不满足条件的书籍id
|
|
* @param $bid_list
|
|
* @param $bid_list
|
|
* @param $channel : 频道
|
|
* @param $channel : 频道
|
|
|
|
+ * @param $package : 频道
|
|
* @return array
|
|
* @return array
|
|
*/
|
|
*/
|
|
- private function getCheckBooks($bid_list,$channel)
|
|
|
|
|
|
+ private function getCheckBooks($bid_list,$channel,$package)
|
|
{
|
|
{
|
|
$hidden_cp = getHiddenCp();
|
|
$hidden_cp = getHiddenCp();
|
|
- if($this->distribution_channel_id != 7477){
|
|
|
|
|
|
+ if($package !== 'com.beidao.kuaiying.zsy'){
|
|
$hidden_cp = array_merge($hidden_cp,['lianshang']);
|
|
$hidden_cp = array_merge($hidden_cp,['lianshang']);
|
|
}
|
|
}
|
|
//获取书本数量
|
|
//获取书本数量
|