Roc 2 年之前
父节点
当前提交
e2fd6c4bca
共有 3 个文件被更改,包括 8 次插入8 次删除
  1. 4 4
      logic/report.go
  2. 2 2
      models/tables/rddp/classify/classify.go
  3. 2 2
      models/tables/rddp/report/report.go

+ 4 - 4
logic/report.go

@@ -99,10 +99,10 @@ func GetReportList(classifyId int, mobile, keyword string, startSize, pageSize i
 	timeUnix := strconv.FormatInt(time.Now().Unix(), 10)
 
 	for _, v := range list {
-		if v.Stage > 0 {
-			v.Title = fmt.Sprintf("【第%d期】%s", v.Stage, v.Title)
-		}
-		v.Title = fmt.Sprintf("%s(%s)", v.Title, v.CreateTime.Format(utils.FormatMonthDate))
+		//if v.Stage > 0 {
+		//	v.Title = fmt.Sprintf("【第%d期】%s", v.Stage, v.Title)
+		//}
+		//v.Title = fmt.Sprintf("%s(%s)", v.Title, v.CreateTime.Format(utils.FormatMonthDate))
 
 		//跳转地址
 		postData := make(map[string]string)

+ 2 - 2
models/tables/rddp/classify/classify.go

@@ -38,9 +38,9 @@ type Classify struct {
 type ClassifyList struct {
 	Id           int    `orm:"column(id);pk"`
 	ClassifyName string `description:"分类名称"`
-	Sort         int    `description:"排序"`
+	Sort         int    `description:"排序" json:"-"`
 	ParentId     int    `description:"父级分类id"`
-	ShowType     int    `description:"展示类型:1-列表 2-专栏"`
+	ShowType     int    `description:"展示类型:1-列表 2-专栏" json:"-"`
 	Child        []*ClassifyList
 }
 

+ 2 - 2
models/tables/rddp/report/report.go

@@ -40,7 +40,7 @@ type ReportList struct {
 	Id         int       `description:"报告Id"`
 	Title      string    `description:"标题"`
 	Author     string    `description:"作者"`
-	Stage      int       `description:"期数" json:"-"`
+	Stage      int       `description:"期数" json:"stage"`
 	CreateTime time.Time `description:"创建时间" json:"create_time"`
 	HttpUrl    string    `description:"跳转地址" json:"http_url"`
 }
@@ -57,7 +57,7 @@ func GetReportList(condition string, pars []interface{}, startSize, pageSize int
 		sql += condition
 	}
 
-	err = o.Raw(totalSql, pars).QueryRow(&totalSql)
+	err = o.Raw(totalSql, pars).QueryRow(&total)
 	if err != nil {
 		return
 	}