Merge branch 'master' of https://git.nuttyreading.com/zm/nuttyreading-global-java into mailToken
This commit is contained in:
@@ -194,7 +194,7 @@ public class BaiduVoicesUtils {
|
|||||||
private static String cuid = "0322java";
|
private static String cuid = "0322java";
|
||||||
|
|
||||||
public static String run(String content) throws Exception {
|
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();
|
holder.resfresh();
|
||||||
String token = holder.getToken();
|
String token = holder.getToken();
|
||||||
String url2 = url + "?tex=" + ConnUtil.urlEncode(content);
|
String url2 = url + "?tex=" + ConnUtil.urlEncode(content);
|
||||||
|
|||||||
@@ -481,13 +481,14 @@ public class HomeController {
|
|||||||
return R.ok().put("languageList",languageList);
|
return R.ok().put("languageList",languageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
//图书章节
|
//图书章节(仅返回在 book_chapter_content 中有实际正文的目录)
|
||||||
@RequestMapping("/getBookChapter")
|
@RequestMapping("/getBookChapter")
|
||||||
public R getBookChapter(@RequestBody Map<String,Object> params) {
|
public R getBookChapter(@RequestBody Map<String,Object> params) {
|
||||||
String language = params.containsKey("language")?params.get("language").toString():"中文";
|
String language = params.containsKey("language")?params.get("language").toString():"中文";
|
||||||
List<BookChapterEntity> chapterList = bookChapterService.list(new LambdaQueryWrapper<BookChapterEntity>()
|
List<BookChapterEntity> chapterList = bookChapterService.list(new LambdaQueryWrapper<BookChapterEntity>()
|
||||||
.eq(BookChapterEntity::getBookId,params.get("bookId"))
|
.eq(BookChapterEntity::getBookId,params.get("bookId"))
|
||||||
.eq(BookChapterEntity::getLanguage,language)
|
.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));
|
.orderByAsc(BookChapterEntity::getId));
|
||||||
return R.ok().put("chapterList",chapterList);
|
return R.ok().put("chapterList",chapterList);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user