|
@@ -151,7 +151,7 @@ type ReportShareDetailResp struct {
|
|
|
}
|
|
|
|
|
|
type ReportItem struct {
|
|
|
- *Report
|
|
|
+ *ReportShow
|
|
|
ChapterList []*ReportChapter
|
|
|
}
|
|
|
|
|
@@ -342,3 +342,131 @@ func (m *Report) EditReportAndClearGrant(reportItem *Report, updateCols []string
|
|
|
}
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+type ReportShow struct {
|
|
|
+ Id int `gorm:"column:id;primaryKey;autoIncrement" description:"报告Id"`
|
|
|
+ AddType int `gorm:"column:add_type" description:"新增方式:1:新增报告,2:继承报告"`
|
|
|
+ ClassifyIdFirst int `gorm:"column:classify_id_first" description:"一级分类id"`
|
|
|
+ ClassifyNameFirst string `gorm:"column:classify_name_first" description:"一级分类名称"`
|
|
|
+ ClassifyIdSecond int `gorm:"column:classify_id_second" description:"二级分类id"`
|
|
|
+ ClassifyNameSecond string `gorm:"column:classify_name_second" description:"二级分类名称"`
|
|
|
+ Title string `gorm:"column:title" description:"标题"`
|
|
|
+ Abstract string `gorm:"column:abstract" description:"摘要"`
|
|
|
+ Author string `gorm:"column:author" description:"作者"`
|
|
|
+ Frequency string `gorm:"column:frequency" description:"频度"`
|
|
|
+ CreateTime string `gorm:"column:create_time" description:"创建时间"`
|
|
|
+ ModifyTime string `gorm:"column:modify_time;autoUpdateTime" description:"修改时间"`
|
|
|
+ State int `gorm:"column:state" description:"1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过"`
|
|
|
+ PublishTime string `gorm:"column:publish_time" description:"发布时间"`
|
|
|
+ Stage int `gorm:"column:stage" description:"期数"`
|
|
|
+ MsgIsSend int `gorm:"column:msg_is_send" description:"消息是否已发送,0:否,1:是"`
|
|
|
+ ThsMsgIsSend int `gorm:"column:ths_msg_is_send" description:"客户群消息是否已发送,0:否,1:是"`
|
|
|
+ Content string `gorm:"column:content" description:"内容"`
|
|
|
+ VideoUrl string `gorm:"column:video_url" description:"音频文件URL"`
|
|
|
+ VideoName string `gorm:"column:video_name" description:"音频文件名称"`
|
|
|
+ VideoPlaySeconds string `gorm:"column:video_play_seconds" description:"音频播放时长"`
|
|
|
+ VideoSize string `gorm:"column:video_size" description:"音频文件大小,单位M"`
|
|
|
+ ContentSub string `gorm:"column:content_sub" description:"内容前两个章节"`
|
|
|
+ ReportCode string `gorm:"column:report_code" description:"报告唯一编码"`
|
|
|
+ ReportVersion int `gorm:"column:report_version" description:"1:旧版,2:新版"`
|
|
|
+ HasChapter int `gorm:"column:has_chapter" description:"是否有章节 0-否 1-是"`
|
|
|
+ ChapterType string `gorm:"column:chapter_type" description:"章节类型 day-晨报 week-周报"`
|
|
|
+ OldReportId int `gorm:"column:old_report_id" description:"research_report表ID, 大于0则表示该报告为老后台同步过来的"`
|
|
|
+ MsgSendTime string `gorm:"column:msg_send_time" description:"模版消息发送时间"`
|
|
|
+ AdminId int `gorm:"column:admin_id" description:"创建者账号"`
|
|
|
+ AdminRealName string `gorm:"column:admin_real_name" description:"创建者姓名"`
|
|
|
+ ApproveTime string `gorm:"column:approve_time" description:"审批时间"`
|
|
|
+ ApproveId int `gorm:"column:approve_id" description:"审批ID"`
|
|
|
+ DetailImgUrl string `gorm:"column:detail_img_url" description:"报告详情长图地址"`
|
|
|
+ DetailPdfUrl string `gorm:"column:detail_pdf_url" description:"报告详情PDF地址"`
|
|
|
+ ContentStruct string `gorm:"column:content_struct" description:"内容组件"`
|
|
|
+ LastModifyAdminId int `gorm:"column:last_modify_admin_id" description:"最后更新人ID"`
|
|
|
+ LastModifyAdminName string `gorm:"column:last_modify_admin_name" description:"最后更新人姓名"`
|
|
|
+ ContentModifyTime string `gorm:"column:content_modify_time" description:"内容更新时间"`
|
|
|
+ Pv int `gorm:"column:pv" description:"pv"`
|
|
|
+ Uv int `gorm:"column:uv" description:"uv"`
|
|
|
+ HeadImg string `gorm:"column:head_img" description:"报告头图地址"`
|
|
|
+ EndImg string `gorm:"column:end_img" description:"报告尾图地址"`
|
|
|
+ CanvasColor string `gorm:"column:canvas_color" description:"画布颜色"`
|
|
|
+ NeedSplice int `gorm:"column:need_splice" description:"是否拼接版头版位的标记,主要是为了兼容历史报告。0-不需要 1-需要"`
|
|
|
+ HeadResourceId int `gorm:"column:head_resource_id" description:"版头资源ID"`
|
|
|
+ EndResourceId int `gorm:"column:end_resource_id" description:"版尾资源ID"`
|
|
|
+ ClassifyIdThird int `gorm:"column:classify_id_third" description:"三级分类id"`
|
|
|
+ ClassifyNameThird string `gorm:"column:classify_name_third" description:"三级分类名称"`
|
|
|
+ CollaborateType int `gorm:"column:collaborate_type" description:"协作方式,1:个人,2:多人协作。默认:1"`
|
|
|
+ ReportLayout int `gorm:"column:report_layout" description:"报告布局,1:常规布局,2:智能布局。默认:1"`
|
|
|
+ IsPublicPublish int `gorm:"column:is_public_publish" description:"是否公开发布,1:是,2:否"`
|
|
|
+ ReportCreateTime string `gorm:"column:report_create_time" description:"报告时间创建时间"`
|
|
|
+ InheritReportId int `gorm:"column:inherit_report_id" description:"待继承的报告ID"`
|
|
|
+ VoiceGenerateType int `gorm:"column:voice_generate_type" description:"音频生成方式,0:系统生成,1:人工上传"`
|
|
|
+ ReportSource int `gorm:"column:report_source" description:"报告来源:1-系统内;2-智力共享"`
|
|
|
+ OutReportId string `gorm:"column:out_report_id" description:"外部报告ID(或编码)"`
|
|
|
+ TopicEndTime string `gorm:"column:topic_end_time" description:"课题结束时间"`
|
|
|
+ HeadStyle string `gorm:"-"`
|
|
|
+ EndStyle string `gorm:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Report) Format2Item() (item *ReportShow) {
|
|
|
+ if m == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ item = new(ReportShow)
|
|
|
+ item.Id = m.Id
|
|
|
+ item.AddType = m.AddType
|
|
|
+ item.ClassifyIdFirst = m.ClassifyIdFirst
|
|
|
+ item.ClassifyNameFirst = m.ClassifyNameFirst
|
|
|
+ item.ClassifyIdSecond = m.ClassifyIdSecond
|
|
|
+ item.ClassifyNameSecond = m.ClassifyNameSecond
|
|
|
+ item.Title = m.Title
|
|
|
+ item.Abstract = m.Abstract
|
|
|
+ item.Author = m.Author
|
|
|
+ item.Frequency = m.Frequency
|
|
|
+ item.CreateTime = utils.TimeTransferString(utils.FormatDateTime, m.CreateTime)
|
|
|
+ item.ModifyTime = utils.TimeTransferString(utils.FormatDateTime, m.ModifyTime)
|
|
|
+ item.State = m.State
|
|
|
+ item.PublishTime = utils.TimeTransferString(utils.FormatDateTime, m.PublishTime)
|
|
|
+ item.Stage = m.Stage
|
|
|
+ item.MsgIsSend = m.MsgIsSend
|
|
|
+ item.ThsMsgIsSend = m.ThsMsgIsSend
|
|
|
+ item.Content = m.Content
|
|
|
+ item.VideoUrl = m.VideoUrl
|
|
|
+ item.VideoName = m.VideoName
|
|
|
+ item.VideoPlaySeconds = m.VideoPlaySeconds
|
|
|
+ item.VideoSize = m.VideoSize
|
|
|
+ item.ContentSub = m.ContentSub
|
|
|
+ item.ReportCode = m.ReportCode
|
|
|
+ item.ReportVersion = m.ReportVersion
|
|
|
+ item.HasChapter = m.HasChapter
|
|
|
+ item.ChapterType = m.ChapterType
|
|
|
+ item.MsgSendTime = utils.TimeTransferString(utils.FormatDateTime, m.MsgSendTime)
|
|
|
+ item.AdminId = m.AdminId
|
|
|
+ item.AdminRealName = m.AdminRealName
|
|
|
+ item.ApproveTime = utils.TimeTransferString(utils.FormatDateTime, m.ApproveTime)
|
|
|
+ item.ApproveId = m.ApproveId
|
|
|
+ item.DetailImgUrl = m.DetailImgUrl
|
|
|
+ item.DetailPdfUrl = m.DetailPdfUrl
|
|
|
+ item.ContentStruct = m.ContentStruct
|
|
|
+ item.LastModifyAdminId = m.LastModifyAdminId
|
|
|
+ item.LastModifyAdminName = m.LastModifyAdminName
|
|
|
+ item.ContentModifyTime = utils.TimeTransferString(utils.FormatDateTime, m.ContentModifyTime)
|
|
|
+ item.HeadImg = m.HeadImg
|
|
|
+ item.EndImg = m.EndImg
|
|
|
+ item.CanvasColor = m.CanvasColor
|
|
|
+ item.NeedSplice = m.NeedSplice
|
|
|
+ item.HeadResourceId = m.HeadResourceId
|
|
|
+ item.EndResourceId = m.EndResourceId
|
|
|
+ item.ClassifyIdThird = m.ClassifyIdThird
|
|
|
+ item.ClassifyNameThird = m.ClassifyNameThird
|
|
|
+ item.CollaborateType = m.CollaborateType
|
|
|
+ item.ReportLayout = m.ReportLayout
|
|
|
+ item.IsPublicPublish = m.IsPublicPublish
|
|
|
+ item.ReportCreateTime = utils.TimeTransferString(utils.FormatDateTime, m.ReportCreateTime)
|
|
|
+ item.InheritReportId = m.InheritReportId
|
|
|
+ item.VoiceGenerateType = m.VoiceGenerateType
|
|
|
+ item.ReportSource = m.ReportSource
|
|
|
+ item.OutReportId = m.OutReportId
|
|
|
+ item.TopicEndTime = utils.TimeTransferString(utils.FormatDateTime, m.TopicEndTime)
|
|
|
+ item.HeadStyle = m.HeadStyle
|
|
|
+ item.EndStyle = m.EndStyle
|
|
|
+ return
|
|
|
+}
|