diff --git a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/cache/SmsPlatformCache.java b/maku-boot-system/src/main/java/net/maku/system/cache/SmsConfigCache.java similarity index 65% rename from maku-boot-module/maku-module-message/src/main/java/net/maku/message/cache/SmsPlatformCache.java rename to maku-boot-system/src/main/java/net/maku/system/cache/SmsConfigCache.java index c1c9556..66b15b4 100644 --- a/maku-boot-module/maku-module-message/src/main/java/net/maku/message/cache/SmsPlatformCache.java +++ b/maku-boot-system/src/main/java/net/maku/system/cache/SmsConfigCache.java @@ -1,8 +1,8 @@ -package net.maku.message.cache; +package net.maku.system.cache; import lombok.AllArgsConstructor; import net.maku.framework.common.cache.RedisCache; -import net.maku.message.sms.config.SmsConfig; +import net.maku.sms.config.SmsConfig; import org.springframework.stereotype.Service; import java.util.List; @@ -15,18 +15,19 @@ import java.util.List; */ @Service @AllArgsConstructor -public class SmsPlatformCache { +public class SmsConfigCache { private final RedisCache redisCache; /** * 短信平台轮询KEY */ - private final String SMS_ROUND_KEY = "message:sms:round"; + private final String SMS_ROUND_KEY = "sys:sms:round"; + private final String SMS_ROUND_CODE_KEY = "sys:sms:round:code"; /** * 短信平台列表KEY */ - private final String SMS_PLATFORM_KEY = "message:sms:platform"; + private final String SMS_PLATFORM_KEY = "sys:sms:platform"; /** * 获取短信轮询值 @@ -35,6 +36,13 @@ public class SmsPlatformCache { return redisCache.increment(SMS_ROUND_KEY); } + /** + * 获取短信编码轮询值 + */ + public Long getRoundCodeValue() { + return redisCache.increment(SMS_ROUND_CODE_KEY); + } + public List list() { return (List) redisCache.get(SMS_PLATFORM_KEY); }