Browse Source

Merge pull request 'fix-1694' (#1695) from fix-1694 into V20220328

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1695
Reviewed-by: lewis <747342561@qq.com>
tags/v1.22.3.2^2
lewis 3 years ago
parent
commit
798d9697d3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/cloudbrain.go

+ 1
- 1
models/cloudbrain.go View File

@@ -1117,7 +1117,7 @@ func Cloudbrains(opts *CloudbrainsOptions) ([]*CloudbrainInfo, int64, error) {
} else { } else {
lowerKeyWord := strings.ToLower(opts.Keyword) lowerKeyWord := strings.ToLower(opts.Keyword)


cond = cond.And(builder.Or(builder.Like{"LOWER(cloudbrain.job_name)", lowerKeyWord}, builder.Like{"`user`.lower_name", lowerKeyWord}))
cond = cond.And(builder.Or(builder.Like{"LOWER(cloudbrain.job_name)", lowerKeyWord}, builder.Like{"LOWER(cloudbrain.display_job_name)", lowerKeyWord}, builder.Like{"`user`.lower_name", lowerKeyWord}))
count, err = sess.Table(&Cloudbrain{}).Where(cond). count, err = sess.Table(&Cloudbrain{}).Where(cond).
Join("left", "`user`", condition).Count(new(CloudbrainInfo)) Join("left", "`user`", condition).Count(new(CloudbrainInfo))




Loading…
Cancel
Save