lh 4 天之前
父節點
當前提交
4dc3e21aa3

+ 1 - 1
app/Http/Controllers/Book/BookController.php

@@ -70,7 +70,7 @@ class BookController extends BaseController
     public function addBookVersion(Request $request) {
         $data = $request->all();
         $result = $this->bookService->addBookVersion($data);
-        return $this->success(['success'=>$result ? 1 : 0]);
+        return $this->success($result);
     }
 
     /**

+ 5 - 1
app/Services/Book/BookService.php

@@ -126,7 +126,11 @@ class BookService
         }
 
         DB::commit();
-        return true;
+        return [
+            'bid'           => $bid,
+            'version_id'    => $version_id,
+            'version_name'  => $version_name,
+        ];
     }
 
     public function getChapterList($data) {

+ 1 - 0
app/Services/DeepSeek/DeepSeekService.php

@@ -142,6 +142,7 @@ class DeepSeekService
                 Utils::throwError('20003:更新角色信息失败');
             }
 
+            // $count = DB::table('mp_chapter_audios')->where('bid', $bid)->where('version_id', $version_id)->where('cid', $cid)->count('id');
             $boolen1 = DB::table('mp_chapter_audios')->where('bid', $bid)->where('version_id', $version_id)->where('cid', $cid)->update(['generate_status'=>'执行中', 'generate_json' => $generate_json, 'updated_at' => date('Y-m-d H:i:s')]);
             if (!$boolen1) {
                 DB::rollBack();