|
@@ -22,7 +22,7 @@ import javax.validation.Valid;
|
|
|
* Created by owen on 2020/5/8 0008 9:54
|
|
|
*/
|
|
|
@Slf4j
|
|
|
-@Api(tags = "留言管理")
|
|
|
+@Api(tags = "v0.1-留言管理")
|
|
|
@RestController
|
|
|
@RequestMapping("manage/comment")
|
|
|
public class CommentController extends BaseController {
|
|
@@ -52,26 +52,32 @@ public class CommentController extends BaseController {
|
|
|
|
|
|
|
|
|
@WebControllerLog(description = "留言管理-删除留言", addDb = true)
|
|
|
- @ApiOperation("删除")
|
|
|
+ @ApiOperation(value = "删除(支持批量)", notes = "ids多个以逗号隔开")
|
|
|
@GetMapping("removes/{ids}")
|
|
|
- public Result detail(@PathVariable String ids) {
|
|
|
+ public Result removes(@PathVariable String ids) {
|
|
|
commentService.deleteByIds(ids);
|
|
|
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
- @ApiOperation("是否显示")
|
|
|
- @GetMapping("display/{id}/{display}")
|
|
|
- public Result display(@PathVariable Long id, @PathVariable Integer display) {
|
|
|
- CommentEntity entity = commentService.findById(id);
|
|
|
- if (entity == null) {
|
|
|
- log.error("对象id不存在 : {}", id);
|
|
|
- return Result.failure("对象id不存在");
|
|
|
- }
|
|
|
-
|
|
|
- entity.setDisplay(display);
|
|
|
- commentService.update(entity);
|
|
|
- return Result.success();
|
|
|
+// @ApiOperation("是否显示")
|
|
|
+// @GetMapping("display/{id}/{display}")
|
|
|
+// public Result display(@PathVariable Long id, @PathVariable Integer display) {
|
|
|
+// CommentEntity entity = commentService.findById(id);
|
|
|
+// if (entity == null) {
|
|
|
+// log.error("对象id不存在 : {}", id);
|
|
|
+// return Result.failure("对象id不存在");
|
|
|
+// }
|
|
|
+//
|
|
|
+// entity.setDisplay(display);
|
|
|
+// commentService.update(entity);
|
|
|
+// return Result.success();
|
|
|
+// }
|
|
|
+
|
|
|
+ @ApiOperation(value = "v0.1-是否显示(支持批量)", notes = "ids多个以逗号隔开")
|
|
|
+ @GetMapping("displays/{ids}/{display}")
|
|
|
+ public Result displays(@PathVariable String ids, @PathVariable Integer display) {
|
|
|
+ return commentService.displays(ids, display);
|
|
|
}
|
|
|
|
|
|
|