admin
2022-05-12 fa705507ba574c857b1667553737d23b1b7ff495
src/main/resources/code/service/app/src/main/java/com/ks/app/service/manager/VerifyCodeManager.java
@@ -3,6 +3,7 @@
import com.ks.app.entity.SystemEnum;
import com.ks.app.entity.config.SystemConfigKey;
import com.ks.app.service.inter.config.SystemConfigService;
import com.ks.app.utils.Constant;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.yeshi.utils.StringUtil;
@@ -62,7 +63,9 @@
     * @param: code
     **/
    public boolean isPhoneCodeRight(SystemEnum system, String phone, String code) {
        if (!Constant.VERIFY_VCODE) {
            return true;
        }
        String value = systemConfigService.getValueCache(system, SystemConfigKey.testAccount);
        //测试账号
        if (!StringUtil.isNullOrEmpty(value)) {
@@ -75,7 +78,6 @@
        String oldCode = redisTemplate.opsForValue().get(String.format("vcp-%s-%s", system.name(), phone));
        return oldCode != null && oldCode.equalsIgnoreCase(code);
//        return true;
    }
    /**
@@ -90,6 +92,4 @@
        Object oldCode = redisTemplate.opsForValue().get("v-c-e-" + StringUtil.Md5(email));
        return oldCode != null && oldCode.toString().equalsIgnoreCase(code);
    }
}
}