|
@@ -1,13 +1,13 @@
|
|
|
package cn.com.qmth.examcloud.core.basic.service.impl;
|
|
|
|
|
|
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.core.basic.base.util.VerifyCode;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.VerifyCodeService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.VerifyCodeLoginInfo;
|
|
|
import org.apache.commons.codec.binary.Base64;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
@@ -16,12 +16,12 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
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
|
|
|
public String verifyCodeGenerate(Long rootOrgId, String accountValue) {
|
|
@@ -33,7 +33,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
|
|
|
|
|
|
//todo
|
|
|
|
|
|
- return base64 + "#" + UUID.randomUUID();
|
|
|
+ return UUID.randomUUID() + base64;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -44,7 +44,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
|
|
|
@Override
|
|
|
public User verifyCodeLogin(VerifyCodeLoginInfo info) {
|
|
|
|
|
|
- System.out.println(info.getVerifyCode());
|
|
|
+ log.info(info.getAccountValue() + " - " + info.getVerifyCode());
|
|
|
//todo
|
|
|
|
|
|
return null;
|
|
@@ -55,7 +55,7 @@ public class VerifyCodeServiceImpl implements VerifyCodeService {
|
|
|
*/
|
|
|
@Override
|
|
|
public void verifyCodeResource(String uuid) {
|
|
|
- System.out.println(uuid);
|
|
|
+ log.info(uuid);
|
|
|
//todo
|
|
|
}
|
|
|
|