Commit 82ffa80c by 吕明尚

修改美团优惠券的支付金额的获取

parent 12b51259
...@@ -55,6 +55,7 @@ import java.util.List; ...@@ -55,6 +55,7 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
@Service @Service
public class QPServiceImpl implements QPService { public class QPServiceImpl implements QPService {
...@@ -138,7 +139,9 @@ public class QPServiceImpl implements QPService { ...@@ -138,7 +139,9 @@ public class QPServiceImpl implements QPService {
sConsumerCoupon.setCreateBy(String.valueOf(user.getId())); sConsumerCoupon.setCreateBy(String.valueOf(user.getId()));
sConsumerCoupon.setCreateTime(new Date()); sConsumerCoupon.setCreateTime(new Date());
sConsumerCoupon.setOriginalPrice(BigDecimal.valueOf(prepare.getDeal_marketprice())); sConsumerCoupon.setOriginalPrice(BigDecimal.valueOf(prepare.getDeal_marketprice()));
sConsumerCoupon.setCouponPayPrice(prepare.getPayment_detail().get(0).getAmount()); Stream<TuangouReceiptPreparePaymentDetail> tuangouReceiptPreparePaymentDetailStream = prepare.getPayment_detail().stream().filter(o -> o.getAmount_type().equals(10L) || o.getAmount_type().equals(23L) || o.getAmount_type().equals(25L) || o.getAmount_type().equals(26L) || o.getAmount_type().equals(29L));
BigDecimal couponPayPrice = tuangouReceiptPreparePaymentDetailStream.map(o -> o.getAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
sConsumerCoupon.setCouponPayPrice(couponPayPrice);
//查询美团团购信息 //查询美团团购信息
List<TuangouDealQueryShopDealResponseEntity> groupActivities = queryshopdeal(sStore.getOpenShopUuid()); List<TuangouDealQueryShopDealResponseEntity> groupActivities = queryshopdeal(sStore.getOpenShopUuid());
groupActivities.forEach(o -> { groupActivities.forEach(o -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment