From 38f340b37cad7d3d23a6718822c0dd91e7379135 Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 13 Apr 2022 17:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=94=BE=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=8A=A0=E5=BC=BA=E5=88=A4=E6=96=AD=20=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E8=A2=AB=E6=94=BE=E8=BF=9B=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/redis/GovCustomerMenuRedis.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java index 6190a7c4c0..911e42f59a 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java @@ -17,6 +17,7 @@ package com.epmet.redis; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; @@ -25,6 +26,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; import java.util.List; @@ -46,7 +48,7 @@ public class GovCustomerMenuRedis { * @see com.epmet.enums.MenuTypeEnum */ public void setCustomerMenuList(String customerId, Integer type, List govMenuDTOS) { - if (checkParam(customerId, type)) { + if (checkParam(customerId, type) && !CollectionUtils.isEmpty(govMenuDTOS) && StringUtils.isNotBlank(govMenuDTOS.get(NumConstant.ZERO).getName())) { String key = RedisKeys.getCustomerMenuList(customerId, type); redisUtils.set(key, govMenuDTOS, RedisUtils.DEFAULT_EXPIRE); }