|
|
@@ -913,6 +913,8 @@ public class GoodsDonController {
|
|
|
data.setMonths(minPriceUserOwnsSku.getMonths());
|
|
|
data.setDays(minPriceUserOwnsSku.getDays());
|
|
|
}
|
|
|
+ //设置用户存在优惠券的优惠商品价格
|
|
|
+ setHomeManageUserCouponGoodsMoney(fUid, data);
|
|
|
return true;
|
|
|
}).collect(Collectors.toList());
|
|
|
setHomeManageSpecific(list, fUid, dsUserId.get());
|
|
|
@@ -1398,4 +1400,20 @@ public class GoodsDonController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 设置推荐平台优惠价格
|
|
|
+ */
|
|
|
+ private void setHomeManageUserCouponGoodsMoney(Long userId, HomeManagementFrontView data) {
|
|
|
+ //登录后
|
|
|
+ if (userId != null) {
|
|
|
+ //寻找对应最低规格的优惠券
|
|
|
+ Coupon coupon = couponUserMapper.selectUserCouponByGidAndPrice(userId, data.getGoodsId(), data.getPrice());
|
|
|
+ if (coupon != null) {
|
|
|
+ data.setDiscount(coupon.getDiscount());
|
|
|
+ data.setReduceMoney(coupon.getReduceMoney());
|
|
|
+ data.setDiscountPrice(data.getPrice().subtract(coupon.getCouponMoney()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|