| | |
| | | @ApiOperation(value = "新增系统公告") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@RequestBody SystemBulletinDTO dto) { |
| | | if(dto.getStatus()==1){ |
| | | systemBulletinService.update(Wrappers.lambdaUpdate(TSystemBulletin.class) |
| | | .set(TSystemBulletin::getStatus, 2)); |
| | | } |
| | | systemBulletinService.save(dto); |
| | | return R.ok(); |
| | | } |
| | |
| | | @ApiOperation(value = "编辑系统公告") |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody SystemBulletinDTO dto) { |
| | | if(dto.getStatus()==1){ |
| | | systemBulletinService.update(Wrappers.lambdaUpdate(TSystemBulletin.class) |
| | | .set(TSystemBulletin::getStatus, 2)); |
| | | } |
| | | systemBulletinService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | |
| | | } |
| | | @Log(title = "启用/禁用系统公告", businessType = BusinessType.OTHER) |
| | | @ApiOperation(value = "启用/禁用系统公告") |
| | | @DeleteMapping(value = "/editStatus") |
| | | @GetMapping(value = "/editStatus") |
| | | public R<Boolean> editStatus(@RequestParam String id) { |
| | | TSystemBulletin byId = systemBulletinService.getById(id); |
| | | if (byId.getStatus()==1){ |