Commit 03c3e323 authored by 技术部-任文超's avatar 技术部-任文超

增加注解

parent 1b4b1d95
......@@ -300,6 +300,8 @@ public class SmsController implements IBaseController {
return JsonResult.buildErrorStateResult("今天已获取5次语音验证码,请使用短信验证码或明天再试", null);
}
String clientIp = getIp();
// Todo - 运维解决真实IP获取问题后,打开这段代码,实现按IP限制短信验证码获取量
// Todo - 另:当前的计数器计数方式为乐观累加,而且还是提前计数,会导致边界值问题,即临界次数会提前一次记满,并且在后续请求到达时计数器会继续计数
/* if (!StringUtils.isEmpty(clientIp)) {
String verificationIPCountKey = Constants.REDIS_VOICE_IP_COUNT+clientIp;
Long getIPVerificationCount = redisTemplate.opsForHash().increment(verificationIPCountKey, Constants.REDIS_VOICE_IP_COUNT, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment