| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.mangoo.rating.recommend.client;
- import com.alibaba.fastjson.JSON;
- import com.alibaba.fastjson.JSONObject;
- import com.mangoo.rating.recommend.client.feign.OrderServiceClient;
- import com.mangoo.rating.recommend.client.feign.dto.*;
- import lombok.extern.log4j.Log4j2;
- import org.springframework.stereotype.Component;
- import javax.annotation.Resource;
- import java.util.List;
- /**
- * 摄像头服务客户端
- *
- * @author gengjintao
- * @date 2026/04/16
- */
- @Log4j2
- @Component
- public class OrderApiClient {
- @Resource
- private OrderServiceClient orderServiceClient;
- /**
- * 获取产品服务时效列表
- *
- * @param levelName 套餐类型
- * @return 是否成功
- */
- public List<ProductServiceLevelDTO> serviceList(String levelName) {
- try {
- ProductServiceLevelRequest request = new ProductServiceLevelRequest();
- log.info("获取产品服务时效列表参数:{}", request);
- JSONObject result = orderServiceClient.serviceList(request);
- if (result != null && result.getInteger("code") == 0) {
- Object object = result.get("data");
- return JSON.parseArray(JSON.toJSONString(object), ProductServiceLevelDTO.class);
- }
- } catch (Exception e) {
- log.error("获取产品服务失效列表异常", e);
- }
- return null;
- }
- }
|