From 0c02f3d74197b58b1f18fba9430f53fc0d5a1b3b Mon Sep 17 00:00:00 2001 From: HuangXin Date: Mon, 20 Jul 2020 11:28:27 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E5=A2=9E=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...heManager.java => UserAccountManager.java} | 2 +- .../manager/impl/UserAccountManagerImpl.java | 57 +++++++++++++++++++ .../service/impl/UserAccountServiceImpl.java | 4 +- 3 files changed, 60 insertions(+), 3 deletions(-) rename src/main/java/com/dispose/manager/{UserAccountCacheManager.java => UserAccountManager.java} (97%) create mode 100644 src/main/java/com/dispose/manager/impl/UserAccountManagerImpl.java diff --git a/src/main/java/com/dispose/manager/UserAccountCacheManager.java b/src/main/java/com/dispose/manager/UserAccountManager.java similarity index 97% rename from src/main/java/com/dispose/manager/UserAccountCacheManager.java rename to src/main/java/com/dispose/manager/UserAccountManager.java index 4e15c084..86582ef6 100644 --- a/src/main/java/com/dispose/manager/UserAccountCacheManager.java +++ b/src/main/java/com/dispose/manager/UserAccountManager.java @@ -9,7 +9,7 @@ import java.security.NoSuchAlgorithmException; * * @author */ -public interface UserAccountCacheManager { +public interface UserAccountManager { /** * Gets user token. * diff --git a/src/main/java/com/dispose/manager/impl/UserAccountManagerImpl.java b/src/main/java/com/dispose/manager/impl/UserAccountManagerImpl.java new file mode 100644 index 00000000..d7be3913 --- /dev/null +++ b/src/main/java/com/dispose/manager/impl/UserAccountManagerImpl.java @@ -0,0 +1,57 @@ +package com.dispose.manager.impl; + +import com.dispose.common.ErrorCode; +import com.dispose.manager.UserAccountManager; +import com.dispose.mapper.UserAccountMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.security.NoSuchAlgorithmException; + +@Component +@Slf4j +public class UserAccountManagerImpl implements UserAccountManager { + @Resource + private UserAccountMapper userAccountMapper; + + @Override + public String getUserToken(String username) throws NoSuchAlgorithmException { + return null; + } + + @Override + public int getUsrPwdErrTimes(String username) { + return 0; + } + + @Override + public void setUserPwdErrTimes(String username, Integer errTimes) { + + } + + @Override + public void cleanUserToken(String username) { + + } + + @Override + public ErrorCode verifyUserLogin(String username, String token) { + return null; + } + + @Override + public ErrorCode verifyToken(String token) { + return null; + } + + @Override + public String getUsernameByToken(String token) { + return null; + } + + @Override + public ErrorCode verifyPermission(String token) { + return null; + } +} diff --git a/src/main/java/com/dispose/service/impl/UserAccountServiceImpl.java b/src/main/java/com/dispose/service/impl/UserAccountServiceImpl.java index a2275dac..2686f011 100644 --- a/src/main/java/com/dispose/service/impl/UserAccountServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/UserAccountServiceImpl.java @@ -3,7 +3,7 @@ package com.dispose.service.impl; import com.dispose.common.ConstValue; import com.dispose.common.ErrorCode; import com.dispose.config.DisposeConfigure; -import com.dispose.manager.UserAccountCacheManager; +import com.dispose.manager.UserAccountManager; import com.dispose.mapper.UserAccountMapper; import com.dispose.pojo.entity.UserAccount; import com.dispose.pojo.po.MulReturnType; @@ -24,7 +24,7 @@ import java.security.NoSuchAlgorithmException; public class UserAccountServiceImpl implements UserAccountService { @Resource - private UserAccountCacheManager userAccountCacheManager; + private UserAccountManager userAccountCacheManager; @Resource private UserAccountMapper userAccountMapper;