Commit 64fa526d by 崔彦峰

feat(car): 新增车辆品牌车系管理功能

- 在CarBrandController中添加@RestController注解并实现车系查询接口
- 新增CarSeriesListResDTO和CarSeriesResDTO数据传输对象
- 扩展CarBrandRemote远程接口支持车系列表查询
- 实现CarBrandService中的getCarSeriesList业务逻辑
- 集成GopCarInfoRemote获取车辆品牌车系层级数据
- 修复CarBrandListResDTO中brands字段的文档描述
- 优化车系数据解析和转换逻辑
1 parent 5f543f56
package cn.com.glsx.dj.strategy.controller; package cn.com.glsx.dj.strategy.controller;
import cn.com.glsx.dj.strategy.dto.CarBrandListResDTO; import cn.com.glsx.dj.strategy.dto.CarBrandListResDTO;
import cn.com.glsx.dj.strategy.dto.CarSeriesListResDTO;
import cn.com.glsx.dj.strategy.remote.CarBrandRemote; import cn.com.glsx.dj.strategy.remote.CarBrandRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.rop.response.RopResponse; import cn.com.glsx.framework.rop.response.RopResponse;
...@@ -12,11 +13,13 @@ import io.swagger.annotations.Api; ...@@ -12,11 +13,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
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.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES) @ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("车辆品牌管理-查询") @Api("车辆品牌管理-查询")
//@RestController @RestController
public class CarBrandController { public class CarBrandController {
@Autowired @Autowired
...@@ -33,4 +36,16 @@ public class CarBrandController { ...@@ -33,4 +36,16 @@ public class CarBrandController {
} }
return RopResponse.success(response.getResult()); return RopResponse.success(response.getResult());
} }
@ApiOperation("查询车辆品牌对应车系")
@ServiceMethod(method = "dj.api.smartcarlife.common.car.series.list")
@PostMapping("/dj.api.smartcarlife.common.car.series.list/1.0.0")
public RopResponse<CarSeriesListResDTO> getCarSeriesList(AbstractRopRequest request){
RpcResponse<CarSeriesListResDTO> response = carBrandRemote.getCarSeriesList();
if (response.isFailed() || !response.hasResult()) {
log.error("查询车辆品牌对应车系失败, message:{}", response.getMessage());
return RopResponse.error("查询车辆品牌对应车系失败");
}
return RopResponse.success(response.getResult());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!