package com.willalp.web.controller.report;

import com.willalp.common.core.controller.BaseController;
import com.willalp.common.core.page.TableDataInfo;
import com.willalp.canteen.domain.vo.PlaceIncomeVo;
import com.willalp.canteen.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/report")
public class reportController extends BaseController {

    @Autowired
    private IReportService reportService;


    /**
     * 就餐地收益统计
     */
    @GetMapping("/getPlaceIncome")
    public TableDataInfo getPlaceIncome(PlaceIncomeVo placeIncomeVo)
    {
        startPage();
        List<PlaceIncomeVo> list = reportService.selectPlaceIncome(placeIncomeVo);
        return getDataTable(list);
    }


}
