You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
4.4 KiB
114 lines
4.4 KiB
package com.zc.business.controller;
|
|
|
|
import java.util.List;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
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.zc.business.domain.DcBoardReleaseLog;
|
|
import com.zc.business.service.IDcBoardReleaseLogService;
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
/**
|
|
* 情报板内容发布日志Controller
|
|
*
|
|
* @author ruoyi
|
|
* @date 2024-01-05
|
|
*/
|
|
@Api(tags = {"情报板发布日志"})
|
|
@RestController
|
|
@RequestMapping("/business/boardReleaseLog")
|
|
public class DcBoardReleaseLogController extends BaseController
|
|
{
|
|
@Autowired
|
|
private IDcBoardReleaseLogService dcBoardReleaseLogService;
|
|
|
|
/**
|
|
* 查询情报板内容发布日志列表
|
|
*/
|
|
@ApiOperation("查询情报板内容发布日志列表")
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:list')")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(DcBoardReleaseLog dcBoardReleaseLog)
|
|
{
|
|
startPage();
|
|
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog);
|
|
return getDataTable(list);
|
|
}
|
|
|
|
/**
|
|
* 导出情报板内容发布日志列表
|
|
*/
|
|
@ApiOperation("导出情报板内容发布日志列表")
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:export')")
|
|
@Log(title = "情报板内容发布日志", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
public void export(HttpServletResponse response, DcBoardReleaseLog dcBoardReleaseLog)
|
|
{
|
|
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog);
|
|
ExcelUtil<DcBoardReleaseLog> util = new ExcelUtil<>(DcBoardReleaseLog.class);
|
|
util.exportExcel(response, list, "情报板内容发布日志数据");
|
|
}
|
|
|
|
/**
|
|
* 获取情报板内容发布日志详细信息
|
|
*/
|
|
@ApiOperation("获取情报板内容发布日志详细信息")
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:query')")
|
|
@GetMapping(value = "/{id}")
|
|
public AjaxResult getInfo(@ApiParam(value = "id", name = "id",required = true) @PathVariable("id") Long id)
|
|
{
|
|
return AjaxResult.success(dcBoardReleaseLogService.selectDcBoardReleaseLogById(id));
|
|
}
|
|
|
|
/**
|
|
* 新增情报板内容发布日志
|
|
*/
|
|
@ApiOperation("新增情报板内容发布日志")
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:add')")
|
|
@Log(title = "情报板内容发布日志", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
public AjaxResult add(@RequestBody DcBoardReleaseLog dcBoardReleaseLog)
|
|
{
|
|
return toAjax(dcBoardReleaseLogService.insertDcBoardReleaseLog(dcBoardReleaseLog));
|
|
}
|
|
|
|
/**
|
|
* 修改情报板内容发布日志
|
|
*/
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:edit')")
|
|
@Log(title = "情报板内容发布日志", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
public AjaxResult edit(@RequestBody DcBoardReleaseLog dcBoardReleaseLog)
|
|
{
|
|
return toAjax(dcBoardReleaseLogService.updateDcBoardReleaseLog(dcBoardReleaseLog));
|
|
}
|
|
|
|
/**
|
|
* 删除情报板内容发布日志
|
|
*/
|
|
@ApiOperation("删除情报板内容发布日志")
|
|
// @PreAuthorize("@ss.hasPermi('business:boardReleaseLog:remove')")
|
|
@Log(title = "情报板内容发布日志", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{ids}")
|
|
public AjaxResult remove(@ApiParam(value = "id", name = "id",required = true) @PathVariable Long[] ids)
|
|
{
|
|
return toAjax(dcBoardReleaseLogService.deleteDcBoardReleaseLogByIds(ids));
|
|
}
|
|
}
|
|
|