|
@ -1,12 +1,12 @@ |
|
|
package com.epmet.commons.tools.redis.common; |
|
|
package com.epmet.commons.tools.redis.common; |
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.feign.CommonAggFeignClient; |
|
|
import com.epmet.commons.tools.feign.CommonAggFeignClient; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
import com.epmet.commons.tools.redis.common.bean.*; |
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -35,6 +35,7 @@ public class CustomerOrgRedis { |
|
|
private static CustomerOrgRedis customerOrgRedis; |
|
|
private static CustomerOrgRedis customerOrgRedis; |
|
|
private static final String ROLE_MAP_KEY = "roleMap"; |
|
|
private static final String ROLE_MAP_KEY = "roleMap"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct |
|
|
@PostConstruct |
|
|
public void init() { |
|
|
public void init() { |
|
|
customerOrgRedis = this; |
|
|
customerOrgRedis = this; |
|
@ -91,4 +92,13 @@ public class CustomerOrgRedis { |
|
|
return agencyInfoResult.getData(); |
|
|
return agencyInfoResult.getData(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* desc:删除网格缓存 |
|
|
|
|
|
* @param gridId |
|
|
|
|
|
*/ |
|
|
|
|
|
public static void delGridInfo(String gridId) { |
|
|
|
|
|
String key = RedisKeys.getGridInfoKey(gridId); |
|
|
|
|
|
customerOrgRedis.redisUtils.delete(key); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|