package com.zhangshu.chat.demo.controller; import com.zhangshu.chat.demo.dto.CommonResult; import com.zhangshu.chat.demo.service.EventService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; @Slf4j @RestController @RequestMapping("/event") @Api(value = "EventController", tags = "事件回调") public class EventController { @Autowired EventService eventService; @PostMapping("/agora") @ApiOperation(value = "agora") public CommonResult agora(@RequestBody Map body) { log.info("事件回调:{}", body); eventService.agora(body); return CommonResult.success(); } }