修改callback

This commit is contained in:
zren25
2025-06-05 10:27:56 +08:00
parent a44b84e1f5
commit a522753bbd

View File

@@ -9,10 +9,12 @@ import com.volvo.ai.analytic.center.dto.resp.CompetingBrrandsDTO;
import com.volvo.ai.analytic.center.dto.resp.ResultDTO; import com.volvo.ai.analytic.center.dto.resp.ResultDTO;
import com.volvo.ai.analytic.center.feign.CompetingBrandsClient; import com.volvo.ai.analytic.center.feign.CompetingBrandsClient;
import com.volvo.ai.analytic.center.service.HuaWeiEGService; import com.volvo.ai.analytic.center.service.HuaWeiEGService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@@ -42,10 +44,13 @@ public class EGEventSubscriptionController {
ResultDTO<List<CompetingBrrandsDTO>> result = CompetingBrandsClient.getSeriesByBrandId(brandId); ResultDTO<List<CompetingBrrandsDTO>> result = CompetingBrandsClient.getSeriesByBrandId(brandId);
log.info("getSeriesByBrandId", JSON.toJSONString(result)); log.info("getSeriesByBrandId", JSON.toJSONString(result));
} }
@PostMapping("/callback") /**
public void callback(@RequestBody Object req){ * 接收事件
log.info("EGEventSubscriptionControllerCallback", JSON.toJSONString(req)); * @param body
*/
@PostMapping("callback")
public void receiveEvent(@RequestBody String body) {
log.info("receiveEvent, {}", body);
} }
/** /**
* 发布事件到事件通道 * 发布事件到事件通道