|
@@ -1,12 +1,10 @@
|
|
|
package cn.reghao.tnb.account.app.rpc;
|
|
package cn.reghao.tnb.account.app.rpc;
|
|
|
|
|
|
|
|
-import cn.reghao.jutil.jdk.db.Page;
|
|
|
|
|
import cn.reghao.jutil.jdk.db.PageList;
|
|
import cn.reghao.jutil.jdk.db.PageList;
|
|
|
import cn.reghao.tnb.account.api.dto.AccountInfo;
|
|
import cn.reghao.tnb.account.api.dto.AccountInfo;
|
|
|
import cn.reghao.tnb.account.api.dto.AccountRegistry;
|
|
import cn.reghao.tnb.account.api.dto.AccountRegistry;
|
|
|
import cn.reghao.tnb.account.api.dto.AdminCreateAccount;
|
|
import cn.reghao.tnb.account.api.dto.AdminCreateAccount;
|
|
|
import cn.reghao.tnb.account.api.iface.AdminAccountService;
|
|
import cn.reghao.tnb.account.api.iface.AdminAccountService;
|
|
|
-import cn.reghao.tnb.account.app.db.mapper.UserAccountMapper;
|
|
|
|
|
import cn.reghao.tnb.account.app.db.repository.AccountRepository;
|
|
import cn.reghao.tnb.account.app.db.repository.AccountRepository;
|
|
|
import cn.reghao.tnb.account.app.model.po.UserRegistry;
|
|
import cn.reghao.tnb.account.app.model.po.UserRegistry;
|
|
|
import cn.reghao.tnb.account.app.service.AccountRegistryService;
|
|
import cn.reghao.tnb.account.app.service.AccountRegistryService;
|
|
@@ -14,8 +12,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
import org.apache.dubbo.config.annotation.DubboService;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author reghao
|
|
* @author reghao
|
|
|
* @date 2024-07-31 07:00:22
|
|
* @date 2024-07-31 07:00:22
|
|
@@ -24,35 +20,27 @@ import java.util.List;
|
|
|
@DubboService
|
|
@DubboService
|
|
|
@Service
|
|
@Service
|
|
|
public class AdminAccountServiceImpl implements AdminAccountService {
|
|
public class AdminAccountServiceImpl implements AdminAccountService {
|
|
|
- private final int pageSize = 100;
|
|
|
|
|
private final AccountRepository accountRepository;
|
|
private final AccountRepository accountRepository;
|
|
|
- private final UserAccountMapper userAccountMapper;
|
|
|
|
|
private final AccountRegistryService accountRegistryService;
|
|
private final AccountRegistryService accountRegistryService;
|
|
|
|
|
|
|
|
- public AdminAccountServiceImpl(AccountRepository accountRepository, UserAccountMapper userAccountMapper,
|
|
|
|
|
- AccountRegistryService accountRegistryService) {
|
|
|
|
|
|
|
+ public AdminAccountServiceImpl(AccountRepository accountRepository, AccountRegistryService accountRegistryService) {
|
|
|
this.accountRepository = accountRepository;
|
|
this.accountRepository = accountRepository;
|
|
|
- this.userAccountMapper = userAccountMapper;
|
|
|
|
|
this.accountRegistryService = accountRegistryService;
|
|
this.accountRegistryService = accountRegistryService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
public AccountRegistry getAccountRegistry() {
|
|
public AccountRegistry getAccountRegistry() {
|
|
|
UserRegistry userRegistry = accountRepository.getUserRegistry();
|
|
UserRegistry userRegistry = accountRepository.getUserRegistry();
|
|
|
return new AccountRegistry(userRegistry.getEnabled(), userRegistry.getRule());
|
|
return new AccountRegistry(userRegistry.getEnabled(), userRegistry.getRule());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
public void setAccountRegistry(AccountRegistry accountRegistry) {
|
|
public void setAccountRegistry(AccountRegistry accountRegistry) {
|
|
|
accountRepository.updateUserRegistry();
|
|
accountRepository.updateUserRegistry();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
public PageList<AccountInfo> getByScreenName(String screenName, int pageNumber, int pageSize) {
|
|
public PageList<AccountInfo> getByScreenName(String screenName, int pageNumber, int pageSize) {
|
|
|
return PageList.empty();
|
|
return PageList.empty();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
public void createAccount(AdminCreateAccount adminCreateAccount) {
|
|
public void createAccount(AdminCreateAccount adminCreateAccount) {
|
|
|
accountRegistryService.createAccount(adminCreateAccount);
|
|
accountRegistryService.createAccount(adminCreateAccount);
|
|
|
}
|
|
}
|