From e423d56d730db1baed24f3f7dbbc4141038776b6 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 18 Jun 2021 22:12:03 +0800
Subject: [PATCH] 修复每日业绩bug和优化赠送业绩计算方式
---
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
index 68b9909..5f88fc6 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
@@ -130,9 +130,6 @@
and c.company_id = #{record.companyId}
</if>
- <if test="record.cartType != null and record.cartType !='' ">
- and c.cart_type = #{record.cartType}
- </if>
</if>
@@ -223,7 +220,7 @@
<update id="updateAllSelected" >
- update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId} and art_type=#{artType}
+ update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId}
</update>
@@ -279,11 +276,12 @@
p.img_mobile,
p.img_pc,
u.nick_name,
- s.NAME
+ s.NAME,
+ c.cart_type,
from shop_shopping_cart c
LEFT JOIN shop_product p ON c.cart_product_id = p.id
LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
- LEFT JOIN biz_user u ON c.cart_user_id = u.open_id
+ LEFT JOIN sys_vip_info u ON c.cart_user_id = u.id
<where>
<include refid="where_sql"></include>
</where>
@@ -302,7 +300,7 @@
from shop_shopping_cart c
LEFT JOIN shop_product p ON c.cart_product_id = p.id
LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
- LEFT JOIN biz_user u ON c.cart_user_id = u.open_id
+ LEFT JOIN sys_vip_info u ON c.cart_user_id = u.id
<where>
<include refid="where_sql"></include>
</where>
@@ -336,7 +334,10 @@
p.img_pc,
p.buy_limit,
s.NAME,
- s.stock
+ s.stock,
+ s.score_count,
+ s.score_price,
+ c.cart_type
from shop_shopping_cart c
LEFT JOIN shop_product p ON c.cart_product_id = p.id
LEFT JOIN shop_sku s ON c.cart_sku_id = s.id
@@ -345,7 +346,6 @@
and p.STATUS = 1
and p.del_flag = 2
and c.cart_user_id = #{cartUserId}
- and c.cart_type = #{cartType}
order by c.create_time desc
</select>
@@ -361,9 +361,9 @@
<!-- 统计用户购物车数量 -->
<select id="selectUserCartCount" resultType="java.lang.Integer" >
- select sum(cart_number) from shop_shopping_cart c
+ select ifnull(sum(cart_number),0) from shop_shopping_cart c
LEFT JOIN shop_product p on p.id = c.cart_product_id
-where c.shop_Id=#{shopId} and p.del_flag = 2 and cart_user_id=#{openId};
+where c.shop_Id=#{shopId} and p.del_flag = 2 and cart_user_id=#{userId}
</select>
<!-- 根据id 锁表查询-->
--
Gitblit v1.9.1