From b68f4bc7d68608b293f7de72d550efb0a8b67528 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 28 Oct 2020 12:28:29 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java |    7 +++++++
 src/main/resources/application-prodapp.yml                                       |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java b/src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java
index 265b41a..f12fc7e 100644
--- a/src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/common/system/service/impl/CommonServiceImpl.java
@@ -5,6 +5,7 @@
 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;
@@ -23,8 +24,14 @@
     @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;
diff --git a/src/main/resources/application-prodapp.yml b/src/main/resources/application-prodapp.yml
index e8ba35f..4f34df2 100644
--- a/src/main/resources/application-prodapp.yml
+++ b/src/main/resources/application-prodapp.yml
@@ -91,7 +91,7 @@
 
 
 app:
-  debug: false
+  debug: true
   redis_expire: 3000
   kline-update-job: false
   newest-price-update-job: false

--
Gitblit v1.9.1