|
@@ -636,11 +636,7 @@ func SqlComprehensiveSearch(user *models.WxUserItem, keyWord string, startSize,
|
|
|
var searchTotal int
|
|
|
searchTotal = (startSize/pageSize + 1) * pageSize
|
|
|
var list []*models.CygxResourceData
|
|
|
- fmt.Println("totalTitle", totalTitle)
|
|
|
- fmt.Println("totalContent", totalContent)
|
|
|
- fmt.Println(searchTotal)
|
|
|
if totalTitle >= searchTotal {
|
|
|
- fmt.Println("1")
|
|
|
//全部都是标题搜索
|
|
|
list, e = models.GetResourceDataAndYanxuanSpecialAuthorListCondition(conditionTitle, parsTitle, conditionContentYxAuthor, parsContentYxAuthor, startSize, pageSize)
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|
|
@@ -648,7 +644,6 @@ func SqlComprehensiveSearch(user *models.WxUserItem, keyWord string, startSize,
|
|
|
return
|
|
|
}
|
|
|
} else if totalTitle <= searchTotal-pageSize {
|
|
|
- fmt.Println("2")
|
|
|
//全部都是内容搜索
|
|
|
startSize = startSize - totalTitle
|
|
|
|
|
@@ -658,7 +653,6 @@ func SqlComprehensiveSearch(user *models.WxUserItem, keyWord string, startSize,
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
- fmt.Println("3")
|
|
|
//一半标题搜索,一半内容搜索
|
|
|
|
|
|
//list, e = models.GetResourceDataListCondition(conditionTitle, parsTitle, startSize, pageSize)
|