package thyyxxk.webserver.controller.inpatient;

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.inpatient.inpatientcost.ZyDetailRefundParam;
import thyyxxk.webserver.service.inpatient.HospitalizationCostsService;

@RestController
@RequestMapping("/hospitalizationCosts")
public class HospitalizationCostsController {
    private final HospitalizationCostsService service;

    public HospitalizationCostsController(HospitalizationCostsService service) {
        this.service = service;
    }

    @PostMapping("/refund")
    public ResultVo<String> refund(@RequestBody @Validated ZyDetailRefundParam param) {
        return service.refund(param);
    }
}
