- 增加https参数

- 修复bug "「资产」无法通过「资产标签」过滤" close #33
- 修复bug "切換授權使用者登錄後,進入資產列表後會有錯誤" close #53
This commit is contained in:
dushixiang
2021-02-12 16:50:38 +08:00
parent 7599c09191
commit 1b7dd820b3
6 changed files with 37 additions and 8 deletions

View File

@ -111,8 +111,13 @@ func FindPageAsset(pageIndex, pageSize int, name, protocol, tags string, account
if len(tags) > 0 {
tagArr := strings.Split(tags, ",")
for i := range tagArr {
db = db.Where("find_in_set(?, assets.tags)", tagArr[i])
dbCounter = dbCounter.Where("find_in_set(?, assets.tags)", tagArr[i])
if global.Config.DB == "sqlite" {
db = db.Where("(',' || assets.tags || ',') LIKE ?", "%,"+tagArr[i]+",%")
dbCounter = dbCounter.Where("(',' || assets.tags || ',') LIKE ?", "%,"+tagArr[i]+",%")
} else {
db = db.Where("find_in_set(?, assets.tags)", tagArr[i])
dbCounter = dbCounter.Where("find_in_set(?, assets.tags)", tagArr[i])
}
}
}