Procházet zdrojové kódy

商家距离改为整数类型

qizai před 1 rokem
rodič
revize
b6cc5873b1

+ 5 - 2
src/main/java/com/chelvc/cloud/maintain/controller/MerchantController.java

@@ -7,6 +7,7 @@ import javax.validation.constraints.Min;
 import com.chelvc.cloud.maintain.copier.MerchantCopier;
 import com.chelvc.cloud.maintain.vo.MerchantDetailVO;
 import com.chelvc.cloud.maintain.vo.SimpleMerchantVO;
+import com.chelvc.cloud.vehicle.api.param.LocationQueryParam;
 import com.chelvc.cloud.vehicle.api.param.MerchantQueryParam;
 import com.chelvc.cloud.vehicle.api.service.FavoriteService;
 import com.chelvc.cloud.vehicle.api.service.MerchantService;
@@ -49,11 +50,13 @@ public class MerchantController {
      * 获取商家详情
      *
      * @param id 商家ID
+     * @param param 查询参数
      * @return 商家详情
      */
     @GetMapping("/merchant/{id}")
-    public MerchantDetailVO getMerchantDetail(@PathVariable("id") @Min(value = 1, message = "商家ID不能小于1") Long id) {
-        return MerchantCopier.INSTANCE.copying(this.merchantService.getMerchantDetail(id));
+    public MerchantDetailVO getMerchantDetail(@PathVariable("id") @Min(value = 1, message = "商家ID不能小于1") Long id,
+                                              @Valid LocationQueryParam param) {
+        return MerchantCopier.INSTANCE.copying(this.merchantService.getMerchantDetail(id, param));
     }
 
     /**

+ 5 - 0
src/main/java/com/chelvc/cloud/maintain/vo/MerchantVO.java

@@ -55,6 +55,11 @@ public class MerchantVO implements Serializable {
      */
     private Integer sale;
 
+    /**
+     * 好评数量
+     */
+    private Integer goodReview;
+
     /**
      * 距离(米)
      */