package com.mzl.flower.web.customer; 
 | 
  
 | 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 
 | 
import com.mzl.flower.base.BaseController; 
 | 
import com.mzl.flower.base.R; 
 | 
import com.mzl.flower.base.ReturnDataDTO; 
 | 
import com.mzl.flower.dto.request.flower.FlowerCategoryQueryDTO; 
 | 
import com.mzl.flower.dto.response.flower.*; 
 | 
import com.mzl.flower.service.flower.FlowerCategoryService; 
 | 
import com.mzl.flower.service.flower.FlowerService; 
 | 
import io.swagger.annotations.Api; 
 | 
import io.swagger.annotations.ApiImplicitParam; 
 | 
import io.swagger.annotations.ApiImplicitParams; 
 | 
import io.swagger.annotations.ApiOperation; 
 | 
import lombok.extern.slf4j.Slf4j; 
 | 
import org.springframework.beans.factory.annotation.Autowired; 
 | 
import org.springframework.http.ResponseEntity; 
 | 
import org.springframework.validation.annotation.Validated; 
 | 
import org.springframework.web.bind.annotation.*; 
 | 
  
 | 
import java.util.List; 
 | 
  
 | 
@RestController 
 | 
@RequestMapping("/api/pub/customer/home") 
 | 
@Api(value = "首页-花店", tags = "首页-花店") 
 | 
@Validated 
 | 
@Slf4j 
 | 
public class HomeCustomerController extends BaseController { 
 | 
  
 | 
    @Autowired 
 | 
    private FlowerService flowerService; 
 | 
  
 | 
    @Autowired 
 | 
    private FlowerCategoryService categoryService; 
 | 
  
 | 
    @GetMapping("/category/price/ave") 
 | 
    @ApiOperation(value = "获取商品分类均价") 
 | 
    public ResponseEntity<ReturnDataDTO<List<FlowerCategoryDailyDTO>>> getHomeCategoryDaily(Page page){ 
 | 
        return returnData(R.SUCCESS.getCode(), flowerService.getHomeCategoryDaily(page)); 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |