From 5d43370b99a03391c9271d04d3f351f0fd734dae Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Thu, 18 Mar 2021 20:23:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/score_shop' into score_shop

---
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml |   85 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 83 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..405abca 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,10 @@
         <result property="couponId" column="couponId"></result>
         <result property="serviceTime" column="service_time"></result>
         <result property="companyId" column="company_id"/>
+        <result property="mallType" column="mall_type"/>
+        <result property="ableSales" column="able_sales"/>
+        <result property="scoreCategoryId" column="score_category_id"/>
+
         <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById"
                      column="{id=couponId}"></association>
     </resultMap>
@@ -80,6 +84,9 @@
         <result property="couponId" column="couponId"></result>
         <result property="serviceTime" column="service_time"></result>
         <result property="companyId" column="company_id"/>
+        <result property="mallType" column="mall_type"/>
+        <result property="ableSales" column="able_sales"/>
+        <result property="scoreCategoryId" column="score_category_id"/>
     </resultMap>
 
     <sql id="columns">
@@ -113,7 +120,11 @@
 			is_service,
 			service_time,
 			shop_ids,
-			company_id
+			company_id,
+        mall_type,
+        able_sales,
+        score_category_id
+
 	</sql>
 
     <!-- 属性sql -->
@@ -148,7 +159,11 @@
 			#{item.isService},
 			#{item.serviceTime},
 			#{item.shopIds},
-			#{item.companyId}
+			#{item.companyId},
+			#{item.mallType},
+			#{item.ableSales},
+			#{item.scoreCategoryId}
+
 	</sql>
     <!-- where sql -->
     <sql id="where_sql">
@@ -237,6 +252,15 @@
                 and a.company_id = #{record.companyId}
             </if>
 
+            <if test="record.mallType != null and record.mallType !='' ">
+                and a.mall_type = #{record.mallType}
+            </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 +335,17 @@
 
                 and b.attr_full_path like concat('%/',#{record.attrs},'/%')
             </if>
+
+            <if test="record.mallType != null and record.mallType !='' ">
+                and a.mall_type = #{record.mallType}
+            </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 +453,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('mallType')">
+                mall_type = #{mallType},
+            </if>
+
 
         </set>
         WHERE id=#{id}
@@ -500,6 +545,15 @@
                 shop_ids = #{record.shopIds},
             </if>
 
+            <if test="record.mallType != null and record.mallType !='' ">
+                mall_type = #{record.mallType},
+            </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>
 
         </set>
         WHERE id=#{record.id}
@@ -588,6 +642,9 @@
 		a.marked_price,
 		b.attr_full_path,
 		a.couponId,
+		a.mall_type,
+		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 +685,9 @@
 		a.marked_price,
 		a.service_time,
 		a.couponId,
+        a.mall_type,
+        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 +725,9 @@
         a.marked_price,
         b.attr_full_path,
         a.couponId,
+        a.mall_type,
+        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 +793,9 @@
         b.attr_full_path,
         a.service_time,
         a.couponId,
+        a.mall_type,
+        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 +837,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.mallType != null and record.mallType !='' ">
+                and a.mall_type = #{record.mallType}
+            </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 +906,9 @@
 			is_special_price,
 			marked_price,
 			couponId,
+            a.mall_type,
+            a.able_sales,
+            a.score_category_id,
 			(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