From 81a3369395a7cccceb7cd36f5238cc6fe2aa88e5 Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Fri, 19 Mar 2021 00:22:01 +0800 Subject: [PATCH] 优化代码 --- zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml | 16 ++++------------ 1 files changed, 4 insertions(+), 12 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 2beb6dd..271fc01 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml @@ -27,7 +27,6 @@ <result property="isSelected" column="isSelected" /> <result property="shopId" column="shop_id" /> <result property="companyId" column="company_id" /> - <result property="cartType" column="cart_type" /> </resultMap> @@ -45,7 +44,6 @@ <result property="isSelected" column="isSelected" /> <result property="shopId" column="shop_id" /> <result property="companyId" column="company_id" /> - <result property="cartType" column="cart_type" /> </resultMap> @@ -62,8 +60,7 @@ cart_number, isSelected, shop_id, - company_id, - cart_type + company_id </sql> @@ -80,8 +77,7 @@ #{item.cartNumber}, #{item.isSelected}, #{item.shopId}, - #{item.companyId}, - #{item.cartType} + #{item.companyId} </sql> @@ -130,9 +126,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 +216,7 @@ <update id="updateAllSelected" > - update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId} and cart_type=#{cartType} + update shop_shopping_cart set isSelected = #{isSelected} where shop_id=#{shopId} and cart_user_id=#{openId} </update> @@ -345,7 +338,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> @@ -363,7 +355,7 @@ <select id="selectUserCartCount" resultType="java.lang.Integer" > select sum(cart_number) 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} and cart_type=#{cartType}; +where c.shop_Id=#{shopId} and p.del_flag = 2 and cart_user_id=#{openId} </select> <!-- 根据id 锁表查询--> -- Gitblit v1.9.1