Pārlūkot izejas kodu

fix 最小规格的价格

zoujiajian 3 gadi atpakaļ
vecāks
revīzija
6cfa2dec49

+ 10 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/GoodsDon.java

@@ -110,6 +110,11 @@ public class GoodsDon extends BaseEntity {
      */
     private Integer minMonths;
 
+    /**
+     * 最小规格 天数
+     */
+    private Integer minDays;
+
     /**
      * 最大规格价格
      */
@@ -120,6 +125,11 @@ public class GoodsDon extends BaseEntity {
      */
     private Integer maxMonths;
 
+    /**
+     * 最大规格 天数
+     */
+    private Integer maxDays;
+
     /**
      * 付款说明
      */

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/views/GoodsDonFrontSkuView.java

@@ -54,5 +54,10 @@ public class GoodsDonFrontSkuView {
 	 */
 	private Integer months;
 
+	/**
+	 * 天数
+	 */
+	private Integer days;
+
 	private String notifyText;
 }

+ 2 - 0
netflix-dao/src/main/java/com/cyksj/model/views/UserRecommendGoodsFrontView.java

@@ -21,6 +21,8 @@ public class UserRecommendGoodsFrontView {
 
 	private String title;
 
+	private String logo;
+
 	private String img;
 
 	private String tags;

+ 4 - 0
netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

@@ -173,9 +173,13 @@
         select * from (select
         id as goodsId,
         title,
+        logo,
         img,
         tags,
         sort_by,
+        min_months as months,
+        min_days as days,
+        min_price as price,
         (
         case when type = 2 and ${isPayNf} then 999
         when type = 2 and !${isPayNf} then 666

+ 5 - 0
netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsGoodsDonServiceImpl.java

@@ -36,14 +36,19 @@ public class CmsGoodsDonServiceImpl extends ServiceImpl<GoodsDonMapper, GoodsDon
 			if (skuViews.size() == 1) {
 				goods.setMinPrice(min.getPrice());
 				goods.setMinMonths(min.getMonths());
+				goods.setMinDays(min.getDays());
+
 				goods.setMaxPrice(min.getPrice());
 				goods.setMaxMonths(min.getMonths());
 			} else {
 				GoodsDonFrontSkuView max = skuViews.get(skuViews.size() - 1);
 				goods.setMinPrice(min.getPrice());
 				goods.setMinMonths(min.getMonths());
+				goods.setMinDays(min.getDays());
+
 				goods.setMaxPrice(max.getPrice());
 				goods.setMaxMonths(max.getMonths());
+				goods.setMaxDays(max.getDays());
 			}
 			goodsDonMapper.updateById(goods);
 		}