From 1fb2cfb2bcb152bee03f8a332700241693cfd9b6 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期二, 16 八月 2022 13:37:00 +0800 Subject: [PATCH] bug处理 --- src/main/java/com/example/jz/controller/MessageController.java | 61 +++--------------------------- 1 files changed, 6 insertions(+), 55 deletions(-) diff --git a/src/main/java/com/example/jz/controller/MessageController.java b/src/main/java/com/example/jz/controller/MessageController.java index bd4137e..6f41f6e 100644 --- a/src/main/java/com/example/jz/controller/MessageController.java +++ b/src/main/java/com/example/jz/controller/MessageController.java @@ -1,13 +1,17 @@ package com.example.jz.controller; - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.api.ApiController; import com.baomidou.mybatisplus.extension.api.R; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.example.jz.modle.entity.Message; +import com.example.jz.modle.vo.GroupMessageVo; import com.example.jz.service.MessageService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -22,6 +26,7 @@ */ @RestController @RequestMapping("message") +@Api(tags = "缇ょ粍娑堟伅") public class MessageController extends ApiController { /** * 鏈嶅姟瀵硅薄 @@ -29,59 +34,5 @@ @Resource private MessageService messageService; - /** - * 鍒嗛〉鏌ヨ鎵�鏈夋暟鎹� - * - * @param page 鍒嗛〉瀵硅薄 - * @param message 鏌ヨ瀹炰綋 - * @return 鎵�鏈夋暟鎹� - */ - @GetMapping - public R selectAll(Page<Message> page, Message message) { - return success(this.messageService.page(page, new QueryWrapper<>(message))); - } - /** - * 閫氳繃涓婚敭鏌ヨ鍗曟潯鏁版嵁 - * - * @param id 涓婚敭 - * @return 鍗曟潯鏁版嵁 - */ - @GetMapping("{id}") - public R selectOne(@PathVariable Serializable id) { - return success(this.messageService.getById(id)); - } - - /** - * 鏂板鏁版嵁 - * - * @param message 瀹炰綋瀵硅薄 - * @return 鏂板缁撴灉 - */ - @PostMapping - public R insert(@RequestBody Message message) { - return success(this.messageService.save(message)); - } - - /** - * 淇敼鏁版嵁 - * - * @param message 瀹炰綋瀵硅薄 - * @return 淇敼缁撴灉 - */ - @PutMapping - public R update(@RequestBody Message message) { - return success(this.messageService.updateById(message)); - } - - /** - * 鍒犻櫎鏁版嵁 - * - * @param idList 涓婚敭缁撳悎 - * @return 鍒犻櫎缁撴灉 - */ - @DeleteMapping - public R delete(@RequestParam("idList") List<Long> idList) { - return success(this.messageService.removeByIds(idList)); - } } -- Gitblit v1.8.0