|
|
@@ -317,9 +317,24 @@ public class WithdrawServiceImpl implements IWithdrawService {
|
|
|
.stream()
|
|
|
.collect(Collectors.toMap(WithdrawAccount::getId, Function.identity(), (left, right) -> left));
|
|
|
|
|
|
- SysTenantVo company = getCurrentCompany();
|
|
|
+ List<Long> companyIds = voList.stream()
|
|
|
+ .map(WithdrawVo::getCompanyId)
|
|
|
+ .filter(Objects::nonNull)
|
|
|
+ .distinct()
|
|
|
+ .toList();
|
|
|
+
|
|
|
+ Map<Long, SysTenant> companyMap = companyIds.isEmpty()
|
|
|
+ ? Map.of()
|
|
|
+ : sysTenantMapper.selectList(
|
|
|
+ Wrappers.<SysTenant>lambdaQuery().in(SysTenant::getId, companyIds))
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toMap(SysTenant::getId, Function.identity(), (left, right) -> left));
|
|
|
+
|
|
|
for (WithdrawVo vo : voList) {
|
|
|
- vo.setCompanyName(company.getCompanyName());
|
|
|
+ SysTenant company = companyMap.get(vo.getCompanyId());
|
|
|
+ if (company != null) {
|
|
|
+ vo.setCompanyName(company.getCompanyName());
|
|
|
+ }
|
|
|
WithdrawAccount account = accountMap.get(vo.getAccountId());
|
|
|
if (account != null) {
|
|
|
WithdrawAccountVo accountVo = new WithdrawAccountVo();
|