瀏覽代碼

新增主营服务、意见反馈新增图片列表

liude 1 年之前
父節點
當前提交
430af4c85c

+ 7 - 0
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/dto/FeedBackDTO.java

@@ -1,4 +1,5 @@
 package com.chelvc.cloud.vehicle.client.dto;
+import com.chelvc.framework.common.model.File;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -6,6 +7,7 @@ import lombok.experimental.SuperBuilder;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 意见反馈数据模型
@@ -70,4 +72,9 @@ public class FeedBackDTO implements Serializable {
      * 渠道类型  0- 用户端 1-商家端
      */
     private String channel;
+
+    /**
+     * 图片列表
+     */
+    private List<File> banners;
 }

+ 1 - 1
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/dto/MerchantDTO.java

@@ -143,7 +143,7 @@ public class MerchantDTO implements Serializable {
     /**
      * 商家主营业务名称
      */
-//    private String mainBusinessName;
+    private String mainBusinessName;
     /**
      * 商家副营业务
      */

+ 7 - 0
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/param/FeedBackModifyParam.java

@@ -1,4 +1,5 @@
 package com.chelvc.cloud.vehicle.client.param;
+import com.chelvc.framework.common.model.File;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -7,6 +8,7 @@ import lombok.experimental.SuperBuilder;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.Size;
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * 意见反馈数据模型
@@ -55,4 +57,9 @@ public class FeedBackModifyParam implements Serializable {
      * 渠道类型  0- 用户端 1-商家端
      */
     private String channel;
+
+    /**
+     * 图片列表
+     */
+    private List<File> banners;
 }

+ 7 - 0
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/entity/FeedBack.java

@@ -3,6 +3,7 @@ package com.chelvc.cloud.vehicle.server.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.chelvc.cloud.vehicle.client.constant.ArticleStatus;
+import com.chelvc.framework.common.model.File;
 import com.chelvc.framework.common.model.Platform;
 import com.chelvc.framework.common.model.Terminal;
 import com.chelvc.framework.database.entity.Entity;
@@ -12,6 +13,7 @@ import lombok.NoArgsConstructor;
 import lombok.experimental.SuperBuilder;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * 意见反馈数据模型
@@ -77,4 +79,9 @@ public class FeedBack implements Entity<Long> {
      * 渠道类型  0- 用户端 1-商家端
      */
     private String channel;
+
+    /**
+     * 图片列表
+     */
+    private List<File> banners;
 }

+ 10 - 10
vehicle-server/src/main/resources/mapper/MerchantMapper.xml

@@ -9,53 +9,53 @@
     </sql>
 
     <select id="listNearbyMerchants" resultType="com.chelvc.cloud.vehicle.client.dto.MerchantDTO">
-        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,
+        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,c.name as mainBusinessName,
         round(st_distance_sphere(
             point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
         )) distance
-        from `merchant` mt
+        from `merchant` mt left join category c on mt.main_business = c.id
         where mt.region between #{param.code} and #{param.boundary}  and mt.status = 'ONLINE'
         order by distance asc limit #{size}
     </select>
 
 
     <select id="listNearbyMerchantPaging" resultType="com.chelvc.cloud.vehicle.client.dto.MerchantDTO">
-        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,
+        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,c.name as mainBusinessName,
                round(st_distance_sphere(
                        point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
                    )) distance
-        from `merchant` mt
+        from `merchant` mt left join category c on mt.main_business = c.id
         where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE'
         order by distance asc
     </select>
 
     <select id="listRecommendMerchants" resultType="com.chelvc.cloud.vehicle.client.dto.MerchantDTO">
-        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,
+        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,c.name as mainBusinessName,
         round(st_distance_sphere(
             point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
         )) distance
-        from `merchant` mt
+        from `merchant` mt left join category c on mt.main_business = c.id
         where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE' and mt.recommend = 1
         order by distance asc limit #{size}
     </select>
 
 
     <select id="listRecommendMerchantPaging" resultType="com.chelvc.cloud.vehicle.client.dto.MerchantDTO">
-        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,
+        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,c.name as mainBusinessName,
                round(st_distance_sphere(
                        point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
                    )) distance
-        from `merchant` mt
+        from `merchant` mt left join category c on mt.main_business = c.id
         where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE' and mt.recommend = 1
         order by distance asc
     </select>
 
     <select id="listSimpleMerchants" resultType="com.chelvc.cloud.vehicle.client.dto.MerchantDTO">
-        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,
+        select mt.id, mt.name, mt.logo, mt.score, mt.sale, mt.address,mt.business_status,c.name as mainBusinessName,
         round(st_distance_sphere(
             point(mt.longitude, mt.latitude), point(#{longitude}, #{latitude})
         )) distance
-        from `merchant` mt
+        from `merchant` mt left join category c on mt.main_business = c.id
         <where>
             <if test="offset != null">
                 mt.id > #{offset}