|
|
|
@@ -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() |
|
|
|
@@ -457,7 +457,7 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi |
|
|
|
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 |
|
|
|
@@ -531,7 +531,7 @@ func QueryUserStaticDataForUserDefine(opts *UserBusinessAnalysisQueryOptions, wi |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
log.Info("query user define,count=" + fmt.Sprint((ResultList))) |
|
|
|
return ResultList, int64(len(ResultList)) |
|
|
|
} |
|
|
|
|
|
|
|
|