package thyyxxk.webserver.controller.jianyanjiekou;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.config.auth.PassToken;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.jianyanjiekou.QueryNormal;
import thyyxxk.webserver.service.jianyanjiekou.JianYanJieKouService;

@RestController
@RequestMapping("/jianYanJieKou")
public class JianYanJieKouController {
    private final JianYanJieKouService server;

    public JianYanJieKouController(JianYanJieKouService server) {
        this.server = server;
    }

    @PostMapping("/getNormal")
    @PassToken
    public ResultVo<JSONArray> getNormal(@RequestBody QueryNormal param) {
        return server.getNormal(param);
    }

    @GetMapping("/getDetail")
    @PassToken
    public ResultVo<JSONObject> getDetail(@RequestParam("reportId") String reportId) {
        return server.getDetail(reportId);
    }

}
