package thyyxxk.webserver.controller.outpatient.mzpayqrcode;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.config.auth.PassToken;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.mzpayqrcode.RoughIndex;
import thyyxxk.webserver.service.mzpayqrcode.MzPayQrcodeService;

import java.util.List;
import java.util.Map;

/**
 * @author dj
 */
@RestController
@RequestMapping("/mzPayQrCode")
public class MzPayQrcodeController {
    private final MzPayQrcodeService service;

    @Autowired
    public MzPayQrcodeController(MzPayQrcodeService service) {
        this.service = service;
    }

    @GetMapping("/getRoughList")
    public ResultVo<List<Map<String, String>>> getRoughList(@RequestParam("patientId") String patientId) {
        return service.getRoughList(patientId);
    }

    @PassToken
    @PostMapping("/getDetailFees")
    public ResultVo<JSONObject> getDetailFees(@RequestBody RoughIndex param) {
        return service.getDetailFees(param);
    }

}
