wangming 1 mese fa
parent
commit
5363755a9d

+ 1 - 0
yami-shop-delivery/yami-shop-delivery-comment/src/main/resources/mapper/Transport2Mapper.xml

@@ -9,6 +9,7 @@
         <result column="piece" jdbcType="DOUBLE" property="piece"/>
         <result column="distance" jdbcType="DOUBLE" property="distance"/>
         <result column="amount" jdbcType="DOUBLE" property="amount"/>
+        <result column="channel_id" jdbcType="BIGINT" property="channelId"/>
     </resultMap>
 
     <resultMap id="transportConutMap" type="com.yami.shop.delivery.comment.param.ShopTransport">

+ 0 - 1
yami-shop-service/src/main/java/com/yami/shop/service/impl/BasketServiceImpl.java

@@ -35,7 +35,6 @@ import com.yami.shop.service.ShopDetailService;
 import com.yami.shop.service.SkuService;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.ObjectUtils;
-import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.context.ApplicationContext;
 import org.springframework.stereotype.Service;
 

+ 7 - 7
yami-shop-service/src/main/resources/mapper/BasketMapper.xml

@@ -17,16 +17,16 @@
     </resultMap>
 
     <select id="getShopCartItems" resultType="com.yami.shop.bean.app.dto.ShopCartItemDto">
-        SELECT tb.*,tb.basket_count as prod_count,tsd.shop_name,tp.category_id,IFNULL(ts.pic,tp.pic)AS pic,ts.price,ts.ori_price,tp.brief,ts.properties,ts.prod_name,ts.sku_name,ts.weight,ts.weight_unit,IF(uc.id,TRUE,FALSE) AS is_collection
+        SELECT tb.*,tb.basket_count as prod_count,tsd.shop_name,tp.category_id,IFNULL(ts.pic,tp.pic)AS pic,cp.channel_prod_price price,ts.ori_price,tp.brief,ts.properties,ts.prod_name,ts.sku_name,ts.weight,ts.weight_unit,IF(uc.id,TRUE,FALSE) AS is_collection
         FROM tz_basket tb
-        LEFT JOIN tz_shop_detail tsd ON tb.shop_id = tsd.shop_id
-        LEFT JOIN tz_prod tp ON tb.prod_id = tp.prod_id
-        LEFT JOIN tz_sku ts ON tb.sku_id = ts.sku_id
-        LEFT JOIN tz_user_collection uc ON uc.prod_id = tp.prod_id AND tb.user_id = uc.user_id
+                 LEFT JOIN tz_shop_detail tsd ON tb.shop_id = tsd.shop_id
+                 LEFT JOIN tz_prod tp ON tb.prod_id = tp.prod_id
+                 LEFT JOIN tz_sku ts ON tb.sku_id = ts.sku_id
+                 LEFT JOIN tz_channel_prod cp on cp.sku_id=ts.sku_id
+                 LEFT JOIN tz_user_collection uc ON uc.prod_id = tp.prod_id AND tb.user_id = uc.user_id
         WHERE tp.status = 1 AND ts.status =1 AND tb.user_id = #{userId}
         ORDER BY tb.`basket_id` DESC
-
-  </select>
+    </select>
     <select id="getShopCartItemsByPlatform" resultType="com.yami.shop.bean.app.dto.ShopCartItemDto">
         SELECT
             tb.*,