@@ -2007,6 +2007,10 @@ func (this *ReportController) ShareGenerate() {
br.ErrMsg = "参数解析失败, Err: " + e.Error()
return
}
+ reportItem, _ := models.GetReportByReportId(req.ReportId)
+ if reportItem != nil && reportItem.Title != "" {
+ req.Title = reportItem.Title
+ }
link, err := services.GetReportShareUrlToken(req, this.SysUser.AdminId)
if err != nil || link == "" {
@@ -1908,6 +1908,7 @@ b.abstract,b.admin_id,b.admin_real_name,b.last_modify_admin_id,b.last_modify_adm
type ReportShartUrlReq struct {
Url string `description:"分享链接"`
ReportId int `description:"报告ID"`
+ Title string `description:"报告标题"`
type ReportShartUrlResp struct {
@@ -1558,6 +1558,8 @@ func GetReportShareUrlToken(req models.ReportShartUrlReq, adminId int) (linkToke
hashUrl := utils.MurmurHash64([]byte(linkToken))
linkToken = utils.ConvertNumToBase62(hashUrl)
+ // 拼上报告标题
+ linkToken = fmt.Sprintf("%s %s", linkToken, req.Title)
ok = utils.Rc.IsExist(utils.CACHE_REPORT_SHARE_ORIGIN_Url + linkToken)
if !ok {