|
|
@@ -407,7 +407,7 @@ func QueryUserStaticDataAll(opts *UserBusinessAnalysisQueryOptions) ([]*UserBusi |
|
|
|
return userBusinessAnalysisReturnList, allCount |
|
|
|
} |
|
|
|
|
|
|
|
func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wikiCountMap map[string]int) ([]UserBusinessAnalysis, int64) { |
|
|
|
func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wikiCountMap map[string]int) ([]*UserBusinessAnalysis, int64) { |
|
|
|
log.Info("start to count other user info data") |
|
|
|
sess := x.NewSession() |
|
|
|
defer sess.Close() |
|
|
@@ -453,11 +453,11 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi |
|
|
|
statictisSess := xStatistic.NewSession() |
|
|
|
defer statictisSess.Close() |
|
|
|
|
|
|
|
cond := "type != 1 and and is_active=true" |
|
|
|
cond := "type != 1 and is_active=true" |
|
|
|
count, err := sess.Where(cond).Count(new(User)) |
|
|
|
|
|
|
|
ParaWeight := getParaWeight() |
|
|
|
ResultList := make([]UserBusinessAnalysis, 0) |
|
|
|
ResultList := make([]*UserBusinessAnalysis, 0) |
|
|
|
var indexTotal int64 |
|
|
|
indexTotal = 0 |
|
|
|
for { |
|
|
@@ -523,7 +523,7 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi |
|
|
|
dateRecord.RecommendImage = getMapValue(dateRecord.ID, RecommendImage) |
|
|
|
|
|
|
|
dateRecord.UserIndexPrimitive = getUserIndex(dateRecord, ParaWeight) |
|
|
|
ResultList = append(ResultList, dateRecord) |
|
|
|
ResultList = append(ResultList, &dateRecord) |
|
|
|
} |
|
|
|
|
|
|
|
indexTotal += PAGE_SIZE |
|
|
|