|
@@ -88,7 +88,16 @@ class BookService
|
|
|
if($old){
|
|
|
return -1;
|
|
|
}
|
|
|
- $new_yunqi_book = DB::connection('new_yunqi')->table('books')->where('id',$bid)->first();
|
|
|
+ $new_yunqi_book = DB::connection('new_yunqi')
|
|
|
+ ->table('books')
|
|
|
+ ->join('book_configs','books.id','=','book_configs.bid')
|
|
|
+ ->select(
|
|
|
+ 'books.id','books.author','books.author','books.intro','books.category_name','books.keyword',
|
|
|
+ 'books.status','books.chapter_count','books.size','books.last_chapter','book_configs.book_name as name',
|
|
|
+ 'book_configs.cover','book_configs.force_subscribe_chapter_seq','book_configs.charge_type','book_configs.roles'
|
|
|
+ )
|
|
|
+ ->where('id',$bid)
|
|
|
+ ->first();
|
|
|
if(!$new_yunqi_book){
|
|
|
return -2;
|
|
|
}
|
|
@@ -126,6 +135,12 @@ class BookService
|
|
|
}
|
|
|
}
|
|
|
\Artisan::call('book:afs',['bid'=>[$book->id]]);
|
|
|
+ DB::table('book_configs')->where('bid',$book->id)->update([
|
|
|
+ 'force_subscribe_chapter_seq'=>$new_yunqi_book->force_subscribe_chapter_seq,
|
|
|
+ 'roles'=>$new_yunqi_book->roles,
|
|
|
+ 'charge_type'=>$new_yunqi_book->charge_type,
|
|
|
+ 'cp_source'=>'new_yunqi'
|
|
|
+ ]);
|
|
|
return 0;
|
|
|
}
|
|
|
}
|