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;