瀏覽代碼

产品详情数据

Aslee 3 年之前
父節點
當前提交
9eca9295de
共有 2 個文件被更改,包括 25 次插入0 次删除
  1. 20 0
      src/main/java/com/caimei/www/pojo/baike/BaikeProduct.java
  2. 5 0
      src/main/resources/mapper/BaikeMapper.xml

+ 20 - 0
src/main/java/com/caimei/www/pojo/baike/BaikeProduct.java

@@ -30,6 +30,26 @@ public class BaikeProduct implements Serializable {
      */
      */
     private String name;
     private String name;
 
 
+    /**
+     * 供应商id
+     */
+    private Integer shopId;
+
+    /**
+     * 供应商名称
+     */
+    private String shopName;
+
+    /**
+     * 供应商logo
+     */
+    private String shopLogo;
+
+    /**
+     * 产品链接
+     */
+    private String productLink;
+
     /**
     /**
      * 概述
      * 概述
      */
      */

+ 5 - 0
src/main/resources/mapper/BaikeMapper.xml

@@ -8,6 +8,10 @@
 		select a.id              AS "id",
 		select a.id              AS "id",
 			   a.commodityType   AS "commodityType",
 			   a.commodityType   AS "commodityType",
 			   a.name            AS "name",
 			   a.name            AS "name",
+		       a.shopId			 AS "shopId",
+		       s.name			 AS "shopName",
+		       s.logo			 AS "shopLogo",
+		       a.productLink	 AS "productLink",
 			   a.alias           AS "alias",
 			   a.alias           AS "alias",
 			   a.discription     AS "discription",
 			   a.discription     AS "discription",
 			   a.seoKeyword      AS "seoKeyword",
 			   a.seoKeyword      AS "seoKeyword",
@@ -35,6 +39,7 @@
 			   cbt.name          as "typeName"
 			   cbt.name          as "typeName"
 		from cm_baike_product a
 		from cm_baike_product a
 				 left join cm_baike_type cbt on a.typeId = cbt.id
 				 left join cm_baike_type cbt on a.typeId = cbt.id
+			left join shop s on a.shopId = s.shopID
 		where a.id = #{productId} and a.status = 1 and NOW() > publishTime;
 		where a.id = #{productId} and a.status = 1 and NOW() > publishTime;
 	</select>
 	</select>