From 7a46652a74dc1c96491b05ce24b703843301ef4d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Wed, 9 Dec 2020 15:22:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=BC=93=E5=AD=98=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/redis/RedisUtils.java | 11 +++++++++++ .../com/epmet/redis/IssueProjectTagDictRedis.java | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java index 6e96d4c9dc..de481f10fd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java @@ -375,6 +375,17 @@ public class RedisUtils { return redisTemplate.opsForZSet().score(key,o); } + /** + * @Description zset添加 + * @Param key + * @Param o + * @author zxc + * @date 2020/12/9 下午3:18 + */ + public void zSetAdd(String key, Object o){ + redisTemplate.opsForZSet().add(key,o,NumConstant.ZERO); + } + /** * @Description 判断key是否存在 * @param key diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java index bfb6355cfa..5236c91a56 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/redis/IssueProjectTagDictRedis.java @@ -96,4 +96,17 @@ public class IssueProjectTagDictRedis { } } + /** + * @Description 标签添加 + * @Param customerId + * @Param categoryId + * @Param o + * @author zxc + * @date 2020/12/9 下午3:19 + */ + public void addIssueProjectTag(String customerId,String categoryId,Object o){ + String key = GovIssueRedisKeys.getGovernmentTagKey(customerId, categoryId); + redisUtils.zSetAdd(key,o); + } + } \ No newline at end of file