This commit is contained in:
liuchengqian 2023-03-07 13:42:55 +08:00
parent bf9c48b15a
commit 739cd28427
3 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,47 @@
package com.xkrs.straw.controller;
import com.xkrs.straw.model.entity.NoticeEntity;
import com.xkrs.straw.service.NoticeService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
public class NoticeController {
@Resource
private NoticeService noticeService;
/**
* 添加通知
*/
@PostMapping("/insertNotice")
public String insertNotice(@RequestHeader(value = "Authorization") String token, @RequestBody NoticeEntity insertQo) {
return noticeService.insertNotice(token, insertQo);
}
/**
* 删除通知
*/
@PostMapping("/deleteNotice")
public String deleteNotice(@RequestHeader(value = "Authorization") String token, @RequestBody Long id) {
return noticeService.deleteNotice(token, id);
}
/**
* 更新通知
*/
@PostMapping("/updateNotice")
public String updateNotice(@RequestHeader(value = "Authorization") String token, @RequestBody NoticeEntity updateQo) {
return noticeService.updateNotice(token, updateQo);
}
/**
* 查询通知
*/
@GetMapping("/queryNotice")
public String queryNotice(@RequestHeader(value = "Authorization") String token) {
return noticeService.queryNotice(token);
}
}

View File

@ -0,0 +1,30 @@
package com.xkrs.straw.service;
import com.xkrs.straw.model.entity.NoticeEntity;
/**
* 公告栏通知接口
*/
public interface NoticeService {
/**
* 添加通知
*/
String insertNotice(String token, NoticeEntity insertQo);
/**
* 删除通知
*/
String deleteNotice(String token, Long id);
/**
* 更新通知
*/
String updateNotice(String token, NoticeEntity updateQo);
/**
* 查询通知
*/
String queryNotice(String token);
}

View File

@ -0,0 +1,45 @@
package com.xkrs.straw.service.impl;
import com.xkrs.straw.model.entity.NoticeEntity;
import com.xkrs.straw.service.NoticeService;
import org.springframework.stereotype.Service;
/**
* 公告栏通知接口
*/
@Service
public class NoticeServiceImpl implements NoticeService {
/**
* 添加通知
*/
@Override
public String insertNotice(String token, NoticeEntity insertQo) {
return null;
}
/**
* 删除通知
*/
@Override
public String deleteNotice(String token, Long id) {
return null;
}
/**
* 更新通知
*/
@Override
public String updateNotice(String token, NoticeEntity updateQo) {
return null;
}
/**
* 查询通知
*/
@Override
public String queryNotice(String token) {
return null;
}
}