Commit 87a5b5228204d85e8e3cba41261dc3d2f5cc359f
1 parent
14cf3f6519
Exists in
master
保存消息接受json数据
Showing 1 changed file with 2 additions and 5 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
87a5b52
| ... | ... | @@ -10,10 +10,7 @@ |
| 10 | 10 | import lombok.extern.log4j.Log4j2; |
| 11 | 11 | import org.springframework.beans.BeanUtils; |
| 12 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 14 | -import org.springframework.web.bind.annotation.PostMapping; | |
| 15 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 16 | -import org.springframework.web.bind.annotation.RestController; | |
| 13 | +import org.springframework.web.bind.annotation.*; | |
| 17 | 14 | |
| 18 | 15 | import java.util.*; |
| 19 | 16 | |
| ... | ... | @@ -81,7 +78,7 @@ |
| 81 | 78 | * @return |
| 82 | 79 | */ |
| 83 | 80 | @PostMapping("saveMsg") |
| 84 | - public BaseResponse saveMsg(LymsMessage message) { | |
| 81 | + public BaseResponse saveMsg(@RequestBody LymsMessage message) { | |
| 85 | 82 | BaseResponse baseResponse = new BaseResponse(); |
| 86 | 83 | message.setSendtime(new Date()); |
| 87 | 84 | boolean f = lymsMessageService.saveOrUpdate(message); |