package com.xinelu.manage.controller.nursestationpersonrevenue;


import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.service.nursestationpersonrevenue.INurseStationPersonRevenueService;
import com.xinelu.manage.vo.nursestationpersonrevenue.PersonRevenueCountVO;
import com.xinelu.manage.vo.nursestationpersonrevenue.RevenueTimeDTO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 护理员订单佣金收益信息Controller
 *
 * @author xinyilu
 * @date 2023-03-30
 */
@RestController
@RequestMapping("/system/revenue")
public class NurseStationPersonRevenueController extends BaseController {
    @Resource
    private INurseStationPersonRevenueService nurseStationPersonRevenueService;

    /**
     * 查询护理员订单佣金收益信息列表
     */
    @PreAuthorize("@ss.hasPermi('system:revenue:list')")
    @GetMapping("/list")
    public TableDataInfo list(RevenueTimeDTO revenueTime) {
        startPage();
        List<PersonRevenueCountVO> list = nurseStationPersonRevenueService.selectNurseStationPersonRevenueList(revenueTime);
        return getDataTable(list);
    }
}
