//package com.ruoyi.system.controller;
//
//import java.util.List;
//import javax.servlet.http.HttpServletResponse;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.ruoyi.common.annotation.Log;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.enums.BusinessType;
//import com.ruoyi.system.domain.SysSource;
//import com.ruoyi.system.service.ISysSourceService;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.common.core.page.TableDataInfo;
//
///**
// * 资源位Controller
// *
// * @author ruoyi
// * @date 2024-11-08
// */
//@RestController
//@RequestMapping("/system/source")
//public class SysSourceController extends BaseController
//{
//    @Autowired
//    private ISysSourceService sysSourceService;
//
//    /**
//     * 查询资源位列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:list')")
//    @GetMapping("/list")
//    public TableDataInfo list(SysSource sysSource)
//    {
//        startPage();
//        List<SysSource> list = sysSourceService.selectSysSourceList(sysSource);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出资源位列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:export')")
//    @Log(title = "资源位", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, SysSource sysSource)
//    {
//        List<SysSource> list = sysSourceService.selectSysSourceList(sysSource);
//        ExcelUtil<SysSource> util = new ExcelUtil<SysSource>(SysSource.class);
//        util.exportExcel(response, list, "资源位数据");
//    }
//
//    /**
//     * 获取资源位详细信息
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:query')")
//    @GetMapping(value = "/{sourceId}")
//    public AjaxResult getInfo(@PathVariable("sourceId") Long sourceId)
//    {
//        return success(sysSourceService.selectSysSourceBySourceId(sourceId));
//    }
//
//    /**
//     * 新增资源位
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:add')")
//    @Log(title = "资源位", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody SysSource sysSource)
//    {
//        return toAjax(sysSourceService.insertSysSource(sysSource));
//    }
//
//    /**
//     * 修改资源位
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:edit')")
//    @Log(title = "资源位", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody SysSource sysSource)
//    {
//        return toAjax(sysSourceService.updateSysSource(sysSource));
//    }
//
//    /**
//     * 删除资源位
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:remove')")
//    @Log(title = "资源位", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{sourceIds}")
//    public AjaxResult remove(@PathVariable Long[] sourceIds)
//    {
//        return toAjax(sysSourceService.deleteSysSourceBySourceIds(sourceIds));
//    }
//}
