Browse Source

字段调整

chao 4 years ago
parent
commit
b0558c10d9

+ 4 - 1
src/main/java/com/caimei365/commodity/components/PriceUtilService.java

@@ -84,6 +84,7 @@ public class PriceUtilService {
     public void setPriceByUserId(PriceVo price, Integer userId) {
         // 根据用户Id查询用户身份
         Integer identity = priceMapper.getIdentityByUserId(userId);
+        price.setRepurchaseFlag(0);
         if (null != identity && identity > 0) {
             // 用户身份: 2-会员机构, 4-普通机构
             price.setUserIdentity(identity);
@@ -132,6 +133,7 @@ public class PriceUtilService {
                         Double repurchase = priceMapper.getRepurchasePrice(price.getProductId(), userId);
                         if (null != repurchase && repurchase > 0) {
                             price.setPrice(repurchase);
+                            price.setRepurchaseFlag(1);
                             price.setLadderPriceFlag(0);
                         }
                     }
@@ -172,8 +174,9 @@ public class PriceUtilService {
         product.setOriginalPrice(price.getOriginalPrice());
         product.setLadderPriceFlag(price.getLadderPriceFlag());
         product.setPromotions(price.getPromotions());
-        product.setMin(price.getMinBuyNumber());
+        product.setMinBuyNumber(price.getMinBuyNumber());
         product.setUserIdentity(price.getUserIdentity());
+        product.setRepurchaseFlag(price.getRepurchaseFlag());
     }
 
 }

+ 4 - 0
src/main/java/com/caimei365/commodity/model/vo/PriceVo.java

@@ -38,6 +38,10 @@ public class PriceVo implements Serializable {
      * 是否公开机构价 0公开价格 1不公开价格
      */
     private Integer priceFlag;
+    /**
+     * 是否复购 0否 1是
+     */
+    private Integer repurchaseFlag;
     /**
      * 阶梯价标志
      */

+ 5 - 1
src/main/java/com/caimei365/commodity/model/vo/ProductItemVo.java

@@ -60,7 +60,7 @@ public class ProductItemVo implements Serializable {
     /** 增量 */
     private Integer step;
     /** 起订量 */
-    private Integer min;
+    private Integer minBuyNumber;
     /** 商品上架状态:0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已冻结 */
     private Integer validFlag;
     /** 活动状态:1有效,0失效 */
@@ -139,6 +139,10 @@ public class ProductItemVo implements Serializable {
      * 再次购买价格
      */
     private Double discountPrice;
+    /**
+     * 是否复购 0否 1是
+     */
+    private Integer repurchaseFlag;
     /**
      * 判断是否勾选(前端使用)
      */