|
@@ -267,4 +267,15 @@ public class AccountServiceImpl extends ServiceImpl<IAccountMapper, Account> imp
|
|
|
Page<AccountVO> page = this.baseMapper.page(new Page<>(accountDTO.getPageNum(), accountDTO.getPageSize()), accountDTO);
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void delete(AccountDTO accountDTO) {
|
|
|
+ Account account = this.getById(accountDTO.getId());
|
|
|
+ if(Objects.isNull(account)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_3021);
|
|
|
+ }
|
|
|
+ this.removeById(account.getId());
|
|
|
+ UserAuthInfo userAuthInfo = userAuthService.findByAccountId(account.getId());
|
|
|
+ userAuthService.removeById(userAuthInfo.getId());
|
|
|
+ }
|
|
|
}
|