|
|
@ -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<GovMenuDTO> 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); |
|
|
|
} |
|
|
|