|
|
@@ -1,6 +1,5 @@
|
|
|
package com.zhongshu.card.server.core.service.pay;
|
|
|
|
|
|
-import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.github.microservice.core.util.JsonUtil;
|
|
|
import com.github.microservice.core.util.bean.BeanUtil;
|
|
|
import com.github.microservice.core.util.queue.ExecuteQueueUtil;
|
|
|
@@ -48,7 +47,9 @@ import org.springframework.util.StopWatch;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.MathContext;
|
|
|
import java.math.RoundingMode;
|
|
|
-import java.util.*;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
@@ -339,7 +340,7 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
|
|
|
private List<SatInfo> buildSatInfo(String projectOid, BigDecimal total, String orderNo, String sysSourceNo, List<SatInfoModel> satInfoModels) {
|
|
|
//按比例降序排序
|
|
|
- satInfoModels.sort((a, b)-> b.getRatio().compareTo(a.getRatio()));
|
|
|
+ satInfoModels.sort((a, b) -> b.getRatio().compareTo(a.getRatio()));
|
|
|
|
|
|
List<SatInfo> satInfos = satInfoModels.stream().map(model -> {
|
|
|
if (BigDecimal.ZERO.compareTo(model.getRatio()) >= 0) {
|
|
|
@@ -375,9 +376,9 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
shareOrder.setShareOrderNo(shareOrderNo);
|
|
|
shareOrderDao.save(shareOrder);
|
|
|
return satInfo;
|
|
|
- }).toList();
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
|
- if (satInfos.size()>1){
|
|
|
+ if (satInfos.size() > 1) {
|
|
|
SatInfo satInfo = satInfos.get(0);
|
|
|
BigDecimal upSatAmt = new BigDecimal(satInfo.getSatAmt()).add(new BigDecimal("1"));
|
|
|
satInfo.setSatAmt(upSatAmt.toBigInteger().toString());
|
|
|
@@ -386,7 +387,7 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
return satInfos;
|
|
|
}
|
|
|
|
|
|
- private String buildShareOrderNo(String sysSourceNo){
|
|
|
+ private String buildShareOrderNo(String sysSourceNo) {
|
|
|
return sysSourceNo + DateUtils.paresTime(System.currentTimeMillis(), DateUtils.patternyyyyMMddHHmmssSSS) + CommonUtil.randomCode(7);
|
|
|
}
|
|
|
|
|
|
@@ -475,8 +476,8 @@ public class ChinaumsSenselessPayService extends SuperService {
|
|
|
result.setData(refundQuery.getContent());
|
|
|
result.setDone(true);
|
|
|
return result;
|
|
|
- }else if (refundQuery.getContent().getRefundStatus().equals("PROCESSING")) {
|
|
|
- if (it.getIndex()>4){
|
|
|
+ } else if (refundQuery.getContent().getRefundStatus().equals("PROCESSING")) {
|
|
|
+ if (it.getIndex() > 4) {
|
|
|
result.setData(refundQuery.getContent());
|
|
|
result.setDone(true);
|
|
|
return result;
|