|
@@ -49,10 +49,7 @@ public class TbItemTypeService extends ServiceImpl<TbItemTypeMapper, TbItemType>
|
|
|
* 查
|
|
|
*/
|
|
|
TbItemType getById(String id) {
|
|
|
- TbItemType itemType = super.getById(id);
|
|
|
- List<TbItem> tbItems = tbItemService.findByItemTypeId(id);
|
|
|
- itemType.setItems(tbItems);
|
|
|
- return itemType;
|
|
|
+ return super.getById(id);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -65,11 +62,8 @@ public class TbItemTypeService extends ServiceImpl<TbItemTypeMapper, TbItemType>
|
|
|
|
|
|
public TbItemType getItemTypeById(String id) {
|
|
|
TbItemType tbItemType = super.getById(id);
|
|
|
- List<RelationTypeItem> relationTypeItems = relationTypeItemService.findByTypeId(id);
|
|
|
- List<String> itemIss = relationTypeItems.stream().map(RelationTypeItem::getItemId).collect(Collectors.toList());
|
|
|
- if (!itemIss.isEmpty()){
|
|
|
- tbItemType.setItems(tbItemService.listByIds(itemIss));
|
|
|
- }
|
|
|
+ List<TbItem>items= tbItemService.getItemTypeById(id);
|
|
|
+ tbItemType.setItems(items);
|
|
|
return tbItemType;
|
|
|
}
|
|
|
}
|