Ver código fonte

产品详情数据

Aslee 3 anos atrás
pai
commit
9eca9295de

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

@@ -30,6 +30,26 @@ public class BaikeProduct implements Serializable {
      */
     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",
 			   a.commodityType   AS "commodityType",
 			   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.discription     AS "discription",
 			   a.seoKeyword      AS "seoKeyword",
@@ -35,6 +39,7 @@
 			   cbt.name          as "typeName"
 		from cm_baike_product a
 				 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;
 	</select>