package thyyxxk.webserver.controller.medicalinsurance;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.medicalinsurance.log.FetchLog;
import thyyxxk.webserver.entity.medicalinsurance.log.SiLog;
import thyyxxk.webserver.service.medicalinsurance.SiLogService;

import java.util.Map;

@RestController
@RequestMapping("/siLog")
public class SiLogController {
    private final SiLogService service;

    @Autowired
    public SiLogController(SiLogService service) {
        this.service = service;
    }

    @PostMapping("/selectSiLogs")
    public ResultVo<Map<String, Object>> selectSiLogs(@RequestBody FetchLog ftchlg) {
        return service.selectSiLogs(ftchlg);
    }

    @GetMapping("/selectSiLogBody")
    public ResultVo<SiLog> selectSiLogBody(@RequestParam("msgid") String msgid) {
        return service.selectSiLogBody(msgid);
    }
}
