| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入likes") |
| | | public R submit(@RequestBody Likes likes) { |
| | | if (null==likes.getTime()){ |
| | | likes.setTime(new Date()); |
| | | } |
| | | return R.status(likesService.saveOrUpdate(likes)); |
| | | } |
| | | |
| | |
| | | return R.status(temp); |
| | | } |
| | | |
| | | /** |
| | | * 删除指定点赞记录 |
| | | */ |
| | | @PostMapping("/removelikes") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入likes") |
| | | public R removelikes(@ApiParam(value = "主键集合") @RequestBody Likes likes) { |
| | | boolean temp = likesService.removelikes(likes); |
| | | return R.status(temp); |
| | | } |
| | | |
| | | } |
| | | |