|
|
@@ -2,7 +2,6 @@ package com.zhongshu.card.server.core.service.pay;
|
|
|
|
|
|
import com.github.microservice.components.data.base.page.PageableModel;
|
|
|
import com.github.microservice.pay.client.model.ledger.*;
|
|
|
-import com.github.microservice.pay.client.model.ledger.transaction.BaseQueryTransactionLogModel;
|
|
|
import com.github.microservice.pay.client.model.ledger.transaction.GeneralLedgerQueryTransactionLogModel;
|
|
|
import com.github.microservice.pay.client.model.ledger.transaction.TransactionLogAggregateRetModel;
|
|
|
import com.github.microservice.pay.client.ret.ResultContent;
|
|
|
@@ -18,11 +17,11 @@ import com.zhongshu.card.server.core.util.CommonUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.bson.Document;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.web.PagedModel;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
@@ -68,6 +67,9 @@ public class SettleService {
|
|
|
if (aggregateResult.getContent().getPages().getContent().isEmpty()){
|
|
|
return ResultContent.buildContent(new HashSet<>());
|
|
|
}
|
|
|
+ Set<String> orderNoSet = new HashSet<>();
|
|
|
+ Set<String> collect = aggregateResult.getContent().getPages().getContent().stream().map(TransactionLogModel::getOrderNumber).collect(Collectors.toSet());
|
|
|
+
|
|
|
|
|
|
//收入-支出=可提现金额
|
|
|
long settleAmount = aggregateResult.getContent().getStatistics().getCreditCount() - aggregateResult.getContent().getStatistics().getDebitCount();
|
|
|
@@ -102,7 +104,7 @@ public class SettleService {
|
|
|
List<TransactionLogModel> content = aggregateResult.getContent().getPages().getContent();
|
|
|
|
|
|
if (transfer.getState().equals(ResultState.Success)){
|
|
|
- Set<String> orderNoSet = new HashSet<>();
|
|
|
+
|
|
|
content.forEach(it -> {
|
|
|
UpdateTransactionLogModel updateTransactionLogModel = new UpdateTransactionLogModel();
|
|
|
Map<String, Object> meta = it.getMeta();
|