This commit is contained in:
liuchengqian 2023-03-07 15:53:24 +08:00
parent 16cd04631c
commit 6ae7f020d2
4 changed files with 28 additions and 2 deletions

View File

@ -41,6 +41,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers(HttpMethod.POST, "/insertFirePointChannelPrecise").permitAll()
.antMatchers(HttpMethod.GET, "/queryFirePointBroadcast").permitAll()
.antMatchers(HttpMethod.POST, "/api/user/updateSysUser").permitAll()
.antMatchers(HttpMethod.GET, "/queryNotice").permitAll()//查询通知
.antMatchers(HttpMethod.GET, "/selectGlobalConfigDict").permitAll()
.antMatchers(HttpMethod.GET, "/selectGlobalConfigValue").permitAll()
.antMatchers(HttpMethod.GET, "/selectGlobalConfig").permitAll()

View File

@ -36,12 +36,20 @@ public class NoticeController {
return noticeService.updateNotice(token, updateQo);
}
// /**
// * 查询通知
// */
// @GetMapping("/queryNotice")
// public String queryNotice(@RequestHeader(value = "Authorization") String token) {
// return noticeService.queryNotice(token);
// }
/**
* 查询通知
*/
@GetMapping("/queryNotice")
public String queryNotice(@RequestHeader(value = "Authorization") String token) {
return noticeService.queryNotice(token);
public String queryNotice() {
return noticeService.queryNotice();
}
/**

View File

@ -27,6 +27,11 @@ public interface NoticeService {
*/
String queryNotice(String token);
/**
* 查询通知
*/
String queryNotice();
/**
* 已读通知
*/

View File

@ -169,6 +169,18 @@ public class NoticeServiceImpl implements NoticeService {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale);
}
/**
* 查询通知
*/
@Override
public String queryNotice() {
List<NoticeEntity> noticeList = noticeDao.findAll(Sort.by(Sort.Direction.DESC, "id"));
if (noticeList.size() > 0) {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, noticeList.get(0), locale);
}
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, null, locale);
}
/**
* 已读通知
*/