| | |
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | |
| | | @PreAuthorize("@ss.hasPermi('system:notice:add')")
|
| | | @Log(title = "通知公告", businessType = BusinessType.INSERT)
|
| | | @PostMapping
|
| | | public AjaxResult add(@RequestBody SysNotice notice)
|
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | notice.setCreateBy(SecurityUtils.getUsername());
|
| | | return toAjax(noticeService.insertNotice(notice));
|
| | |
| | | @PreAuthorize("@ss.hasPermi('system:notice:edit')")
|
| | | @Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
| | | @PutMapping
|
| | | public AjaxResult edit(@RequestBody SysNotice notice)
|
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | notice.setUpdateBy(SecurityUtils.getUsername());
|
| | | return toAjax(noticeService.updateNotice(notice));
|