|
@@ -114,7 +114,7 @@ class BookAuditService
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
- private function getCheckBooks($bid_list,$channel,$package,$is_author)
|
|
|
|
|
|
+ private static function getCheckBooks($bid_list,$channel,$package,$is_author)
|
|
{
|
|
{
|
|
$hidden_cp = getHiddenCp();
|
|
$hidden_cp = getHiddenCp();
|
|
if($package !== 'com.beidao.kuaiying.zsy'){
|
|
if($package !== 'com.beidao.kuaiying.zsy'){
|
|
@@ -122,27 +122,18 @@ class BookAuditService
|
|
}
|
|
}
|
|
//获取书本数量
|
|
//获取书本数量
|
|
$count = count($bid_list);
|
|
$count = count($bid_list);
|
|
- if (!$is_author){
|
|
|
|
- $where = [
|
|
|
|
- ['book_configs.charge_type','!=','BOOK'],
|
|
|
|
- ['book_configs.cp_source','=','ycsd'],
|
|
|
|
- ];
|
|
|
|
- }else{
|
|
|
|
- $where = [
|
|
|
|
- ['book_configs.charge_type','!=','BOOK'],
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
|
|
+ $where = [
|
|
|
|
+ ['book_configs.charge_type','!=','BOOK'],
|
|
|
|
+ ];
|
|
//获取当前有效书本数量
|
|
//获取当前有效书本数量
|
|
$book_count = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
$book_count = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
->whereIn('book_configs.bid',$bid_list)
|
|
->whereIn('book_configs.bid',$bid_list)
|
|
- ->where('book_configs.is_on_shelf','in',[1,2])
|
|
|
|
- ->where('book_configs.charge_type','!=','BOOK')
|
|
|
|
|
|
+ ->whereIn('book_configs.is_on_shelf',[1,2])
|
|
->whereNotIn('book_configs.cp_source',$hidden_cp)
|
|
->whereNotIn('book_configs.cp_source',$hidden_cp)
|
|
->where($where)
|
|
->where($where)
|
|
->where('book_categories.pid',$channel)
|
|
->where('book_categories.pid',$channel)
|
|
->count();
|
|
->count();
|
|
-
|
|
|
|
if($count == $book_count){
|
|
if($count == $book_count){
|
|
return $bid_list;
|
|
return $bid_list;
|
|
}
|
|
}
|
|
@@ -155,7 +146,7 @@ class BookAuditService
|
|
$bids = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
$bids = BookConfig::join('books', 'book_configs.bid', '=', 'books.id')
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
->leftjoin('book_categories', 'books.category_id', 'book_categories.id')
|
|
->whereIn('book_configs.bid',$bid_list)
|
|
->whereIn('book_configs.bid',$bid_list)
|
|
- ->where('book_configs.is_on_shelf','in',[1,2])
|
|
|
|
|
|
+ ->whereIn('book_configs.is_on_shelf',[1,2])
|
|
->where($where)
|
|
->where($where)
|
|
->whereNotIn('book_configs.cp_source',$hidden_cp)
|
|
->whereNotIn('book_configs.cp_source',$hidden_cp)
|
|
->where('book_categories.pid',$channel)
|
|
->where('book_categories.pid',$channel)
|