Commit 357702a9 by 春觉晓

修改商品实付金额计算逻辑

1 parent ef5317a0
......@@ -21,6 +21,8 @@ import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -151,6 +153,12 @@ public class PlatformOrderController {
exportVO.setTotalPrice(
(redeemPoints * exportVO.getSellQty()) + "积分");
indexNumber.getAndIncrement();
//计算订单总积分: 运费 + 商品积分
BigDecimal totalScore = new BigDecimal(redeemPoints.toString()).multiply(new BigDecimal(exportVO.getSellQty()));
if (index.getFreightAmount() != null) {
totalScore = totalScore.add(index.getFreightAmount());
}
exportVO.setTotalScore(totalScore);
return exportVO;
}).collect(Collectors.toList());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!