...
|
...
|
@@ -83,13 +83,13 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl |
|
|
// 1.构造查询参数
|
|
|
String vectors = paramMap.get(VECTORS_KEY);
|
|
|
SearchParam searchParam = new SearchParam();
|
|
|
int pageSize = StringUtils.isBlank(paramMap.get("viewNum")) ? 5 : Integer.parseInt(paramMap.get("viewNum"));
|
|
|
int pageSize = StringUtils.isBlank(paramMap.get("viewNum")) ? 10 : Integer.parseInt(paramMap.get("viewNum"));
|
|
|
int page = StringUtils.isBlank(paramMap.get("page")) ? 1 : Integer.parseInt(paramMap.get("page"));
|
|
|
if (page < 1 || pageSize < 0) {
|
|
|
return new SearchApiResult().setCode(400).setMessage("分页参数错误");
|
|
|
}
|
|
|
if (pageSize > 500) {
|
|
|
pageSize = 500;
|
|
|
if (pageSize > 50) {
|
|
|
pageSize = 50;
|
|
|
}
|
|
|
searchParam.setPage(page);
|
|
|
searchParam.setOffset((page - 1) * pageSize);
|
...
|
...
|
|