package yangtz.cs.liu.campus.controller.schoolStudio;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yangtz.cs.liu.campus.domain.schoolStudio.SchoolStudioUse;
import yangtz.cs.liu.campus.service.schoolStudio.ISchoolStudioUseService;

/**
 * 录播室使用情况Controller
 *
 * @author ruoyi
 * @date 2023-07-10
 */
@RestController
@RequestMapping("/studioUse")
public class SchoolStudioUseController extends BaseController
{
    @Autowired
    private ISchoolStudioUseService schoolStudioUseService;

    /**
     * 查询录播室使用情况
     * @param schoolStudioUse
     * @return
     */
    @GetMapping("/list")
    public TableDataInfo list(SchoolStudioUse schoolStudioUse){
        return getDataTable(schoolStudioUseService.selectStudioUse(schoolStudioUse));
    }
























//    /**
//     * 查询录播室使用情况列表
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:list')")
//    @GetMapping("/list")
//    public TableDataInfo list(SchoolStudioUse schoolStudioUse)
//    {
//        startPage();
//        List<SchoolStudioUse> list = schoolStudioUseService.selectSchoolStudioUseList(schoolStudioUse);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出录播室使用情况列表
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:export')")
//    @Log(title = "录播室使用情况", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, SchoolStudioUse schoolStudioUse)
//    {
//        List<SchoolStudioUse> list = schoolStudioUseService.selectSchoolStudioUseList(schoolStudioUse);
//        ExcelUtil<SchoolStudioUse> util = new ExcelUtil<SchoolStudioUse>(SchoolStudioUse.class);
//        util.exportExcel(response, list, "录播室使用情况数据");
//    }
//
//    /**
//     * 获取录播室使用情况详细信息
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:query')")
//    @GetMapping(value = "/{id}")
//    public AjaxResult getInfo(@PathVariable("id") Long id)
//    {
//        return AjaxResult.success(schoolStudioUseService.selectSchoolStudioUseById(id));
//    }
//
//    /**
//     * 新增录播室使用情况
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:add')")
//    @Log(title = "录播室使用情况", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody SchoolStudioUse schoolStudioUse)
//    {
//        return toAjax(schoolStudioUseService.insertSchoolStudioUse(schoolStudioUse));
//    }
//
//    /**
//     * 修改录播室使用情况
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:edit')")
//    @Log(title = "录播室使用情况", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody SchoolStudioUse schoolStudioUse)
//    {
//        return toAjax(schoolStudioUseService.updateSchoolStudioUse(schoolStudioUse));
//    }
//
//    /**
//     * 删除录播室使用情况
//     */
//    @PreAuthorize("@ss.hasPermi('studioUse:use:remove')")
//    @Log(title = "录播室使用情况", businessType = BusinessType.DELETE)
//    @DeleteMapping("/{ids}")
//    public AjaxResult remove(@PathVariable Long[] ids)
//    {
//        return toAjax(schoolStudioUseService.deleteSchoolStudioUseByIds(ids));
//    }
}
