| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.xcong.excoin.common.contants.AppContants; |
| | | import com.xcong.excoin.common.system.service.CommonService; |
| | | import com.xcong.excoin.configurations.properties.ApplicationProperties; |
| | | import com.xcong.excoin.utils.RedisUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | private RedisUtils redisUtils; |
| | | |
| | | @Resource |
| | | private ApplicationProperties properties; |
| | | |
| | | @Override |
| | | public boolean verifyCode(String account, String code) { |
| | | if (properties.isDebug()) { |
| | | return true; |
| | | } |
| | | String cacheCode = redisUtils.getString(AppContants.VERIFY_CODE_PREFIX + account); |
| | | if (StrUtil.isBlank(cacheCode)) { |
| | | return false; |