|
|
|
@ -576,17 +576,14 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
|
// 调用查询接口 |
|
|
|
PageInfo<UserWalletVO> result = cashCollectionService.selectUserWallets(jwcode, market, pageNum, pageSize); |
|
|
|
|
|
|
|
// 翻译处理并将数据扁平化(一个用户多个钱包要拆分成多行) |
|
|
|
// 翻译处理 |
|
|
|
List<UserWalletVO> flatList = new ArrayList<>(); |
|
|
|
if (result != null && result.getList() != null) { |
|
|
|
translateUserWalletList((List<UserWalletVO>) result.getList(), lang); |
|
|
|
translateUserWalletList(result.getList(), lang); |
|
|
|
|
|
|
|
// 将嵌套结构转换为扁平列表(每个钱包作为一行) |
|
|
|
for (UserWalletVO vo : result.getList()) { |
|
|
|
if (vo.getWalletList() != null && !vo.getWalletList().isEmpty()) { |
|
|
|
// 为每个钱包创建一个独立的 UserWalletVO 对象 |
|
|
|
for (WalletItem wallet : vo.getWalletList()) { |
|
|
|
// 只添加 walletId 不为 null 的钱包 |
|
|
|
if (wallet.getWalletId() != null) { |
|
|
|
UserWalletVO flatVO = new UserWalletVO(); |
|
|
|
flatVO.setJwcode(vo.getJwcode()); |
|
|
|
@ -600,8 +597,6 @@ public class ExportExcelServiceImpl implements ExportExcelService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 更新分页信息的 list 为扁平化后的列表 |
|
|
|
result.setList(flatList); |
|
|
|
} |
|
|
|
|
|
|
|
|