|
|
@@ -264,6 +264,11 @@ public class GroupRelationController {
|
|
|
//获取双重验证码
|
|
|
Integer num = groupRelationFrontService.getUserCodeNumBySkuId(userId, groupsRelationView.getSkuId());
|
|
|
if (count >= num) throw BusinessRuntimeException.getInstance("获取双重验证码次数上限");
|
|
|
+ //一分钟内 只能一人获取
|
|
|
+ boolean b = redisService.setNx(RedisService.key.DOUBLE_VERIFY_CODE_VIEW_MINUTES_KEY.getEnvName() + groupsRelationView.getTripsAccount(), relationId, RedisService.key.DOUBLE_VERIFY_CODE_VIEW_MINUTES_KEY.getTimeout());
|
|
|
+ if (!b) {
|
|
|
+ throw BusinessRuntimeException.getInstance("一分钟内已有人获取该账号验证码,请稍后获取..");
|
|
|
+ }
|
|
|
int second = now.second();
|
|
|
if (second < 30 && 30 - second < 3) {
|
|
|
ThreadUtil.sleep(30 - second + 1, TimeUnit.SECONDS);
|