Browse Source

Merge pull request '解决搜索样式被注释及用户指数从0--1扩展到0--100之间。' (#1942) from zouap_static into V20220415

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1942
Reviewed-by: lewis <747342561@qq.com>
tags/v1.22.4.1^2
lewis 4 years ago
parent
commit
060f526612
2 changed files with 8 additions and 5 deletions
  1. +4
    -1
      models/user_business_analysis.go
  2. +4
    -4
      web_src/less/openi.less

+ 4
- 1
models/user_business_analysis.go View File

@@ -535,13 +535,16 @@ func refreshUserStaticTable(wikiCountMap map[string]int, tableName string, pageS
//normalization
for k, v := range userIndexMap {
tmpResult := (v - minUserIndex) / (maxUserIndex - minUserIndex)
if tmpResult > 0.99 {
tmpResult = 0.99
}
updateUserIndex(tableName, statictisSess, k, tmpResult)
}
log.Info("refresh data finished.tableName=" + tableName + " total record:" + fmt.Sprint(insertCount))
}

func updateUserIndex(tableName string, statictisSess *xorm.Session, userId int64, userIndex float64) {
updateSql := "UPDATE public." + tableName + " set user_index=" + fmt.Sprint(userIndex) + " where id=" + fmt.Sprint(userId)
updateSql := "UPDATE public." + tableName + " set user_index=" + fmt.Sprint(userIndex*100) + " where id=" + fmt.Sprint(userId)
statictisSess.Exec(updateSql)
}



+ 4
- 4
web_src/less/openi.less View File

@@ -969,10 +969,10 @@ display: block;
color: red;
}

// .ui.list .list>.item>img.image+.content, .ui.list>.item>img.image+.content {
// width: calc(100% - 4.0em);
// margin-left: 0;
// }
.ui.list .list>.item>img.image+.content, .ui.list>.item>img.image+.content {
width: calc(100% - 4.0em);
margin-left: 0;
}
.seach .ui.list .list>.item .header, .seach .ui.list>.item .header{
margin-bottom: 0.5em;


Loading…
Cancel
Save