From b0c5d432ec041221dcbe81ca5ae3aa20fe3bddc6 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 22 Mar 2021 20:17:58 +0800
Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop

---
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml |   62 +++++++++++++++++++++++++------
 1 files changed, 50 insertions(+), 12 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
index c1263ab..46254ee 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
@@ -19,6 +19,9 @@
 			<result property="sTitle" column="s_title" />
 			<result property="discountExplain" column="discount_explain" />
 			<result property="discountAmount" column="discount_amount" />
+			<result property="payType" column="pay_type" />
+			<result property="scoreCount" column="score_count" />
+			<result property="totalScoreCount" column="total_score_count" />
 	</resultMap>
 
 	<!-- 定义ShopOrderDetails 的复杂map -->
@@ -37,22 +40,19 @@
 			<result property="sTitle" column="s_title" />
 			<result property="discountExplain" column="discount_explain" />
 			<result property="discountAmount" column="discount_amount" />
+		<result property="payType" column="pay_type" />
+		<result property="scoreCount" column="score_count" />
+		<result property="totalScoreCount" column="total_score_count" />
+
 		<!--产品信息-->
 		<association property="shopProduct" column="p_id"
 			select="com.matrix.system.shopXcx.dao.ShopProductDao.selectById"/>
 		<!--规格信息-->
 		<association property="shopSku" column="s_id"
 			select="com.matrix.system.shopXcx.dao.ShopSkuDao.selectById"/>
-		<!--查询生产企业-->
-		<association property="productionEnterprise" column="{pId=p_id}"
-					 select="selectProductionEnterpriseByPid"/>
+
 	</resultMap>
 
-	<!--查询产品生产企业-->
-	<select id="selectProductionEnterpriseByPid" resultType="java.lang.String">
-		select ifnull(param_value, '') from shop_product_param_ref
-		where p_id = ${pId} and param_name = '生产企业'
-	</select>
 	
 	<!-- 字段sql -->
 	<sql id="columns">
@@ -69,7 +69,10 @@
 			total_price,
 			s_title,
 			discount_explain,
-			discount_amount
+			discount_amount,
+			pay_type,
+		score_count,
+		total_score_count
 	</sql>
 	
 	<!-- 属性sql -->
@@ -87,7 +90,10 @@
 			#{item.totalPrice},
 			#{item.sTitle},
 			#{item.discountExplain},
-			#{item.discountAmount}
+			#{item.discountAmount},
+			#{item.payType},
+			#{item.scoreCount},
+			#{item.totalScoreCount}
 	</sql>
 	
 	<!-- where sql -->
@@ -123,6 +129,17 @@
 			</if>
 			<if test="(record.discountAmount!=null and record.discountAmount!='') or  (record.discountAmount!='' and record.discountAmount==0)  ">
 				and discount_amount  = #{record.discountAmount} 
+			</if>
+			<if test="(record.payType!=null and record.payType!='') or  (record.payType!='' and record.payType==0)  ">
+				and pay_type  = #{record.payType}
+			</if>
+
+			<if test="(record.scoreCount!=null and record.scoreCount!='') or  (record.scoreCount!='' and record.scoreCount==0)  ">
+				and score_count  = #{record.scoreCount}
+			</if>
+
+			<if test="(record.totalScoreCount!=null and record.totalScoreCount!='') or  (record.totalScoreCount!='' and record.totalScoreCount==0)  ">
+				and total_score_count  = #{record.totalScoreCount}
 			</if>
 		</if>
 		 
@@ -186,7 +203,20 @@
 				</if>		
 			<if test="_parameter.containsKey('discountAmount')">
 					discount_amount = #{discountAmount},
-				</if>		
+				</if>
+
+			<if test="_parameter.containsKey('payType')">
+				pay_type = #{payType},
+				</if>
+
+			<if test="_parameter.containsKey('scoreCount')">
+				score_count = #{scoreCount},
+				</if>
+
+			<if test="_parameter.containsKey('totalScoreCount')">
+				total_score_count = #{totalScoreCount},
+				</if>
+
 		</set>
 		WHERE id=#{id} 
 	</update> 
@@ -223,10 +253,18 @@
 			<if test="record.discountAmount != null ">
 				discount_amount  = #{record.discountAmount}, 
 			</if>
+			<if test="record.payType != null ">
+				pay_type  = #{record.payType},
+			</if>
+			<if test="record.scoreCount != null ">
+				score_count  = #{record.scoreCount},
+			</if>
+			<if test="record.totalScoreCount != null ">
+				total_score_count  = #{record.totalScoreCount},
+			</if>
 		</set>
 		WHERE id=#{record.id} 
 	</update>
-	
 	<!-- 批量删除 -->
 	<delete id="deleteByIds" parameterType="java.util.List">
 		delete from shop_order_details where  id in

--
Gitblit v1.9.1