From 1ceabefb451912daa5dda7768b7ef0b89a56c08a Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 25 Mar 2022 12:28:00 +0800 Subject: [PATCH] 1 --- zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml | 92 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 90 insertions(+), 2 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml index 2c2cf8c..b0061e1 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml @@ -42,6 +42,11 @@ <result property="couponId" column="couponId"></result> <result property="serviceTime" column="service_time"></result> <result property="companyId" column="company_id"/> + <result property="ableScorePay" column="able_score_pay"/> + <result property="ableSales" column="able_sales"/> + <result property="scoreCategoryId" column="score_category_id"/> + <result property="isUnrealProduct" column="is_unreal_product"/> + <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById" column="{id=couponId}"></association> </resultMap> @@ -80,6 +85,9 @@ <result property="couponId" column="couponId"></result> <result property="serviceTime" column="service_time"></result> <result property="companyId" column="company_id"/> + <result property="ableScorePay" column="able_score_pay"/> + <result property="ableSales" column="able_sales"/> + <result property="scoreCategoryId" column="score_category_id"/> </resultMap> <sql id="columns"> @@ -113,7 +121,12 @@ is_service, service_time, shop_ids, - company_id + company_id, + able_score_pay, + able_sales, + is_unreal_product, + score_category_id + </sql> <!-- 属性sql --> @@ -148,7 +161,12 @@ #{item.isService}, #{item.serviceTime}, #{item.shopIds}, - #{item.companyId} + #{item.companyId}, + #{item.ableScorePay}, + #{item.ableSales}, + #{item.isUnrealProduct}, + #{item.scoreCategoryId} + </sql> <!-- where sql --> <sql id="where_sql"> @@ -237,6 +255,15 @@ and a.company_id = #{record.companyId} </if> + <if test="record.ableScorePay != null and record.ableScorePay !='' "> + and a.able_score_pay = #{record.ableScorePay} + </if> + <if test="record.ableSales != null and record.ableSales !='' "> + and a.able_sales = #{record.ableSales} + </if> + <if test="record.scoreCategoryId != null and record.scoreCategoryId "> + and a.score_category_id = #{record.scoreCategoryId} + </if> </if> @@ -311,6 +338,17 @@ and b.attr_full_path like concat('%/',#{record.attrs},'/%') </if> + + <if test="record.ableScorePay != null and record.ableScorePay !='' "> + and a.able_score_pay = #{record.ableScorePay} + </if> + <if test="record.ableSales != null and record.ableSales !='' "> + and a.able_sales = #{record.ableSales} + </if> + <if test="record.scoreCategoryId != null and record.scoreCategoryId "> + and a.score_category_id = #{record.scoreCategoryId} + </if> + </if> @@ -418,6 +456,16 @@ <if test="_parameter.containsKey('companyId')"> company_id = #{companyId}, </if> + <if test="_parameter.containsKey('scoreCategoryId')"> + score_category_id = #{scoreCategoryId}, + </if> + <if test="_parameter.containsKey('ableSales')"> + able_sales = #{ableSales}, + </if> + <if test="_parameter.containsKey('ableScorePay')"> + able_score_pay = #{ableScorePay}, + </if> + </set> WHERE id=#{id} @@ -500,6 +548,18 @@ shop_ids = #{record.shopIds}, </if> + <if test="record.ableScorePay != null and record.ableScorePay !='' "> + able_score_pay = #{record.ableScorePay}, + </if> + <if test="record.ableSales != null and record.ableSales !='' "> + able_sales = #{record.ableSales}, + </if> + <if test="record.scoreCategoryId != null and record.scoreCategoryId "> + score_category_id = #{record.scoreCategoryId}, + </if> + <if test="record.isUnrealProduct != null and record.isUnrealProduct"> + is_unreal_product = #{record.isUnrealProduct}, + </if> </set> WHERE id=#{record.id} @@ -588,6 +648,9 @@ a.marked_price, b.attr_full_path, a.couponId, + a.able_score_pay, + a.able_sales, + a.score_category_id, (SELECT ROUND(SUM(ss.stock),2) from shop_sku ss where ss.p_id = a.id) as stockNum, GROUP_CONCAT(DISTINCT(s.atrid) order by a.id SEPARATOR ',') atrid from shop_product a left join shop_product_attr_ref b on a.id = b.p_id @@ -628,6 +691,9 @@ a.marked_price, a.service_time, a.couponId, + a.able_score_pay, + a.able_sales, + a.score_category_id, (SELECT ROUND(SUM(ss.stock),2) from shop_sku ss where ss.p_id = a.id) as stockNum from shop_product a where a.id in (${productIds}) and shop_ids=#{shopId} @@ -665,6 +731,9 @@ a.marked_price, b.attr_full_path, a.couponId, + a.able_score_pay, + a.able_sales, + a.score_category_id, a.service_time, (SELECT ROUND(SUM(ss.stock),2) from shop_sku ss where ss.p_id = a.id) as stockNum, GROUP_CONCAT(DISTINCT(s.atrid) order by a.id SEPARATOR ',') atrid @@ -730,6 +799,9 @@ b.attr_full_path, a.service_time, a.couponId, + a.able_score_pay, + a.able_sales, + a.score_category_id, (SELECT ROUND(SUM(s.stock),2) from shop_sku s where s.p_id = a.id) as stockNum, (SELECT COUNT(p.com_id) from shop_product_comment p where p.product_id=a.id and p.del_flag=2 and p.com_audit_status=1 and p.com_score=5) as comment from shop_product a @@ -771,6 +843,18 @@ <if test="(record.shopIds!=null and record.shopIds!='') or (record.shopIds!='' and record.shopIds==0) "> and find_in_set(#{record.shopIds}, a.shop_ids) </if> + + <if test="record.ableScorePay != null and record.ableScorePay !='' "> + and a.able_score_pay = #{record.ableScorePay} + </if> + <if test="record.ableSales != null and record.ableSales !='' "> + and a.able_sales = #{record.ableSales} + </if> + <if test="record.scoreCategoryId != null and record.scoreCategoryId "> + and a.score_category_id = #{record.scoreCategoryId} + </if> + + </where> GROUP BY a.id <if test="record.queryType != null and record.queryType == 1"> @@ -828,6 +912,10 @@ is_special_price, marked_price, couponId, + a.able_score_pay, + a.able_sales, + a.score_category_id, + a.is_unreal_product, (SELECT SUM(s.stock) from shop_sku s where s.p_id = a.id) as stockNum, (SELECT ROUND(SUM(s.stock),2) from shop_sku s where s.p_id = a.id) as stockNum, shop_ids -- Gitblit v1.9.1