package com.cool.store.controller;

import com.cool.store.exception.ApiException;
import com.cool.store.request.GetFreeBusyListReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.FeiShuService;
import com.cool.store.vo.interview.GetFreeBusyListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: young.yu
 * @Date: 2023-06-16  13:06
 * @Description:
 */
@Api(tags = "飞书相关接口")
@RestController
@RequestMapping({"/feishu"})
public class FeiShuController {

    @Autowired
    private FeiShuService feiShuService;
    @PostMapping("/interviewer/freebusy/list")
    @ApiOperation("查询日程忙闲信息")
    public ResponseResult<GetFreeBusyListVO> getFreeBusyList(@RequestBody GetFreeBusyListReq request) throws ApiException {
        GetFreeBusyListVO getFreeBusyListVO= feiShuService.getFreeBusyList(request);
        return ResponseResult.success(getFreeBusyListVO);
    }
}
