增加接口验证

This commit is contained in:
zren25
2025-06-04 17:29:57 +08:00
parent 635dc14bf5
commit c051332def

View File

@@ -5,13 +5,17 @@ import com.huaweicloud.sdk.eg.v1.model.*;
import com.volvo.ai.analytic.center.dto.event.ListSubscriptionsRequestDto;
import com.volvo.ai.analytic.center.dto.event.SubscriptionCreateReqDto;
import com.volvo.ai.analytic.center.dto.event.SubscriptionOperateReqDto;
import com.volvo.ai.analytic.center.dto.resp.CompetingBrrandsDTO;
import com.volvo.ai.analytic.center.dto.resp.ResultDTO;
import com.volvo.ai.analytic.center.feign.CompetingBrandsClient;
import com.volvo.ai.analytic.center.service.HuaWeiEGService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.concurrent.ExecutionException;
/**
@@ -25,6 +29,19 @@ public class EGEventSubscriptionController {
@Resource
HuaWeiEGService huaWeiService;
@Autowired
CompetingBrandsClient CompetingBrandsClient;
@GetMapping("/getBrand")
public void getBrand(){
ResultDTO<List<CompetingBrrandsDTO>> result = CompetingBrandsClient.getBrand();
log.info("callback", JSON.toJSONString(result));
}
@GetMapping("/getSeriesByBrandId")
public void getSeriesByBrandId(String brandId){
ResultDTO<List<CompetingBrrandsDTO>> result = CompetingBrandsClient.getSeriesByBrandId(brandId);
log.info("callback", JSON.toJSONString(result));
}
@PostMapping("/callback")
public void callback(@RequestBody Object req){
log.info("callback", JSON.toJSONString(req));