8.11 缓存优化bug解决
This commit is contained in:
parent
61e633f88e
commit
652a4973f0
@ -619,15 +619,16 @@ public class PictureServiceImpl extends ServiceImpl<PictureMapper, Picture>
|
||||
ThrowUtils.throwIf(!hasPermission, ErrorCode.NO_AUTH_ERROR);
|
||||
}
|
||||
|
||||
// 把查询条件序列化成 JSON
|
||||
String queryJson = JSONUtil.toJsonStr(Map.of(
|
||||
Map<String, Object> params = Map.of(
|
||||
"spaceId", spaceId == null ? "public" : spaceId,
|
||||
"category", queryRequest.getCategory(),
|
||||
"tags", queryRequest.getTags(),
|
||||
"searchText", queryRequest.getSearchText(),
|
||||
"category", Optional.ofNullable(queryRequest.getCategory()).orElse(""),
|
||||
"tags", Optional.ofNullable(queryRequest.getTags()).orElse(Collections.emptyList()),
|
||||
"searchText", Optional.ofNullable(queryRequest.getSearchText()).orElse(""),
|
||||
"current", current,
|
||||
"size", size
|
||||
));
|
||||
);
|
||||
// 把查询条件序列化成 JSON
|
||||
String queryJson = JSONUtil.toJsonStr(params);
|
||||
|
||||
// 计算 MD5 作为哈希(也可用 SHA256)
|
||||
String hash = DigestUtil.md5Hex(queryJson);
|
||||
|
Loading…
x
Reference in New Issue
Block a user