LAPTOP-KB9HII50\70708 преди 2 години
родител
ревизия
b837be44ed

+ 3 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyIotLoginEndpoint.java

@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
 * @Auther hmf
@ -104,6 +105,8 @@ public class WlyyIotLoginEndpoint {
        if (org.apache.commons.lang3.StringUtils.isNotBlank(captcha)&& captcha.equals(text.toLowerCase())){
            pass = true;
            redisTemplate.delete(key);
            //设置过期时间2分钟
            redisTemplate.opsForValue().set(key,text.toLowerCase(),2, TimeUnit.MINUTES);
        }
        return pass;
    }