From 775f8b8a00f15c837fc4d48e19365d8636fd840b Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@S0ZHK00LKCA6OYY>
Date: 星期五, 09 十一月 2018 10:46:19 +0800
Subject: [PATCH] 冲突解决

---
 fanli/src/main/java/com/yeshi/fanli/mapping/lable/QualityFactoryMapper.xml |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/lable/QualityFactoryMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/lable/QualityFactoryMapper.xml
index b58da33..835d00e 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/lable/QualityFactoryMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/lable/QualityFactoryMapper.xml
@@ -57,7 +57,34 @@
 			javaType="com.yeshi.fanli.entity.common.AdminUser">
 			<id column="sg_update_aid" property="id" jdbcType="BIGINT" />
 	</association>
- 
+  </resultMap>
+  
+  <resultMap id="GoodsResultMap" type="com.yeshi.fanli.entity.bus.lable.QualityFactory">
+    <id column="sg_id" property="id" jdbcType="BIGINT"/>
+    <result column="sg_class_id" property="systemCid" jdbcType="BIGINT"/>
+    <result column="sg_entry_mode" property="entryMode" jdbcType="INTEGER"/>
+    <result column="sg_goods_source" property="goodsSource" jdbcType="INTEGER"/>
+    <result column="sg_source_calss" property="sourceCalss" jdbcType="VARCHAR"/>
+    <result column="sg_weight" property="weight" jdbcType="INTEGER"/>
+    <result column="sg_createtime" property="createtime" jdbcType="TIMESTAMP"/>
+    <result column="sg_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
+    
+ 	 <association property="boutiqueAutoRule" column="sg_rule_id" 
+    	javaType="com.yeshi.fanli.entity.bus.lable.BoutiqueAutoRule">
+			<id column="sg_rule_id" property="id" jdbcType="BIGINT" />
+    </association>
+ 	
+     <association property="taoBaoGoodsBrief" column="sg_goods_id"
+      resultMap="com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefMapper.BaseResultMap"/>
+ 	
+ 	 <association property="createUser" column="sg_create_aid" 
+    	javaType="com.yeshi.fanli.entity.common.AdminUser">
+			<id column="sg_create_aid" property="id" jdbcType="BIGINT" />
+    </association>
+    <association property="updateUser" column="sg_update_aid"
+			javaType="com.yeshi.fanli.entity.common.AdminUser">
+			<id column="sg_update_aid" property="id" jdbcType="BIGINT" />
+	</association>
   </resultMap>
   
   <sql id="Base_Column_List">sg_id,sg_class_id,sg_goods_id,sg_entry_mode,sg_goods_source,sg_source_calss,sg_rule_id,sg_weight,sg_create_aid,sg_createtime,sg_update_aid,sg_updatetime</sql>
@@ -1113,4 +1140,24 @@
 		</if>
 	</select>
 	
+	<select id="listQueryBylabIDs" resultMap="GoodsResultMap"> 
+	  	SELECT * FROM (
+			SELECT DISTINCT( tt.`sg_id`) AS tbid  FROM yeshi_ec_quality_factory tt 
+			
+			LEFT JOIN yeshi_ec_taobao_goods tb ON tt.`sg_goods_id`= tb.`id` 
+			
+			LEFT JOIN yeshi_ec_label_goods lg ON tt.`sg_goods_id` = lg.`lg_goods_id` 
+				
+				WHERE tb.`id` != #{gid} 
+					<if test='systemCid != null'>
+  	 					AND  tt.`sg_class_id` = #{systemCid}  
+					</if>
+					 AND  lg.`lg_label_id` IN
+				<foreach collection="list" item="item" open="(" close=")"
+					separator=",">#{item}</foreach>
+		 	 LIMIT ${start},${count}
+		 ) a LEFT JOIN yeshi_ec_quality_factory ts ON ts.`sg_id`=a.tbid 
+		 	LEFT JOIN yeshi_ec_taobao_goods tbb ON ts.`sg_goods_id`= tbb.`id`
+   </select> 
+	
 </mapper>

--
Gitblit v1.8.0