[Add] CacheStoreCentral, BotCommandProcess Search命令增加对pageIndex参数使用(之前竟然是个摆设!?);

This commit is contained in:
LamGC 2020-06-18 10:05:34 +08:00
parent bccf47db6e
commit 368c78e171
2 changed files with 8 additions and 2 deletions

View File

@ -316,7 +316,7 @@ public class BotCommandProcess {
) throws IOException, InterruptedException {
log.debug("正在执行搜索...");
JsonObject resultBody = CacheStoreCentral.getCentral()
.getSearchBody(content, type, area, includeKeywords, excludeKeywords, contentOption);
.getSearchBody(content, type, area, includeKeywords, excludeKeywords, contentOption, pagesIndex);
StringBuilder result = new StringBuilder("内容 " + content + " 的搜索结果:\n");
log.debug("正在处理信息...");

View File

@ -423,7 +423,9 @@ public final class CacheStoreCentral {
String area,
String includeKeywords,
String excludeKeywords,
String contentOption) throws IOException {
String contentOption,
int pageIndex
) throws IOException {
PixivSearchLinkBuilder searchBuilder = new PixivSearchLinkBuilder(Strings.isNullOrEmpty(content) ? "" : content);
if (type != null) {
try {
@ -463,6 +465,10 @@ public final class CacheStoreCentral {
}
}
if(pageIndex > 0) {
searchBuilder.setPage(pageIndex);
}
log.debug("正在搜索作品, 条件: {}", searchBuilder.getSearchCondition());
Locker<String> locker