|
@@ -152,12 +152,15 @@ func UpdateImage(c *gin.Context, apictx *ApiSession) (interface{}, error) {
|
|
RomoveFassiImage(matImage.Id.Hex())
|
|
RomoveFassiImage(matImage.Id.Hex())
|
|
|
|
|
|
// 再新增
|
|
// 再新增
|
|
- err = AddFassiImage(matImage.Id, matImage.RawImage.Url)
|
|
|
|
- if err != nil {
|
|
|
|
- fmt.Println("更新时添加fassi image 错误:", err)
|
|
|
|
- return nil, errors.New("更新图片搜索特征错误,请重试!")
|
|
|
|
|
|
+ if len(matImage.RawImage.Url) > 0 {
|
|
|
|
+ err = AddFassiImage(matImage.Id, matImage.RawImage.Url)
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println("更新时添加fassi image 错误:", err)
|
|
|
|
+ return nil, errors.New("更新图片搜索特征错误,请重试!")
|
|
|
|
+ }
|
|
|
|
+ fmt.Println("AddFassiImage ", matImage.Id.Hex(), err)
|
|
}
|
|
}
|
|
- fmt.Println("更新fassi image ", matImage.Id.Hex(), err)
|
|
|
|
|
|
+ fmt.Println("更新fassi image ", matImage.Id.Hex())
|
|
}
|
|
}
|
|
fmt.Println("33333")
|
|
fmt.Println("33333")
|
|
return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionMatImages, matImage.Id.Hex(), &matImage)
|
|
return repo.RepoUpdateSetDoc(apictx.CreateRepoCtx(), repo.CollectionMatImages, matImage.Id.Hex(), &matImage)
|