|
@@ -66,11 +66,15 @@ public class ComponentGoodsServiceImpl implements ComponentGoodsService {
|
|
|
}
|
|
}
|
|
|
searchResult = searchService.getComponentIds(code, pageParams);
|
|
searchResult = searchService.getComponentIds(code, pageParams);
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
- List<Long> componentIds = (List<Long>) searchResult.get("componentIds");
|
|
|
|
|
|
|
+ List<Integer> componentIds = (List<Integer>) searchResult.get("componentIds");
|
|
|
|
|
+ List<Long> componentIdsLong = new ArrayList<>();
|
|
|
|
|
+ for (Integer cid:componentIds) {
|
|
|
|
|
+ componentIdsLong.add(cid.longValue());
|
|
|
|
|
+ }
|
|
|
List<ComponentGoods> componentGoods = new ArrayList<>();
|
|
List<ComponentGoods> componentGoods = new ArrayList<>();
|
|
|
if (componentIds.size() > 0) {
|
|
if (componentIds.size() > 0) {
|
|
|
- Long[] idArr = new Long[componentIds.size()];
|
|
|
|
|
- componentGoods = componentGoodsDao.findByIdsInOrder(componentIds.toArray(idArr));
|
|
|
|
|
|
|
+ Long[] idArr = new Long[componentIdsLong.size()];
|
|
|
|
|
+ componentGoods = componentGoodsDao.findByIdsInOrder(componentIdsLong.toArray(idArr));
|
|
|
}
|
|
}
|
|
|
int length = (int)searchResult.get("total");
|
|
int length = (int)searchResult.get("total");
|
|
|
if(length < componentGoods.size()) {
|
|
if(length < componentGoods.size()) {
|