提交 596fe6d7 authored 作者: hzh's avatar hzh

代码优化

上级 358aa33d
......@@ -49,8 +49,11 @@ public class JsapiPayStrategy implements IPayStrategy {
OrderTradeBo ot = JsonUtils.parseObject(tradeBody, OrderTradeBo.class);
try {
String timeExpire = DateTimeZoneUtil.dateToTimeZone(ot.getExpireTime().getTime());
// 计算总金额
BigDecimal feeAmount = feeList.stream().map(OrderFeeVo::getFeeAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
//获取支付金额
int amount = new BigDecimal("100").multiply(new BigDecimal("100")).intValue();
int amount = new BigDecimal("100").multiply(feeAmount).intValue();
UnifiedOrderModel unifiedOrderModel = new UnifiedOrderModel()
.setAppid(config.getAppId())
.setMchid(config.getMchId())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论