| | |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param seconds |
| | | * -缓存时间(s) |
| | | * @param seconds -缓存时间(s) |
| | | */ |
| | | private void setString(String key, String value, int seconds) { |
| | | Jedis jedis = getJedis(); |
| | |
| | | return JsonUtil.jsonToList(value, clazz); |
| | | } |
| | | |
| | | public boolean isSmsFrequencyLimit(String phone, Integer type) { |
| | | if (type == null) { |
| | | type = 0; |
| | | } |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSVCode, phone + "-" + type); |
| | | String value = getCommonString(key); |
| | | if (StringUtil.isNullOrEmpty(value)) |
| | | return false; |
| | | else |
| | | return true; |
| | | } |
| | | |
| | | } |