Browse Source

门店商品表 显示产品名称

zcb 4 years ago
parent
commit
8dbdeb1c0c

+ 9 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/mk/Mk2GoodsTopicPriceEntity.java

@@ -43,6 +43,7 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
      * 活动产品
      * 活动产品
      */
      */
     private String topicGoodsSku;
     private String topicGoodsSku;
+    private String goodsName;
     /**
     /**
      * 活动开始时间
      * 活动开始时间
      */
      */
@@ -267,4 +268,12 @@ public class Mk2GoodsTopicPriceEntity implements Serializable {
     public void setTopicGoodsSku(String topicGoodsSku) {
     public void setTopicGoodsSku(String topicGoodsSku) {
         this.topicGoodsSku = topicGoodsSku;
         this.topicGoodsSku = topicGoodsSku;
     }
     }
+
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
 }
 }

+ 18 - 16
kmall-admin/src/main/resources/mybatis/mapper/mk/Mk2GoodsTopicPriceDao.xml

@@ -44,22 +44,24 @@
 
 
 	<select id="queryList" resultType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity">
 	<select id="queryList" resultType="com.kmall.admin.entity.mk.Mk2GoodsTopicPriceEntity">
 		select
 		select
-    		`mgthp_id`,
-    		`topic_id`,
-    		`topic_type`,
-    		`topic_price`,
-    		`topic_name`,
-    		`topic_content`,
-    		`topic_goods_sku`,
-    		`topic_begin_time`,
-    		`topic_end_time`,
-    		`import_time`,
-    		`creater_sn`,
-    		`create_time`,
-    		`moder_sn`,
-    		`mod_time`,
-    		`tstm`
-		from mk2_goods_topic_price
+    		mk2.mgthp_id,
+    		mk2.topic_id,
+    		mk2.topic_type,
+    		mk2.topic_price,
+    		mk2.topic_name,
+    		mk2.topic_content,
+    		mk2.topic_goods_sku,
+    		mk2.topic_begin_time,
+    		mk2.topic_end_time,
+    		mk2.import_time,
+    		mk2.creater_sn,
+    		mk2.create_time,
+    		mk2.moder_sn,
+    		mk2.mod_time,
+    		mk2.tstm,
+			goods.name as goodsName
+		from mk2_goods_topic_price mk2
+		left join mall_goods goods on mk2.topic_goods_sku = goods.sku
 		WHERE 1=1
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
 		<if test="name != null and name.trim() != ''">
 			AND name LIKE concat('%',#{name},'%')
 			AND name LIKE concat('%',#{name},'%')

+ 1 - 1
kmall-admin/src/main/webapp/js/mk/mk2goodstopicprice.js

@@ -9,7 +9,7 @@ $(function () {
 			{label: '活动价格', name: 'topicPrice', index: 'topic_price',align: 'center', width: 80},
 			{label: '活动价格', name: 'topicPrice', index: 'topic_price',align: 'center', width: 80},
 			{label: '活动名称', name: 'topicName', index: 'topic_name' ,align: 'center',width: 80},
 			{label: '活动名称', name: 'topicName', index: 'topic_name' ,align: 'center',width: 80},
 			{label: '活动内容', name: 'topicContent', index: 'topic_content', align: 'center',width: 80},
 			{label: '活动内容', name: 'topicContent', index: 'topic_content', align: 'center',width: 80},
-			{label: '活动产品', name: 'topicGoodsId', index: 'topic_goods_id', align: 'center',width: 80},
+			{label: '活动产品', name: 'goodsName', index: 'goodsName', align: 'center',width: 80},
 			{label: '活动开始时间', name: 'topicBeginTime', index: 'topic_begin_time', width: 80,align: 'center',
 			{label: '活动开始时间', name: 'topicBeginTime', index: 'topic_begin_time', width: 80,align: 'center',
 				formatter: function (value) {
 				formatter: function (value) {
 					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
 					return transDate(value, 'yyyy-MM-dd hh:mm:ss');