mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-03 16:06:38 +00:00
fix: 小说封面图修改
This commit is contained in:
@ -238,6 +238,14 @@ public class AuthorController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询AI生成图片
|
||||
*/
|
||||
@GetMapping("queryAiGenPic")
|
||||
public RestResult<String> queryAiGenPic(@RequestParam("bookId") Long bookId) {
|
||||
return RestResult.ok(bookService.queryAiGenPic(bookId));
|
||||
}
|
||||
|
||||
/**
|
||||
* AI扩写
|
||||
*/
|
||||
|
@ -290,4 +290,9 @@ public interface BookService {
|
||||
* @param authorId
|
||||
*/
|
||||
void updateBookPic(Long bookId, String bookPic, Long authorId);
|
||||
|
||||
/**
|
||||
* 查询AI生成图片
|
||||
*/
|
||||
String queryAiGenPic(Long bookId);
|
||||
}
|
||||
|
@ -559,6 +559,7 @@ public class BookServiceImpl implements BookService {
|
||||
.where(id, isEqualTo(book.getId()))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
cacheService.set(CacheKey.AI_GEN_PIC + book.getId(), picUrl, 60 * 60);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -882,5 +883,10 @@ public class BookServiceImpl implements BookService {
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryAiGenPic(Long bookId) {
|
||||
return cacheService.get(CacheKey.AI_GEN_PIC + bookId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user