TASK:模块化;

This commit is contained in:
shahaibo
2025-04-10 14:17:28 +08:00
parent 03ae184541
commit cf9b621159

View File

@@ -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);