//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.DailySource;
//import com.ruoyi.system.service.IDailySourceService;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.common.core.page.TableDataInfo;
//
///**
// * 资源位每天统计Controller
// *
// * @author haotian
// * @date 2024-12-09
// */
//@RestController
//@RequestMapping("/system/source")
//public class DailySourceController extends BaseController
//{
//    @Autowired
//    private IDailySourceService dailySourceService;
//
//    /**
//     * 查询资源位每天统计列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:list')")
//    @GetMapping("/list")
//    public TableDataInfo list(DailySource dailySource)
//    {
//        startPage();
//        List<DailySource> list = dailySourceService.selectDailySourceList(dailySource);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出资源位每天统计列表
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:export')")
//    @Log(title = "资源位每天统计", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, DailySource dailySource)
//    {
//        List<DailySource> list = dailySourceService.selectDailySourceList(dailySource);
//        ExcelUtil<DailySource> util = new ExcelUtil<DailySource>(DailySource.class);
//        util.exportExcel(response, list, "资源位每天统计数据");
//    }
//
//    /**
//     * 获取资源位每天统计详细信息
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:query')")
//    @GetMapping(value = "/{dailySourceId}")
//    public AjaxResult getInfo(@PathVariable("dailySourceId") Long dailySourceId)
//    {
//        return success(dailySourceService.selectDailySourceByDailySourceId(dailySourceId));
//    }
//
//    /**
//     * 新增资源位每天统计
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:add')")
//    @Log(title = "资源位每天统计", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody DailySource dailySource)
//    {
//        return toAjax(dailySourceService.insertDailySource(dailySource));
//    }
//
//    /**
//     * 修改资源位每天统计
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:edit')")
//    @Log(title = "资源位每天统计", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody DailySource dailySource)
//    {
//        return toAjax(dailySourceService.updateDailySource(dailySource));
//    }
//
//    /**
//     * 删除资源位每天统计
//     */
//    @PreAuthorize("@ss.hasPermi('system:source:remove')")
//    @Log(title = "资源位每天统计", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{dailySourceIds}")
//    public AjaxResult remove(@PathVariable Long[] dailySourceIds)
//    {
//        return toAjax(dailySourceService.deleteDailySourceByDailySourceIds(dailySourceIds));
//    }
//}
