预览展示
代码展示
@startuml
autonumber
actor "用户" as User
box "crm" #LightBlue
participant WxAdaptionSpuController
participant AdaptionSpuConsumerManager
participant AdaptionSpuConsumerService
end box
box "beetle" #LightGrey
participant AdaptionInfoReadFacade
participant AdaptionSpuConvert
end box
box "prado" #LightSalmon
participant GoodsAdaptionService
participant GoodsInfoConsumerApi
end box
box "goods" #LightGreen
participant SpuCategoryApi
participant SpuApi
end box
User -> WxAdaptionSpuController ++: /carowner/mall/spu/adaption/list\n/carowner/mall/spu/adaption/replace
activate User
WxAdaptionSpuController -> AdaptionSpuConsumerManager ++: getSpuList
AdaptionSpuConsumerManager -> AdaptionSpuConsumerService ++: getSpuList
AdaptionSpuConsumerService -> AdaptionInfoReadFacade ++: queryAdaptionPartInfo
note left of AdaptionInfoReadFacade : 根据车型、车辆分类、门店和保养项目明细\n查询具体材料InfoID
AdaptionInfoReadFacade -> AdaptionSpuConsumerService --: List<AdaptionPartInfo>
AdaptionSpuConsumerService -> AdaptionSpuConvert ++: convert
group foreach [CarCategoryPirceList]
group if [AdaptionCarCategoryPriceInfo.carCategoryId.equals(carCatrgoryId)]
AdaptionSpuConvert -> AdaptionSpuConvert : convert
else !AdaptionCarCategoryPriceInfo.carCategoryId.equals(carCatrgoryId)
AdaptionSpuConvert -> AdaptionSpuConvert : removeItem
end
end
AdaptionSpuConvert -> AdaptionSpuConsumerService --: List<AdaptionPartInfo>
AdaptionSpuConsumerService -> SpuCategoryApi ++: querySpuCategoryByNameBatch
note left of SpuCategoryApi : 根据导购适配名称查询商品分类ID
SpuCategoryApi -> AdaptionSpuConsumerService --: categoryId
AdaptionSpuConsumerService -> AdaptionSpuConsumerService : queryServiceSpuInfo
group if [CollectionUtils.isNotEmpty(ServiceInfoIdList)]
AdaptionSpuConsumerService -> AdaptionSpuConsumerService : queryAdaptionSpuInfo
else CollectionUtils.isEmpty(ServiceInfoIdList)
AdaptionSpuConsumerService -> AdaptionSpuConsumerService : return null;
end
AdaptionSpuConsumerService -> GoodsAdaptionService ++: queryAdaptionSpuInfo
GoodsAdaptionService -> SpuApi ++: getSpuInfoRelationByInfoIds 现有接口, 等商品新接口 , 分别查询项目和材料信息
note left of SpuApi : 根据 InfoIDList 等查询对应 spuId, spuName, spuType, img
SpuApi -> GoodsAdaptionService --:List<TmSpuInfoRelationVo>
GoodsAdaptionService -> GoodsInfoConsumerApi ++: queryAvailableGoodsInfoListSortBySellCount
note left of GoodsInfoConsumerApi : 根据 spuId 查询销量
GoodsInfoConsumerApi -> GoodsAdaptionService --: PageInfo<GoodsInfoSimpleResponse>
GoodsAdaptionService -> AdaptionSpuConsumerService --: PageInfo<GoodsInfoSimpleResponse>
AdaptionSpuConsumerService -> AdaptionSpuConsumerManager --: List<SpuInfo>
AdaptionSpuConsumerManager -> WxAdaptionSpuController --: List<SpuInfo>
WxAdaptionSpuController -> User --: ApiResultVO<List<SpuInfo>>
deactivate User
@enduml