|
@@ -93,7 +93,34 @@ func GetReportPermission(userId int, classifyNameSecond string) (count int, err
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func GetReportById(reportId int) (item *Report, err error) {
|
|
|
+type ReportDetail 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 string `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:"内容前两个章节"`
|
|
|
+ IsShowNewLabel int `description:"是否显示新标签"`
|
|
|
+ IsCurrentDate int `description:"是否当前日期"`
|
|
|
+ ClassifyName string `description:"分类名称"`
|
|
|
+}
|
|
|
+
|
|
|
+func GetReportById(reportId int) (item *ReportDetail, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
o.Using("rddp")
|
|
|
sql := `SELECT * FROM report WHERE id=?`
|
|
@@ -119,7 +146,7 @@ func GetReportVarietyListByUserIdExt(userId int, reportType string) (list []*Rep
|
|
|
}
|
|
|
|
|
|
type ReportDetailResp struct {
|
|
|
- Report *Report `description:"报告"`
|
|
|
+ Report *ReportDetail `description:"报告"`
|
|
|
RecommendList []*RecommendReport `description:"推荐报告列表"`
|
|
|
Status int `description:"状态:0:正常展示,1:报告不存在,2:无权限"`
|
|
|
Msg string `description:"提示信息"`
|
|
@@ -172,5 +199,5 @@ func GetReportByCode(reportCode string) (item *Report, err error) {
|
|
|
}
|
|
|
|
|
|
type ReportShareDetailResp struct {
|
|
|
- Report *Report `description:"报告"`
|
|
|
-}
|
|
|
+ Report *Report `description:"报告"`
|
|
|
+}
|