deason 5 年 前
コミット
671fcb6772

+ 1 - 1
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/VerifyCodeService.java

@@ -11,7 +11,7 @@ public interface VerifyCodeService {
     /**
     /**
      * 验证码生成接口
      * 验证码生成接口
      *
      *
-     * @return 字符串:base64 + uuid
+     * @return 字符串:uuid(32位) + base64
      */
      */
     String verifyCodeGenerate(Long rootOrgId, String accountValue);
     String verifyCodeGenerate(Long rootOrgId, String accountValue);
 
 

+ 7 - 7
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/VerifyCodeServiceImpl.java

@@ -1,13 +1,13 @@
 package cn.com.qmth.examcloud.core.basic.service.impl;
 package cn.com.qmth.examcloud.core.basic.service.impl;
 
 
 import cn.com.qmth.examcloud.api.commons.security.bean.User;
 import cn.com.qmth.examcloud.api.commons.security.bean.User;
+import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
+import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
 import cn.com.qmth.examcloud.commons.util.UUID;
 import cn.com.qmth.examcloud.commons.util.UUID;
 import cn.com.qmth.examcloud.core.basic.base.util.VerifyCode;
 import cn.com.qmth.examcloud.core.basic.base.util.VerifyCode;
 import cn.com.qmth.examcloud.core.basic.service.VerifyCodeService;
 import cn.com.qmth.examcloud.core.basic.service.VerifyCodeService;
 import cn.com.qmth.examcloud.core.basic.service.bean.VerifyCodeLoginInfo;
 import cn.com.qmth.examcloud.core.basic.service.bean.VerifyCodeLoginInfo;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**
@@ -16,12 +16,12 @@ import org.springframework.stereotype.Service;
 @Service
 @Service
 public class VerifyCodeServiceImpl implements VerifyCodeService {
 public class VerifyCodeServiceImpl implements VerifyCodeService {
 
 
-    private static final Logger log = LoggerFactory.getLogger(VerifyCodeServiceImpl.class);
+    private static final ExamCloudLog log = ExamCloudLogFactory.getLog(VerifyCodeServiceImpl.class);
 
 
     /**
     /**
      * 验证码生成接口
      * 验证码生成接口
      *
      *
-     * @return 字符串:base64 + uuid
+     * @return 字符串:uuid(32位) + base64
      */
      */
     @Override
     @Override
     public String verifyCodeGenerate(Long rootOrgId, String accountValue) {
     public String verifyCodeGenerate(Long rootOrgId, String accountValue) {
@@ -33,7 +33,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
 
 
         //todo
         //todo
 
 
-        return base64 + "#" + UUID.randomUUID();
+        return UUID.randomUUID() + base64;
     }
     }
 
 
     /**
     /**
@@ -44,7 +44,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
     @Override
     @Override
     public User verifyCodeLogin(VerifyCodeLoginInfo info) {
     public User verifyCodeLogin(VerifyCodeLoginInfo info) {
 
 
-        System.out.println(info.getVerifyCode());
+        log.info(info.getAccountValue() + " - " + info.getVerifyCode());
         //todo
         //todo
 
 
         return null;
         return null;
@@ -55,7 +55,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
      */
      */
     @Override
     @Override
     public void verifyCodeResource(String uuid) {
     public void verifyCodeResource(String uuid) {
-        System.out.println(uuid);
+        log.info(uuid);
         //todo
         //todo
     }
     }