Преглед на файлове

Merge remote-tracking branch 'origin/dev' into dev

24282 преди 2 години
родител
ревизия
6ecd646225
променени са 1 файла, в които са добавени 8 реда и са изтрити 3 реда
  1. 8 3
      hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java

+ 8 - 3
hx-account/src/main/java/com/fjhx/account/service/account/impl/AccountRequestFundsServiceImpl.java

@@ -94,9 +94,14 @@ public class AccountRequestFundsServiceImpl extends ServiceImpl<AccountRequestFu
         DynamicDataSourceContextHolder.push(SourceConstant.BASE);
 
         // 赋值流程实例id
-        flowExampleService.attributeAssign(records, BaseIdPo::getId, (item, flowExample) -> {
-            item.setFlowInfoId(flowExample.getId());
-        });
+        List<Long> accountRequestFundsIds = records.stream().map(AccountRequestFundsVo::getId).collect(Collectors.toList());
+        if (ObjectUtil.isNotEmpty(accountRequestFundsIds)) {
+            Map<Long, Long> arfMap = flowExampleService.mapKV(FlowExample::getBusinessId, FlowExample::getId,
+                    q -> q.in(FlowExample::getBusinessId, accountRequestFundsIds));
+            for (AccountRequestFundsVo record : records) {
+                record.setFlowInfoId(arfMap.get(record.getId()));
+            }
+        }
 
         // 查询部门id列表
         List<Long> deptIdList = records.stream()