| | |
| | | */ |
| | | package org.springblade.modules.notice.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通知公告表浏览数量加一 |
| | | */ |
| | | @PostMapping("/addNumber") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "添加浏览数量", notes = "传入notice") |
| | | public R addNumber(@Valid @RequestBody NoticeEntity notice) { |
| | | UpdateWrapper<NoticeEntity> objectUpdateWrapper = new UpdateWrapper<>(); |
| | | objectUpdateWrapper.setSql("view_number = view_number + 1"); |
| | | objectUpdateWrapper.eq("id",notice.getId()); |
| | | return R.status(noticeService.update(null ,objectUpdateWrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 通知公告表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |