记得上下班打卡 | git大法好,push需谨慎

Commit 8ba21aef authored by 张国柄's avatar 张国柄

~api:藏品ID列表缓存降级调整;

parent 6670f2f0
......@@ -2043,9 +2043,13 @@ public class GoblinRedisUtils {
/**
* 重置Redis中用户藏品ID集合的缓存(降级Mongo查取藏品ID集合)
*/
public boolean resetUserDigitalArtworkIdsByMongo(String uid) {
public void resetUserDigitalArtworkIdsByMongo(String uid) {
List<String> ids = goblinMongoUtils.getPageUserDigitalArtworkIds(uid, 1, 30);
return !CollectionUtils.isEmpty(ids) && redisUtil.set(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS.concat(uid), ids);
if (CollectionUtils.isEmpty(ids)) {
redisUtil.del(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS.concat(uid));
} else {
redisUtil.set(GoblinRedisConst.USER_DIGITAL_ARTWORK_IDS.concat(uid), ids);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment