package thyyxxk.webserver.controller.reports;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.reports.infantfee.GetInfantFeeParam;
import thyyxxk.webserver.service.reports.InfantFeeReportService;

import java.util.Map;

@RestController
@RequestMapping("/infantFeeReport")
public class InfantFeeReportController {
    private final InfantFeeReportService service;

    @Autowired
    public InfantFeeReportController(InfantFeeReportService service) {
        this.service = service;
    }

    @PostMapping("/getInfantFee")
    public ResultVo<Map<String, Object>> getInfantFee(@RequestBody @Validated GetInfantFeeParam param) {
        return service.getInfantFee(param);
    }
}
