diff --git a/src/main/java/com/example/demo/mapper/coin/AuditMapper.java b/src/main/java/com/example/demo/mapper/coin/AuditMapper.java index 9552a4a..91a3a7b 100644 --- a/src/main/java/com/example/demo/mapper/coin/AuditMapper.java +++ b/src/main/java/com/example/demo/mapper/coin/AuditMapper.java @@ -51,4 +51,6 @@ public interface AuditMapper { void updateFirstRecharge(Integer jwcode); //获取审核人id对应人名 List getNamesByIds(Set submitterIds); + + List getNamesByJwcodes(Set executorIds); } diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java index c344781..b0eb762 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashRefundServiceImpl.java @@ -433,6 +433,7 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); PageHelper.startPage(pageNum, pageSize); // System.out.println(goldDetail.getMarkets()); List list = cashRefundMapper.exSelect(cashRecordDTO); + System.out.println( list); if (list.isEmpty()) { return new PageInfo<>(list); } @@ -442,12 +443,14 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); Set marketIds = new HashSet<>(); Set submitterIds = new HashSet<>(); Set auditIds = new HashSet<>(); + Set executorIds = new HashSet<>(); list.forEach(item -> { if (item.getRelatedId() != null) relatedIds.add(item.getRelatedId()); if (item.getMarket() != null) marketIds.add(item.getMarket()); if (item.getSubmitterId() != null) submitterIds.add(item.getSubmitterId()); if (item.getAuditId() != null) auditIds.add(item.getAuditId()); + if (item.getExecutor() != null) executorIds.add(item.getExecutor()); }); // 批量查询 @@ -462,6 +465,8 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); Map auditMap = cashRefundMapper.getAuditBatch(auditIds) .stream().collect(Collectors.toMap(LhlAudit::getId, Function.identity())); + Map executorNameMap = auditMapper.getNamesByJwcodes(executorIds) + .stream().collect(Collectors.toMap(Admin::getAccount, Admin::getAdminName)); // 处理数据 list.forEach(item -> { @@ -470,12 +475,15 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); processCashCollection(item, cashCollection); } + String marketName = marketNameMap.get(item.getMarket()); String submitter = submitterNameMap.get(item.getSubmitterId()); LhlAudit lhlAudit = auditMap.get(item.getAuditId()); + String executorName = executorNameMap.get(String.valueOf(item.getExecutor())); item.setMarketName(marketName != null ? marketName : ""); item.setSubmitter(submitter != null ? submitter : ""); + item.setExecutorName(executorName != null ? executorName : ""); if (lhlAudit != null) { item.setAreaServise(lhlAudit.getAreaServise()); diff --git a/src/main/resources/cashMapper/CashRefundMapper.xml b/src/main/resources/cashMapper/CashRefundMapper.xml index 7458fe6..a504a15 100644 --- a/src/main/resources/cashMapper/CashRefundMapper.xml +++ b/src/main/resources/cashMapper/CashRefundMapper.xml @@ -232,6 +232,7 @@ crc.num_unit, crr.refund_model, crr.submitter_id, + crr.executor, crr.refund_reason, crr.remark, crr.status, @@ -321,6 +322,7 @@ crr.refund_channels, crr.voucher, crr.refund_time, + crr.executor, crr.status, crr.audit_id, crr.submitter_id, diff --git a/src/main/resources/mapper/AuditMapper.xml b/src/main/resources/mapper/AuditMapper.xml index 6adbe84..f2609da 100644 --- a/src/main/resources/mapper/AuditMapper.xml +++ b/src/main/resources/mapper/AuditMapper.xml @@ -207,4 +207,18 @@ ORDER BY create_time DESC limit 1 + \ No newline at end of file