mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
优化
This commit is contained in:
parent
55635e098c
commit
f648a8e79e
@ -246,7 +246,7 @@ public class BookService {
|
|||||||
example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(indexNum);
|
example.createCriteria().andBookIdEqualTo(bookId).andIndexNumEqualTo(indexNum);
|
||||||
List<BookContent> bookContents = bookContentMapper.selectByExample(example);
|
List<BookContent> bookContents = bookContentMapper.selectByExample(example);
|
||||||
content = bookContents.size() > 0 ? bookContents.get(0) : null;
|
content = bookContents.size() > 0 ? bookContents.get(0) : null;
|
||||||
cacheUtil.setObject(CacheKeyConstans.BOOK_CONTENT_KEY_PREFIX + "_" + bookId + "_" + indexNum, content, 60 * 60 * 24);
|
cacheUtil.setObject(CacheKeyConstans.BOOK_CONTENT_KEY_PREFIX + "_" + bookId + "_" + indexNum, content, 60 * 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user