|
@@ -2,6 +2,7 @@ package controllers
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"hongze/hongze_cygx/models"
|
|
|
"hongze/hongze_cygx/services"
|
|
@@ -88,6 +89,7 @@ func (this *ChartController) Collection() {
|
|
|
var listCollection []*models.HomeChartListResp
|
|
|
var total int
|
|
|
//var err error
|
|
|
+ fmt.Println(user)
|
|
|
chartUserTokenByMobile, _ := services.GetUserTokenByMobile(mobile)
|
|
|
if chartUserTokenByMobile != "" {
|
|
|
list, err, _ := services.GetChartCollectionByApi(mobile, 9999, 0)
|
|
@@ -96,6 +98,7 @@ func (this *ChartController) Collection() {
|
|
|
br.ErrMsg = "获取图表分类失败 Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ fmt.Println(len(list))
|
|
|
var chartIds string
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
@@ -109,7 +112,7 @@ func (this *ChartController) Collection() {
|
|
|
chartIds = "0"
|
|
|
}
|
|
|
condition = ` AND a.chart_id IN (` + chartIds + `) `
|
|
|
- total, err = models.GetChartCount(condition, pars)
|
|
|
+ total, err = models.GetChartCollentCount(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.Msg = "获取帖子总数失败,Err:" + err.Error()
|