5 changed files with 146 additions and 0 deletions
@ -0,0 +1,87 @@ |
|||||
|
package com.zdxt.app.controller; |
||||
|
|
||||
|
import com.zdxt.auth.project.system.notice.domain.Notice; |
||||
|
import com.zdxt.auth.project.system.notice.service.INoticeService; |
||||
|
import com.zdxt.common.ZDResponse; |
||||
|
import com.zdxt.common.controller.BaseController; |
||||
|
import com.zdxt.common.util.TableDataInfo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 后台通知Controller |
||||
|
* |
||||
|
* @author yanyan |
||||
|
* @date 2025-05-20 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/app/system/enforceNotice") |
||||
|
public class AppEnforceSystemNoticeController extends BaseController { |
||||
|
@Autowired |
||||
|
private INoticeService noticeService; |
||||
|
|
||||
|
/** |
||||
|
* 查询后台通知列表 |
||||
|
*/ |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(Notice notice) { |
||||
|
startPage(); |
||||
|
List<Notice> list = noticeService.selectNoticeList(notice); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/listNoPermission") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo listNoPermission(Notice notice) { |
||||
|
|
||||
|
List<Notice> list = |
||||
|
noticeService.selectNoticeListNoPermission(notice); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查看通知详情 |
||||
|
*/ |
||||
|
@GetMapping("/detail/{id}") |
||||
|
@ResponseBody |
||||
|
public ZDResponse detailById(@PathVariable("id") String id) { |
||||
|
Notice notice = noticeService.selectNoticeById(id); |
||||
|
return ZDResponse.success("查询成功", notice); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询附件信息 |
||||
|
* |
||||
|
* @param key |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/queryFiles/{key}") |
||||
|
@ResponseBody |
||||
|
public ZDResponse queryFiles(@PathVariable String key) { |
||||
|
HashMap<String, Object> map = new HashMap<>(); |
||||
|
map.put("filePreview", noticeService.queryFiles(key)); |
||||
|
return ZDResponse.success("获取成功", map); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询附件信息 |
||||
|
* |
||||
|
* @param key |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/queryFilesPost") |
||||
|
@ResponseBody |
||||
|
public ZDResponse queryFilesPost(String key) { |
||||
|
HashMap<String, Object> map = new HashMap<>(); |
||||
|
map.put("filePreview", noticeService.queryFiles(key)); |
||||
|
return ZDResponse.success("获取成功", map); |
||||
|
} |
||||
|
|
||||
|
} |
||||
Loading…
Reference in new issue