This commit is contained in:
wyn
2026-07-23 09:28:20 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -194,7 +194,7 @@ public class BaiduVoicesUtils {
private static String cuid = "0322java";
public static String run(String content) throws Exception {
TokenHolder holder = new TokenHolder(appKey, secretKey, TokenHolder.ASR_SCOPE);
TokenHolder holder = new TokenHolder(appKey, secretKey, TokenHolder.TTS_SCOPE);
holder.resfresh();
String token = holder.getToken();
String url2 = url + "?tex=" + ConnUtil.urlEncode(content);

View File

@@ -481,13 +481,14 @@ public class HomeController {
return R.ok().put("languageList",languageList);
}
//图书章节
//图书章节(仅返回在 book_chapter_content 中有实际正文的目录)
@RequestMapping("/getBookChapter")
public R getBookChapter(@RequestBody Map<String,Object> params) {
String language = params.containsKey("language")?params.get("language").toString():"中文";
List<BookChapterEntity> chapterList = bookChapterService.list(new LambdaQueryWrapper<BookChapterEntity>()
.eq(BookChapterEntity::getBookId,params.get("bookId"))
.eq(BookChapterEntity::getLanguage,language)
.exists("select 1 from book_chapter_content where book_chatper_id = book_chapter.id and content is not null and content != ''")
.orderByAsc(BookChapterEntity::getId));
return R.ok().put("chapterList",chapterList);
}