|
@@ -119,11 +119,46 @@ func GetReportVarietyListByUserIdExt(userId int, reportType string) (list []*Rep
|
|
|
}
|
|
|
|
|
|
type ReportDetailResp struct {
|
|
|
- Report *Report `description:"报告"`
|
|
|
- Status int `description:"状态:0:正常展示,1:报告不存在,2:无权限"`
|
|
|
- Msg string `description:"提示信息"`
|
|
|
+ Report *Report `description:"报告"`
|
|
|
+ RecommendList []*RecommendReport `description:"推荐报告列表"`
|
|
|
+ Status int `description:"状态:0:正常展示,1:报告不存在,2:无权限"`
|
|
|
+ Msg string `description:"提示信息"`
|
|
|
}
|
|
|
|
|
|
type ReportRecordReq struct {
|
|
|
ReportId int `description:"报告Id"`
|
|
|
}
|
|
|
+
|
|
|
+type RecommendReport struct {
|
|
|
+ Id int `description:"报告Id"`
|
|
|
+ AddType int `description:"新增方式:1:新增报告,2:继承报告"`
|
|
|
+ ClassifyIdFirst int `description:"一级分类id"`
|
|
|
+ ClassifyNameFirst string `description:"一级分类名称"`
|
|
|
+ ClassifyIdSecond int `description:"二级分类id"`
|
|
|
+ ClassifyNameSecond string `description:"二级分类名称"`
|
|
|
+ Title string `description:"标题"`
|
|
|
+ Abstract string `description:"摘要"`
|
|
|
+ Author string `description:"作者"`
|
|
|
+ Frequency string `description:"频度"`
|
|
|
+ CreateTime string `description:"创建时间"`
|
|
|
+ ModifyTime time.Time `description:"修改时间"`
|
|
|
+ State int `description:"1:未发布,2:已发布"`
|
|
|
+ PublishTime string `description:"发布时间"`
|
|
|
+ Stage int `description:"期数"`
|
|
|
+ MsgIsSend int `description:"消息是否已发送,0:否,1:是"`
|
|
|
+ Content string `description:"内容"`
|
|
|
+ VideoUrl string `description:"音频文件URL"`
|
|
|
+ VideoName string `description:"音频文件名称"`
|
|
|
+ VideoPlaySeconds string `description:"音频播放时长"`
|
|
|
+ ContentSub string `description:"内容前两个章节"`
|
|
|
+ ClassifyName string `description:"分类名称"`
|
|
|
+ HasPermission int `description:"报告权限:0:无权限,1:有权限"`
|
|
|
+}
|
|
|
+
|
|
|
+func GetRecommendList(reportId int) (items []*RecommendReport, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ o.Using("rddp")
|
|
|
+ sql := `SELECT * FROM report WHERE id<>? ORDER BY publish_time DESC LIMIT 3`
|
|
|
+ _, err = o.Raw(sql, reportId).QueryRows(&items)
|
|
|
+ return
|
|
|
+}
|