feat(情报板发布日志控制层接口):
This commit is contained in:
parent
bf656004ce
commit
a9782ded5a
|
@ -0,0 +1,98 @@
|
|||
package com.ruoyi.web.controller.board;
|
||||
|
||||
import com.ruoyi.board.domain.ReleaseLog;
|
||||
import com.ruoyi.board.service.IReleaseLogService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发布日志记录Controller
|
||||
*
|
||||
* @author fuhao
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/board/releaseLog")
|
||||
public class ReleaseLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IReleaseLogService releaseLogService;
|
||||
|
||||
/**
|
||||
* 查询发布日志记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReleaseLog releaseLog)
|
||||
{
|
||||
startPage();
|
||||
List<ReleaseLog> list = releaseLogService.list();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发布日志记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:export')")
|
||||
@Log(title = "发布日志记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ReleaseLog releaseLog)
|
||||
{
|
||||
List<ReleaseLog> list = releaseLogService.list();
|
||||
ExcelUtil<ReleaseLog> util = new ExcelUtil<ReleaseLog>(ReleaseLog.class);
|
||||
util.exportExcel(response, list, "发布日志记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布日志记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(releaseLogService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发布日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:add')")
|
||||
@Log(title = "发布日志记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ReleaseLog releaseLog)
|
||||
{
|
||||
return toAjax(releaseLogService.save(releaseLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发布日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:edit')")
|
||||
@Log(title = "发布日志记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ReleaseLog releaseLog)
|
||||
{
|
||||
return toAjax(releaseLogService.saveOrUpdate(releaseLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发布日志记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('board:releaseLog:remove')")
|
||||
@Log(title = "发布日志记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable List<Long> ids)
|
||||
{
|
||||
return toAjax(releaseLogService.removeByIds(ids));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue