|
|
@@ -653,6 +653,13 @@ public class GoodsDonController {
|
|
|
}
|
|
|
}
|
|
|
List<HomeManagementFrontView> homeManagementFrontViews = beanSearcher.searchAll(HomeManagementFrontView.class, builder.build());
|
|
|
+ if (type == HomeManagementConfig.Type.vg) {
|
|
|
+ //未登录
|
|
|
+ if (fUid == null) {
|
|
|
+ //推荐优惠券商品最低折扣
|
|
|
+ setHomeConfigGoodsCouponMoney(homeManagementFrontViews);
|
|
|
+ }
|
|
|
+ }
|
|
|
//实物推荐多语言
|
|
|
if (language.get() && type == HomeManagementConfig.Type.rg) {
|
|
|
backInfoTranslationsFrontService.getHomeConfigRealGoodsLanguage(homeManagementFrontViews, lang);
|
|
|
@@ -1645,7 +1652,7 @@ public class GoodsDonController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 未登录 推荐优惠券
|
|
|
+ * 未登录 分类下平台推荐优惠券
|
|
|
*/
|
|
|
private void setGoodsCouponMoney(GoodsFrontListCategoryView data) {
|
|
|
//寻找对应最低规格的推荐优惠券
|
|
|
@@ -1660,4 +1667,22 @@ public class GoodsDonController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 未登录 首页推荐推荐优惠券
|
|
|
+ */
|
|
|
+ private void setHomeConfigGoodsCouponMoney(List<HomeManagementFrontView> homeManagementFrontViews) {
|
|
|
+ //寻找对应最低规格的推荐优惠券
|
|
|
+ homeManagementFrontViews.forEach(data->{
|
|
|
+ Coupon coupon = couponUserMapper.selectNoLoginRecommendCouponReduce(data.getGoodsId(), data.getPrice());
|
|
|
+ if (coupon != null) {
|
|
|
+ data.setDiscount(coupon.getDiscount());
|
|
|
+ data.setReduceMoney(coupon.getReduceMoney());
|
|
|
+ data.setDiscountPrice(data.getPrice().subtract(coupon.getCouponMoney()));
|
|
|
+ data.setValidEndTime(coupon.getValidEndTime());
|
|
|
+ data.setCouponId(coupon.getId());
|
|
|
+ data.setSource(1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|