TASK:模块化;
This commit is contained in:
@@ -2145,11 +2145,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
@Override
|
||||
public AccountLoginVO enterpriseLogin(AccountLoginDTO accountDTO) {
|
||||
QueryWrapper<Account> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(Account::getUserName, accountDTO.getUserName());
|
||||
qw.lambda().eq(Account::getUserEmail, accountDTO.getEmail());
|
||||
qw.lambda().eq(Account::getOrganizationName, accountDTO.getOrganizationName());
|
||||
List<Account> accounts = accountMapper.selectList(qw);
|
||||
if (CollectionUtil.isEmpty(accounts)) {
|
||||
throw new BusinessException("Username or enterprise name incorrect.");
|
||||
throw new BusinessException("UserEmail or enterprise name incorrect.");
|
||||
}
|
||||
qw.lambda().eq(Account::getUserPassword, accountDTO.getPassword());
|
||||
accounts = accountMapper.selectList(qw);
|
||||
@@ -2186,11 +2186,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
@Override
|
||||
public AccountLoginVO schoolLogin(AccountLoginDTO accountDTO) {
|
||||
QueryWrapper<Account> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(Account::getUserName, accountDTO.getUserName());
|
||||
qw.lambda().eq(Account::getUserEmail, accountDTO.getEmail());
|
||||
qw.lambda().eq(Account::getOrganizationName, accountDTO.getOrganizationName());
|
||||
List<Account> accounts = accountMapper.selectList(qw);
|
||||
if (CollectionUtil.isEmpty(accounts)) {
|
||||
throw new BusinessException("Username or school name incorrect.");
|
||||
throw new BusinessException("UserEmail or school name incorrect.");
|
||||
}
|
||||
qw.lambda().eq(Account::getUserPassword, accountDTO.getPassword());
|
||||
accounts = accountMapper.selectList(qw);
|
||||
|
||||
Reference in New Issue
Block a user