package thyyxxk.webserver.controller.datamodify;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
import thyyxxk.webserver.service.datamodify.SecondFefundService;

/**
 * <p>
 * 描述： 二次退费
 * </p>
 *
 * @author xc
 * @date 2021-05-18 11:21
 */
@RestController
@RequestMapping("/secondFefund")
public class SecondFefundController {

    private final SecondFefundService service;

    public SecondFefundController(SecondFefundService service) {
        this.service = service;
    }

    @GetMapping("/getOrderInformation")
    public ResultVo<MzChargeDetail> getOrderInformation(@RequestParam("patientId") String patientId,
                                                        @RequestParam("times") Integer times,
                                                        @RequestParam("chargeItemCode") String chargeItemCode) {
        return service.getOrderInformation(patientId, times, chargeItemCode);
    }

    @PostMapping("/xiuGaiTuiFei")
    public ResultVo<MzChargeDetail> xiuGaiTuiFei(@RequestBody MzChargeDetail mzChargeDetail) {
        return service.xiuGaiTuiFei(mzChargeDetail);
    }

    @PostMapping("/getMzTuiFei")
    public ResultVo<Page<MzChargeDetail>> getMzTuiFei(@RequestBody MzChargeDetail mzParam) {
        return service.getMzTuiFei(mzParam);
    }
}
