Browse Source

Merge branch 'fix-323' of https://git.openi.org.cn/OpenI/aiforge into fix-323

tags/v1.22.4.1^2
zhoupzh 3 years ago
parent
commit
3198b1166a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      models/cloudbrain_image.go

+ 2
- 2
models/cloudbrain_image.go View File

@@ -352,7 +352,7 @@ func SearchImageCondition(opts *SearchImageOptions) builder.Cond {

}
subQuery := builder.Select("image_topic_relation.image_id").From("image_topic_relation").
Join("INNER", "image_topic", "image_topic.id = image_topic_relation.image_id").
Join("INNER", "image_topic", "image_topic.id = image_topic_relation.topic_id").
Where(subQueryCond).
GroupBy("image_topic_relation.image_id")
var keywordCond = builder.In("id", subQuery)
@@ -375,7 +375,7 @@ func SearchImageCondition(opts *SearchImageOptions) builder.Cond {

subQueryCond = subQueryCond.Or(builder.Eq{"LOWER(image_topic.name)": strings.ToLower(v)})
subQuery := builder.Select("image_topic_relation.image_id").From("image_topic_relation").
Join("INNER", "image_topic", "image_topic.id = image_topic_relation.image_id").
Join("INNER", "image_topic", "image_topic.id = image_topic_relation.topic_id").
Where(subQueryCond).
GroupBy("image_topic_relation.image_id")
var topicCond = builder.In("id", subQuery)


Loading…
Cancel
Save