| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComCvtBusinessDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComCvtServeDTO; |
| | |
| | | import com.panzhihua.service_community.service.ConvenientProductCategoryService; |
| | | import com.panzhihua.service_community.service.ConvenientProductService; |
| | | import com.panzhihua.service_community.service.ConvenientServiceCategoryService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @description: 便民服务接口 |
| | |
| | | public R onShelfOrOffShelfProduct(@RequestBody OnShelfOrOffShelfProductDTO onShelfOrOffShelfProductDTO) { |
| | | return convenientProductService.onShelfOrOffShelfProduct(onShelfOrOffShelfProductDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有产品分类 |
| | | * @return |
| | | */ |
| | | @GetMapping("/product-category/all") |
| | | public R getAllProductCategory() { |
| | | return convenientProductCategoryService.getAllProductCategory(); |
| | | } |
| | | |
| | | /** |
| | | * 获取该社区商家数量大于0的分类 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/service-category/suitable") |
| | | public R getSuitableServiceCategories(@RequestParam("communityId") Long communityId) { |
| | | return convenientServiceCategoryService.getSuitableServiceCategories(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 获取该社区下的热门商家 |
| | | * @param pagePopularMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/popular") |
| | | public R getPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) { |
| | | return convenientMerchantService.getPopularMerchants(pagePopularMerchantDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页获取服务类型下商家信息 |
| | | * @param pageClassifyMerchantDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/merchant/classify") |
| | | public R getClassifyMerchants(PageClassifyMerchantDTO pageClassifyMerchantDTO) { |
| | | return convenientMerchantService.getClassifyMerchants(pageClassifyMerchantDTO); |
| | | } |
| | | } |