Browse Source

附近商家、推荐商家支持分页查询

liude 1 year ago
parent
commit
082ccf2090

+ 15 - 0
src/main/java/com/chelvc/cloud/maintain/controller/IndexController.java

@@ -11,18 +11,22 @@ import com.chelvc.cloud.vehicle.client.CategoryClient;
 import com.chelvc.cloud.vehicle.client.MerchantClient;
 import com.chelvc.cloud.vehicle.client.MerchantClient;
 import com.chelvc.cloud.vehicle.client.dto.CategoryDTO;
 import com.chelvc.cloud.vehicle.client.dto.CategoryDTO;
 import com.chelvc.cloud.vehicle.client.dto.MerchantDTO;
 import com.chelvc.cloud.vehicle.client.dto.MerchantDTO;
+import com.chelvc.cloud.vehicle.client.param.LocationQueryPagingParam;
 import com.chelvc.cloud.vehicle.client.param.LocationQueryParam;
 import com.chelvc.cloud.vehicle.client.param.LocationQueryParam;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.annotation.ResponseWrapping;
 import com.chelvc.framework.base.context.SessionContextHolder;
 import com.chelvc.framework.base.context.SessionContextHolder;
+import com.chelvc.framework.common.model.Pagination;
 import com.chelvc.framework.location.Address;
 import com.chelvc.framework.location.Address;
 import com.chelvc.framework.location.LocationHandler;
 import com.chelvc.framework.location.LocationHandler;
 import com.chelvc.framework.oauth.annotation.Authorize;
 import com.chelvc.framework.oauth.annotation.Authorize;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.openfeign.SpringQueryMap;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
@@ -107,4 +111,15 @@ public class IndexController {
         }
         }
         return index;
         return index;
     }
     }
+
+    /**
+     * 分页获取附近商家
+     *
+     * @param param 查询参数
+     * @return 商家信息列表
+     */
+    @GetMapping("/merchant/indexMerchantPaging")
+    public Pagination<MerchantDTO> indexMerchantPaging(@Valid LocationQueryPagingParam param) {
+        return merchantClient.indexMerchantPaging(param);
+    }
 }
 }