package com.supervision.controller;

import com.supervision.service.IrSessionParamService;
import com.supervision.vo.session.SessionParamReqVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@Api(tags = "会话参数管理")
@RestController
@RequestMapping("/sessionParam")
@RequiredArgsConstructor
public class SessionParamController {

    private final IrSessionParamService sessionParamService;

    @ApiOperation("保存会话参数")
    @PostMapping("/save")
    public boolean saveSessionParam(@RequestBody SessionParamReqVO sessionParamReqVO) {
        return sessionParamService.saveSessionParam(sessionParamReqVO);
    }


    @ApiOperation("查询会话参数")
    @GetMapping("/findSessionParam")
    public SessionParamReqVO findSessionParam(@RequestParam("sessionId") String sessionId) {
        return sessionParamService.findSessionParam(sessionId);
    }


}
