| | |
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | | import com.ruoyi.framework.web.controller.BaseController;
|
| | |
| | | @GetMapping(value = "/{noticeId}")
|
| | | public AjaxResult getInfo(@PathVariable Long noticeId)
|
| | | {
|
| | | return AjaxResult.success(noticeService.selectNoticeById(noticeId));
|
| | | return success(noticeService.selectNoticeById(noticeId));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @PostMapping
|
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | notice.setCreateBy(SecurityUtils.getUsername());
|
| | | notice.setCreateBy(getUsername());
|
| | | return toAjax(noticeService.insertNotice(notice));
|
| | | }
|
| | |
|
| | |
| | | @PutMapping
|
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice)
|
| | | {
|
| | | notice.setUpdateBy(SecurityUtils.getUsername());
|
| | | notice.setUpdateBy(getUsername());
|
| | | return toAjax(noticeService.updateNotice(notice));
|
| | | }
|
| | |
|