|
@@ -1,34 +1,34 @@
|
|
|
-// 订单按照积分从大到小排序
|
|
|
- orderVOList.sort(Comparator.comparingInt(OrderVO::getPoints).reversed());
|
|
|
- for (OrderVO orderVO : orderVOList) {
|
|
|
- Integer sumBrandPoints = 0;
|
|
|
- // TODO 优惠券使用
|
|
|
- if (CollUtil.isNotEmpty(orderCouponVOList)){
|
|
|
- for (OrderCouponVO orderCouponVO : orderCouponVOList) {
|
|
|
- //判断商品ID在优化卷ID中包含
|
|
|
- if (orderCouponVO.getBuinessId().equals(orderVO.getVendorId())
|
|
|
- && orderCouponVO.getProjectIds().contains(orderVO.getProductId())){
|
|
|
- sumBrandPoints += orderVO.getPoints();
|
|
|
- orderCouponVO.setBrandPoints(orderVO.getPoints());
|
|
|
+// // 订单按照积分从大到小排序
|
|
|
+// orderVOList.sort(Comparator.comparingInt(OrderVO::getPoints).reversed());
|
|
|
+// for (OrderVO orderVO : orderVOList) {
|
|
|
+// Integer sumBrandPoints = 0;
|
|
|
+// // TODO 优惠券使用
|
|
|
+// if (CollUtil.isNotEmpty(orderCouponVOList)){
|
|
|
+// for (OrderCouponVO orderCouponVO : orderCouponVOList) {
|
|
|
+// //判断商品ID在优化卷ID中包含
|
|
|
+// if (orderCouponVO.getBuinessId().equals(orderVO.getVendorId())
|
|
|
+// && orderCouponVO.getProjectIds().contains(orderVO.getProductId())){
|
|
|
+// sumBrandPoints += orderVO.getPoints();
|
|
|
+// orderCouponVO.setBrandPoints(orderVO.getPoints());
|
|
|
|
|
|
- CouponUserDO couponUserDO = new CouponUserDO();
|
|
|
- couponUserDO.setId(orderCouponVO.getCouponId());
|
|
|
- couponUserDO.setIsUse(1);
|
|
|
- couponUserDO.setUserId(pointsOrderSaveReqListVO.getUserId());
|
|
|
- couponUserDO.setBrandPoints(orderCouponVO.getBrandPoints());
|
|
|
- couponUserDO.setUseTime(LocalDateTime.now());
|
|
|
- couponUserDO.setBuinessId(orderVO.getVendorId());
|
|
|
- couponUserDO.setOrderNo(orderVO.getOrderNo());
|
|
|
- couponUserService.goUpdateCouponUser(couponUserDO, false);
|
|
|
- }
|
|
|
- }
|
|
|
+// CouponUserDO couponUserDO = new CouponUserDO();
|
|
|
+// couponUserDO.setId(orderCouponVO.getCouponId());
|
|
|
+// couponUserDO.setIsUse(1);
|
|
|
+// couponUserDO.setUserId(pointsOrderSaveReqListVO.getUserId());
|
|
|
+// couponUserDO.setBrandPoints(orderCouponVO.getBrandPoints());
|
|
|
+// couponUserDO.setUseTime(LocalDateTime.now());
|
|
|
+// couponUserDO.setBuinessId(orderVO.getVendorId());
|
|
|
+// couponUserDO.setOrderNo(orderVO.getOrderNo());
|
|
|
+// couponUserService.goUpdateCouponUser(couponUserDO, false);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
|
|
|
- //优惠总积分
|
|
|
- Integer sumBrandTotalsPoints = orderCouponVOList.stream()
|
|
|
- .map(orderCouponVO -> ObjUtil.defaultIfNull(orderCouponVO.getBrandPoints(),0))
|
|
|
- .mapToInt(Integer::intValue)
|
|
|
- .sum();
|
|
|
+// //优惠总积分
|
|
|
+// Integer sumBrandTotalsPoints = orderCouponVOList.stream()
|
|
|
+// .map(orderCouponVO -> ObjUtil.defaultIfNull(orderCouponVO.getBrandPoints(),0))
|
|
|
+// .mapToInt(Integer::intValue)
|
|
|
+// .sum();
|
|
|
|
|
|
- pointsOrderSaveReqListVO.setTotalsCouponPoints(sumBrandTotalsPoints);
|
|
|
- }
|
|
|
+// pointsOrderSaveReqListVO.setTotalsCouponPoints(sumBrandTotalsPoints);
|
|
|
+// }
|