Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.3.2^2
zouap 4 years ago
parent
commit
a6d86f0544
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      routers/search.go

+ 3
- 1
routers/search.go View File

@@ -772,7 +772,7 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P
resultObj.PrivateTotal = count
issuesSize := len(issues)
if issuesSize > 0 {
log.Info("Query private repo issue number is:" + fmt.Sprint(issuesSize))
log.Info("Query private repo issue number is:" + fmt.Sprint(issuesSize) + " count=" + fmt.Sprint(count))
makePrivateIssueOrPr(issues, resultObj, Key)
} else {
log.Info("not found private repo issue,keyword=" + Key)
@@ -814,7 +814,9 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P
searchJson, _ := json.Marshal(res)
log.Info("searchJson=" + string(searchJson))
esresult := makeIssueResult(res, Key, OnlyReturnNum)

resultObj.Total = resultObj.PrivateTotal + esresult.Total
log.Info("query issue es count=" + fmt.Sprint(esresult.Total) + " total=" + fmt.Sprint(resultObj.Total))
resultObj.Result = append(resultObj.Result, esresult.Result...)
ctx.JSON(200, resultObj)
} else {


Loading…
Cancel
Save