Browse Source

新增大屏产品查询详情购买地址

ghost 4 years ago
parent
commit
f403cda828

+ 5 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dto/param/BigDataListInfoVo.java

@@ -3,6 +3,7 @@ package com.hwrj.cloud.admin.dto.param;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 @Data
 public class BigDataListInfoVo {
@@ -38,4 +39,8 @@ public class BigDataListInfoVo {
      * 产品简介
      */
     private String description;
+    /**
+     * 购买路径集合
+     */
+    private List<BuyProductInfoVo> buyUrls;
 }

+ 10 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/dto/param/BuyProductInfoVo.java

@@ -0,0 +1,10 @@
+package com.hwrj.cloud.admin.dto.param;
+
+import lombok.Data;
+
+@Data
+public class BuyProductInfoVo {
+    private String shopType;
+    private String shopImg;
+    private String shopUrl;
+}

+ 25 - 2
forest-admin/admin-server/src/main/resources/dao/ProductExcelDao.xml

@@ -136,7 +136,26 @@
     </if>
     </select>
 
-    <select id="bigDatainfo" resultType="com.hwrj.cloud.admin.dto.param.BigDataListInfoVo" parameterType="java.lang.Long">
+    <resultMap id="bigDatainfoMap" type="com.hwrj.cloud.admin.dto.param.BigDataListInfoVo">
+        <id column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="pic" property="pic"/>
+        <result column="brandName" property="brandName"/>
+        <result column="price" property="price"/>
+        <result column="spec" property="spec"/>
+        <result column="qualityGuaranteePeriod" property="qualityGuaranteePeriod"/>
+        <result column="placeOfProduction" property="placeOfProduction"/>
+        <result column="umsCompanyInfo" property="umsCompanyInfo"/>
+        <result column="description" property="description"/>
+        <collection property="buyUrls" javaType="java.util.List"
+                    ofType="com.hwrj.cloud.admin.dto.param.BuyProductInfoVo">
+            <result column="shopType" property="shopType"/>
+            <result column="shopImg" property="shopImg"/>
+            <result column="shopUrl" property="shopUrl"/>
+        </collection>
+    </resultMap>
+
+    <select id="bigDatainfo" resultMap="bigDatainfoMap" parameterType="java.lang.Long">
         SELECT
         a.id,
         a.`name` AS 'name',
@@ -147,9 +166,13 @@
         a.quality_guarantee_period AS qualityGuaranteePeriod,
         a.place_of_production AS placeOfProduction,
         a.ums_company_info AS umsCompanyInfo,
-        a.description AS description
+        a.description AS description,
+        b.shop_type AS shopType,
+        b.shop_img AS shopImg,
+        b.shop_url AS shopUrl
         FROM
         pms_product a
+        LEFT JOIN ums_company_shop b on a.ums_company_info_id=b.comp_id
         WHERE 1=1
         <if test="id != null">
             AND a.id = #{id}