Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
33a8d5dd6a
3 files changed
+17
-7
No files matched your search
+7
-2
@@ -67,6 +67,7 @@ import com.bsd.pjcloud.hard.mapper.HardThirdMiOrderMapper;
|
||||
import com.bsd.pjcloud.hard.mapper.manager.HardManagerMapper;
|
||||
import com.bsd.pjcloud.hard.mapper.order.HardOrderMapper;
|
||||
import com.bsd.pjcloud.hard.service.*;
|
||||
import com.bsd.pjcloud.hard.utils.RemoteBatchQueryUtil;
|
||||
import com.bsd.pjcloud.supermarket.api.feign.RemoteMallProductService;
|
||||
import com.bsd.pjcloud.supermarket.api.feign.RemoteShopSkuService;
|
||||
import com.bsd.pjcloud.supermarket.api.feign.RemoteSupermarketSpuService;
|
||||
@@ -1781,7 +1782,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
RequestContextHolder.setRequestAttributes(requestAttributes);
|
||||
List<Long> walletIds = list.stream().map(HardOrderVo::getWalletId).filter(ObjectUtil::isNotEmpty).distinct().toList();
|
||||
if (ObjectUtil.isNotEmpty(walletIds)) {
|
||||
List<WalletManageVo> walletList = remoteWalletService.getWalletByIds(walletIds).getData();
|
||||
List<WalletManageVo> walletList = getWalletListByIds(walletIds);
|
||||
Map<Long, WalletManageVo> walletMap = CollectionUtils.convertMap(walletList, WalletManageVo::getId);
|
||||
for (HardOrderVo v : list) {
|
||||
WalletManageVo target = walletMap.get(v.getWalletId());
|
||||
@@ -1801,4 +1802,8 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
}
|
||||
CompletableFuture.allOf(deptFuture, mchFuture, deviceFuture, currentDeptFuture, walletFuture).join();
|
||||
}
|
||||
}
|
||||
|
||||
private List<WalletManageVo> getWalletListByIds(List<Long> walletIds) {
|
||||
return RemoteBatchQueryUtil.queryByIds(walletIds, ids -> remoteWalletService.getWalletByIds(ids).getData());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user