新增通知

This commit is contained in:
2025-11-01 22:04:33 +08:00
parent 47e97e2ecf
commit fafe304494
25 changed files with 1659 additions and 619 deletions

View File

@@ -33,7 +33,6 @@ public class HotakeSysFileController extends BaseController {
@Autowired
private IHotakeSysFileService hotakeSysFileService;
/**
* 查询文件管理列表
*/

View File

@@ -0,0 +1,129 @@
package com.vetti.web.controller.hotake;
import java.util.List;
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.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.AjaxResult;
import com.vetti.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.vetti.hotake.domain.HotakeSysNotice;
import com.vetti.hotake.service.IHotakeSysNoticeService;
import com.vetti.common.utils.poi.ExcelUtil;
import com.vetti.common.core.page.TableDataInfo;
/**
* 通知Controller
*
* @author ID
* @date 2025-11-01
*/
@Api(tags = "通知")
@RestController
@RequestMapping("/hotake/sysNotice")
public class HotakeSysNoticeController extends BaseController {
@Autowired
private IHotakeSysNoticeService hotakeSysNoticeService;
/**
* 查询通知列表
*/
@ApiOperation("查询通知列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:list')")
@GetMapping("/listview")
public AjaxResult listView(HotakeSysNotice hotakeSysNotice) {
return AjaxResult.success(hotakeSysNoticeService.selectHotakeSysNoticeViewList(hotakeSysNotice));
}
/**
* 获取通知详细信息
*/
@ApiOperation("查看通知详细信息")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:query')")
@GetMapping(value = "/view/{id}")
public AjaxResult viewInfo(@PathVariable("id") Long id) {
return AjaxResult.success(hotakeSysNoticeService.selectHotakeSysNoticeViewById(id));
}
@ApiOperation("全部已读")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:query')")
@GetMapping(value = "/allread")
public AjaxResult allRead() {
return AjaxResult.success(hotakeSysNoticeService.allRead());
}
/**
* 查询通知列表
*/
@ApiOperation("查询通知列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:list')")
@GetMapping("/list")
public TableDataInfo list(HotakeSysNotice hotakeSysNotice) {
startPage();
List<HotakeSysNotice> list = hotakeSysNoticeService.selectHotakeSysNoticeList(hotakeSysNotice);
return getDataTable(list);
}
/**
* 导出通知列表
*/
@ApiOperation("导出通知列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:export')")
@Log(title = "通知", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(HotakeSysNotice hotakeSysNotice) {
List<HotakeSysNotice> list = hotakeSysNoticeService.selectHotakeSysNoticeList(hotakeSysNotice);
ExcelUtil<HotakeSysNotice> util = new ExcelUtil<HotakeSysNotice>(HotakeSysNotice.class);
return util.exportExcel(list, "通知数据");
}
@ApiOperation("获取通知详细信息")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(hotakeSysNoticeService.selectHotakeSysNoticeById(id));
}
/**
* 新增通知
*/
@ApiOperation("新增通知")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:add')")
@Log(title = "通知", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HotakeSysNotice hotakeSysNotice) {
return toAjax(hotakeSysNoticeService.insertHotakeSysNotice(hotakeSysNotice));
}
/**
* 修改通知
*/
@ApiOperation("修改通知")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:edit')")
@Log(title = "通知", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HotakeSysNotice hotakeSysNotice) {
return toAjax(hotakeSysNoticeService.updateHotakeSysNotice(hotakeSysNotice));
}
/**
* 删除通知
*/
@ApiOperation("删除通知")
@PreAuthorize("@ss.hasPermi('hotake:sysNotice:remove')")
@Log(title = "通知", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(hotakeSysNoticeService.deleteHotakeSysNoticeByIds(ids));
}
}

View File

@@ -1,108 +0,0 @@
package com.vetti.web.controller.hotake;
import java.util.List;
import com.vetti.hotake.domain.dto.HotakeSysNoticeTypeDto;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.AjaxResult;
import com.vetti.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.vetti.hotake.domain.HotakeSysNoticeType;
import com.vetti.hotake.service.IHotakeSysNoticeTypeService;
import com.vetti.common.utils.poi.ExcelUtil;
import com.vetti.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 通知类型Controller
*
* @author ID
* @date 2025-11-01
*/
@Api(tags = "通知类型")
@RestController
@RequestMapping("/hotake/sysNoticeType")
public class HotakeSysNoticeTypeController extends BaseController {
@Autowired
private IHotakeSysNoticeTypeService hotakeSysNoticeTypeService;
/**
* 查询通知类型列表
*/
@ApiOperation("查询通知类型列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:list')")
@GetMapping("/list")
public TableDataInfo list(HotakeSysNoticeType hotakeSysNoticeType) {
startPage();
List<HotakeSysNoticeTypeDto> list = hotakeSysNoticeTypeService.selectHotakeSysNoticeTypeList(hotakeSysNoticeType);
return getDataTable(list);
}
@ApiOperation("查询通知类型列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:list')")
@GetMapping("/listall")
public AjaxResult listAll(HotakeSysNoticeType hotakeSysNoticeType) {
return AjaxResult.success(hotakeSysNoticeTypeService.selectHotakeSysNoticeTypeList(hotakeSysNoticeType));
}
/**
* 导出通知类型列表
*/
@ApiOperation("导出通知类型列表")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:export')")
@Log(title = "通知类型", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(HotakeSysNoticeType hotakeSysNoticeType) {
List<HotakeSysNoticeTypeDto> list = hotakeSysNoticeTypeService.selectHotakeSysNoticeTypeList(hotakeSysNoticeType);
ExcelUtil<HotakeSysNoticeTypeDto> util = new ExcelUtil<>(HotakeSysNoticeTypeDto.class);
return util.exportExcel(list, "通知类型数据");
}
/**
* 获取通知类型详细信息
*/
@ApiOperation("获取通知类型详细信息")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(hotakeSysNoticeTypeService.selectHotakeSysNoticeTypeById(id));
}
/**
* 新增通知类型
*/
@ApiOperation("新增通知类型")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:add')")
@Log(title = "通知类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestPart(value = "files", required = false) List<MultipartFile> files, HotakeSysNoticeType hotakeSysNoticeType) {
return toAjax(hotakeSysNoticeTypeService.insertHotakeSysNoticeType(files, hotakeSysNoticeType));
}
/**
* 修改通知类型
*/
@ApiOperation("修改通知类型(不修改图片不需要传files只要修改一个所有图片都需要传)")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:edit')")
@Log(title = "通知类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestPart(value = "files", required = false) List<MultipartFile> files, HotakeSysNoticeType hotakeSysNoticeType) {
return toAjax(hotakeSysNoticeTypeService.updateHotakeSysNoticeType(files, hotakeSysNoticeType));
}
/**
* 删除通知类型
*/
@ApiOperation("删除通知类型")
@PreAuthorize("@ss.hasPermi('hotake:sysNoticeType:remove')")
@Log(title = "通知类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(hotakeSysNoticeTypeService.deleteHotakeSysNoticeTypeByIds(ids));
}
}