|
@@ -411,13 +411,16 @@ func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail respons
|
|
|
var permissionCheckInfo response.PermissionCheckInfo
|
|
|
//var vaildWeekTypeIds []int
|
|
|
var reportChapterIdList []int
|
|
|
- if reportInfo.ClassifyNameFirst == "晨报" {
|
|
|
- authOk, permissionCheckInfo, err = CheckDayReportPermission(userinfo, productAuthOk)
|
|
|
- } else if reportInfo.ClassifyNameFirst == "周报" {
|
|
|
- authOk, permissionCheckInfo, _, reportChapterIdList, err = CheckWeekReportPermission(userinfo, reportId, productAuthOk)
|
|
|
+ if reportInfo.HasChapter == 1 {
|
|
|
+ if reportInfo.ClassifyNameFirst == "晨报" {
|
|
|
+ authOk, permissionCheckInfo, err = CheckDayReportPermission(userinfo, productAuthOk)
|
|
|
+ } else {
|
|
|
+ authOk, permissionCheckInfo, _, reportChapterIdList, err = CheckWeekReportPermission(userinfo, reportId, productAuthOk)
|
|
|
+ }
|
|
|
} else {
|
|
|
authOk, permissionCheckInfo, err = CheckReportPermission(userinfo, reportId, productAuthOk)
|
|
|
}
|
|
|
+
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
@@ -870,6 +873,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
temp.ClassifyNameFirst = reportItem.ClassifyNameFirst
|
|
|
temp.ClassifyIdSecond = reportItem.ClassifyIdSecond
|
|
|
temp.ClassifyNameSecond = reportItem.ClassifyNameSecond
|
|
|
+ temp.ClassifyIdThird = reportItem.ClassifyIdThird
|
|
|
+ temp.ClassifyNameThird = reportItem.ClassifyNameThird
|
|
|
if len(v.Highlight["ClassifyNameSecond"]) > 0 {
|
|
|
temp.ClassifyNameSecond = v.Highlight["ClassifyNameSecond"][0]
|
|
|
}
|
|
@@ -970,6 +975,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
reportItem.ClassifyNameSecond = classifyNameMap[reportInfo.ClassifyIdSecond]
|
|
|
reportItem.ClassifyIdFirst = reportInfo.ClassifyIdFirst
|
|
|
reportItem.ClassifyIdSecond = reportInfo.ClassifyIdSecond
|
|
|
+ reportItem.ClassifyIdThird = reportInfo.ClassifyIdThird
|
|
|
+ reportItem.ClassifyIdThird = reportInfo.ClassifyIdThird
|
|
|
reportItem.Stage = reportInfo.Stage
|
|
|
reportItem.Abstract = reportInfo.Abstract
|
|
|
if reportInfo.Abstract != "" {
|
|
@@ -981,6 +988,9 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
stageStr = strconv.Itoa(reportInfo.Stage)
|
|
|
}
|
|
|
reportItem.TitleInfo = fmt.Sprintf("【第%s期|FICC|%s】", stageStr, reportItem.ClassifyNameSecond)
|
|
|
+ if reportItem.ClassifyNameSecond != `` {
|
|
|
+ reportItem.TitleInfo = fmt.Sprintf("%s|%s】", reportItem.TitleInfo, reportItem.ClassifyNameThird)
|
|
|
+ }
|
|
|
//trimClassifyNameSecond := utils.TrimHtml(reportInfo.ClassifyNameSecond)
|
|
|
if reportItem.ClassifyNameFirst == "晨报" || reportItem.ClassifyNameFirst == "周报" || classifyIdSecond > 0 {
|
|
|
//reportItem.ReportImgUrl = utils.ALIYUN_YBIMG_HOST + reportImgUrl
|