Commit a1d05f46 by zhiwj

代码结构调整

parent 79e3025b
......@@ -17,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
*
......@@ -160,7 +162,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return EnterpriseServiceResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
List<StoreDTO> list = serviceResponse.getResult().getResult();
List<Integer> brandIdList = new ArrayList<>();
Set<Integer> brandIdList = new HashSet<>();
List<StoreBrandDTO> brandList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
for (StoreDTO storeDTO : list) {
......@@ -168,7 +170,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
brandIdList.addAll(storeDTO.getStoreBrandIdList());
}
}
List<TabStoreBrand> tabStoreBrands = storeBrandService.listStoreBrandByIds(brandIdList);
List<TabStoreBrand> tabStoreBrands = storeBrandService.listStoreBrandByIds(new ArrayList<>(brandIdList));
brandList = EntityUtil.changeEntityListByJSON(StoreBrandDTO.class, tabStoreBrands);
}
return EnterpriseServiceResponse.success(brandList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment