提交 31441b76 authored 作者: Whispa's avatar Whispa

commit

上级 44204363
......@@ -81,8 +81,9 @@ public class ImageSearchController extends Controller {
String img = strings.length > 0 ? strings[0] : itemImg;
if( img != null) {
List<ItemLabel> itemLabels = getItemLabels(img);
//stationItem.setLabelList(itemLabels);
// repository.save(stationItem);
itemLabels.forEach(v->v.setItem(stationItem));
stationItem.setLabelList(itemLabels);
repository.save(stationItem);
return new Result<>(itemLabels);
}
}
......
......@@ -35,4 +35,9 @@ public class ItemLabel extends Model {
public String getDescription() {
return description;
}
public void setItem(TbCfStationItem item) {
this.item = item;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论