zhijiezhao há 2 anos atrás
pai
commit
06d02fdf57

+ 4 - 2
src/main/resources/mapper/BaseMapper.xml

@@ -382,8 +382,10 @@
           and moneyCouponFlag = 1
     </select>
     <select id="getSvipSku" resultType="com.caimei365.order.model.dto.VipSkuPriceDto">
-        select priceType, discount, discountPrice, productId, skuId
-        from cm_svip_product_sku
+        select priceType, discount, discountPrice, csps.productId, skuId
+        from cm_svip_product_sku csps
+        left join cm_svip_product csp on csps.productId=csp.productId
         where skuId = #{skuId}
+        and csp.status=0
     </select>
 </mapper>

+ 4 - 4
src/main/resources/mapper/CartClubMapper.xml

@@ -75,7 +75,7 @@
                p.productCategory,
                p.validFlag                   AS validFlag,
                p.visibility,
-               if(csp.id is not null, 1, 0)  as svipProductFlag,
+               if(csp.id is not null and csp.status = 0, 1, 0)  as svipProductFlag,
 #                csp.priceType                 as svipPriceType,
 #                csp.discount                  as svipDiscount,
 #                csp.discountPrice             as svipDiscountPrice,
@@ -113,7 +113,7 @@
         p.validFlag AS validFlag,
         p.visibility,
         p.commodityType as commodityType,
-        if(csp.id is not null,1,0) as svipProductFlag,
+        if(csp.id is not null and csp.status = 0,1,0) as svipProductFlag,
 #         csp.priceType as svipPriceType,
 #         csp.discount as svipDiscount,
 #         csp.discountPrice as svipDiscountPrice,
@@ -158,7 +158,7 @@
         p.validFlag AS validFlag,
         p.visibility,
         p.commodityType as commodityType,
-        if(csp.id is not null,1,0) as svipProductFlag,
+        if(csp.id is not null and csp.status = 0,1,0) as svipProductFlag,
 #         csp.priceType as svipPriceType,
 #         csp.discount as svipDiscount,
 #         csp.discountPrice as svipDiscountPrice,
@@ -312,7 +312,7 @@
                p.validFlag                  AS validFlag,
                p.visibility,
                p.commodityType              AS commodityType,
-               if(csp.id is not null, 1, 0) as svipProductFlag,
+               if(csp.id is not null and csp.status = 0, 1, 0) as svipProductFlag,
 #                csp.priceType                as svipPriceType,
 #                csp.discount                 as svipDiscount,
 #                csp.discountPrice            as svipDiscountPrice,

+ 2 - 2
src/main/resources/mapper/CartSellerMapper.xml

@@ -34,7 +34,7 @@
                p.taxPoint                   AS taxRate,
                p.productCategory,
                p.validFlag                  AS validFlag,
-               if(csp.id is not null, 1, 0) as svipProductFlag,
+               if(csp.id is not null and csp.status = 0, 1, 0) as svipProductFlag,
 #                csp.priceType                as svipPriceType,
 #                csp.discount                 as svipDiscount,
 #                csp.discountPrice            as svipDiscountPrice,
@@ -148,7 +148,7 @@
         p.productCategory,
         p.validFlag AS validFlag,
         p.productType,
-        if(csp.id is not null,1,0) as svipProductFlag,
+        if(csp.id is not null and csp.status = 0,1,0) as svipProductFlag,
 #         csp.priceType as svipPriceType,
 #         csp.discount as svipDiscount,
 #         csp.discountPrice as svipDiscountPrice

+ 2 - 1
src/main/resources/mapper/SubmitMapper.xml

@@ -232,13 +232,14 @@
         LIMIT 1
     </select>
     <select id="getSvipProductDetails" resultType="com.caimei365.order.model.po.SvipProductPo">
-        select if(id is not null, 1, 0) as svipProductFlag,
+        select if(id is not null and csp.status = 0, 1, 0) as svipProductFlag,
                priceType                as svipPriceType,
                discount                 as svipDiscount,
                discountPrice            as svipDiscountPrice
         from cm_svip_product_sku
         left join cm_svip_product csp on cm_svip_product_sku.productId = csp.productId
         where skuId = #{skuId}
+        and csp.status=0
     </select>
     <select id="findLowOrder" resultType="java.lang.Integer">
         select orderID