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 | 6 +++++- 1 files changed, 5 insertions(+), 1 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 8e59026..271fc01 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml @@ -44,6 +44,7 @@ <result property="isSelected" column="isSelected" /> <result property="shopId" column="shop_id" /> <result property="companyId" column="company_id" /> + </resultMap> <!-- 字段sql --> @@ -60,6 +61,7 @@ isSelected, shop_id, company_id + </sql> <!-- 属性sql --> @@ -76,6 +78,7 @@ #{item.isSelected}, #{item.shopId}, #{item.companyId} + </sql> <!-- where sql --> @@ -122,6 +125,7 @@ <if test="record.companyId != null and record.companyId !='' "> and c.company_id = #{record.companyId} </if> + </if> @@ -351,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}; +where c.shop_Id=#{shopId} and p.del_flag = 2 and cart_user_id=#{openId} </select> <!-- 根据id 锁表查询--> -- Gitblit v1.9.1