소스 검색

移动一个在外面的静态变量文件夹

tanzhongran 4 년 전
부모
커밋
0dc4fffb75

+ 0 - 8
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/constant/RedisKeysConstant.java

@@ -1,8 +0,0 @@
-package com.abi.qms.platform.constant;
-
-public class RedisKeysConstant {
-
-    //下载发送短信验证
-    public static final String DOWNLOAD_MOBILE_MSG = "qms.download.key:" ;
-
-}

+ 4 - 7
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/infrastructure/constant/RedisKey.java

@@ -5,13 +5,6 @@ package com.abi.qms.platform.infrastructure.constant;
  * @date 2021/4/15 16:31
  */
 public class RedisKey {
-
-    //用户key是userID,value是token
-    public static final String USER_ID_TOKEN = "USER_ID_TOKEN_";
-
-    //用户key是token,value是userId
-    public static final String USER_TOKEN_ID = "USER_TOKEN_ID_";
-
     /**
      * 用户登录token key
      */
@@ -22,4 +15,8 @@ public class RedisKey {
      */
     public static final String TOKEN_KEY_USER_ID = "qms:token:user:";
 
+    /**
+     * 下载发送短信验证
+     */
+    public static final String DOWNLOAD_MOBILE_MSG = "qms:download:package:key:" ;
 }

+ 3 - 3
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrPackageServiceImpl.java

@@ -2,7 +2,6 @@ package com.abi.qms.platform.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
 import com.abi.base.foundation.util.RedisClient;
-import com.abi.qms.platform.constant.RedisKeysConstant;
 import com.abi.qms.platform.dao.entity.*;
 import com.abi.qms.platform.dao.enums.*;
 import com.abi.qms.platform.dao.mapper.*;
@@ -10,6 +9,7 @@ import com.abi.qms.platform.dao.tablestore.entity.QrCode;
 import com.abi.qms.platform.dao.vo.result.*;
 import com.abi.qms.platform.dto.req.*;
 import com.abi.qms.platform.dto.res.*;
+import com.abi.qms.platform.infrastructure.constant.RedisKey;
 import com.abi.qms.platform.infrastructure.mq.GenerateCodeConsumer;
 import com.abi.qms.platform.infrastructure.util.*;
 import com.abi.qms.platform.service.FactoryService;
@@ -674,7 +674,7 @@ public class QrPackageServiceImpl implements QrPackageService {
         //key:packId:mobile
         Long packId = qrPackage.getId();
         String mobile = factory.getKeymanMobile();
-        String key = MessageFormat.format("{0}{1}:{2}", RedisKeysConstant.DOWNLOAD_MOBILE_MSG, packId, mobile);
+        String key = MessageFormat.format("{0}{1}:{2}", RedisKey.DOWNLOAD_MOBILE_MSG, packId, mobile);
 
         //获取随机验证码
         String captcha = RandomCodeUtils.getCaptcha(6);
@@ -695,7 +695,7 @@ public class QrPackageServiceImpl implements QrPackageService {
      * @return
      */
     private boolean verifyCaptcha(String mobile, String inputCaptcha, Long packId) {
-        String key = MessageFormat.format("{0}{1}:{2}", RedisKeysConstant.DOWNLOAD_MOBILE_MSG, packId, mobile);
+        String key = MessageFormat.format("{0}{1}:{2}", RedisKey.DOWNLOAD_MOBILE_MSG, packId, mobile);
         log.info("验证下载key:{}", key);
         String captcha = redisClient.get(key);
         log.info(inputCaptcha + "--------------------" + captcha);