enum jsonvalue

This commit is contained in:
chanbook 2022-07-28 11:54:39 +08:00
parent 91f7ea0b3a
commit 07af183e7f
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package com.zhangshu.chat.demo.constant;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -19,6 +20,7 @@ public enum EAgoraEventType {
client_role_change_to_audience(112,"client role change to audience","直播场景下,主播将角色切换为观众"),
;
@JsonValue
private final int type;
private final String name;
private final String description;

View File

@ -23,7 +23,7 @@ public class EventController {
@PostMapping("/agora")
@ApiOperation(value = "agora")
public CommonResult<LoginVo> agora(@RequestBody AgoraEventDto dto) {
public CommonResult agora(@RequestBody AgoraEventDto dto) {
log.info("事件回调:{}", dto);
eventService.agora(dto);
return CommonResult.success();