|
@@ -55,7 +55,7 @@ class BookService
|
|
|
|
|
|
$query = DB::table('books as b')->leftJoin('book_configs as bc', 'b.id', '=', 'bc.bid')
|
|
|
->where('b.size', '<', 30000)->where('b.status', 1)
|
|
|
- ->whereIn('bc.cp_source', ['ycsd', 'yqsd'])->select('bid', 'book_name');
|
|
|
+ ->whereIn('bc.cp_source', ['ycsd', 'yqsd'])->select('bc.bid', 'bc.book_name');
|
|
|
if ($bid) {
|
|
|
$query->where('bc.bid', $bid);
|
|
|
}
|
|
@@ -180,7 +180,7 @@ class BookService
|
|
|
if (!$bid) Utils::throwError('20003:请选择书籍');
|
|
|
if (!$version_id) Utils::throwError('20003:请选择版本');
|
|
|
$generate_status = getProp($data, 'generate_status');
|
|
|
- $book = DB::table('books as b')->leftJoin('book_configs as bc', 'b.id', '=', 'bc.bid')->where('b.id', $bid)->whereIn('bc.is_on_shelf', [1,2])
|
|
|
+ $book = DB::table('books as b')->leftJoin('book_configs as bc', 'b.id', '=', 'bc.bid')->where('b.id', $bid)
|
|
|
->select('bc.book_name', 'bc.cover', 'b.size', 'b.chapter_count', 'b.intro')->first();
|
|
|
if (!$book) Utils::throwError('20003:书籍不存在');
|
|
|
$header = (array)$book;
|