Browse Source

Merge remote-tracking branch 'origin/eta/1.8.3' into debug

Roc 8 months ago
parent
commit
2b87ad6872

+ 0 - 2
models/response/report.go

@@ -191,8 +191,6 @@ type EsReportItem struct {
 	ClassifyNameFirst  string `description:"一级分类名称"`
 	ClassifyIdSecond   int    `description:"二级分类id"`
 	ClassifyNameSecond string `description:"二级分类名称"`
-	ClassifyIdThird    int    `description:"三级分类id"`
-	ClassifyNameThird  string `description:"三级分类名称"`
 	PublishState       int    `description:"1:未发布,2:已发布"`
 	PublishTime        string `description:"发布时间"`
 	ReportChapterId    int    `description:"报告章节Id"`

+ 1 - 1
models/tables/rddp/report/query.go

@@ -225,7 +225,7 @@ func GetListCountByClassifyIdSecond(classifyIdSecond int) (total int64, err erro
 // GetReportList 获取报告列表
 func GetReportList(condition string, pars []interface{}, offset, limit int) (list []*Report, err error) {
 	err = global.MYSQL["rddp"].Model(Report{}).
-		Select("id, classify_id_first, classify_name_first, classify_id_second, classify_name_second, title, stage, publish_time, author, create_time, video_url, video_name, video_play_seconds, abstract,has_chapter,head_img,end_img,head_resource_id,end_resource_id").
+		Select("id, classify_id_first, classify_name_first, classify_id_second, classify_name_second,classify_id_third, classify_name_third, title, stage, publish_time, author, create_time, video_url, video_name, video_play_seconds, abstract,has_chapter,head_img,end_img,head_resource_id,end_resource_id").
 		Where(condition, pars...).
 		Order("publish_time desc, id desc").
 		Offset(offset).

+ 1 - 6
services/company/permission.go

@@ -330,13 +330,8 @@ func GetCheckPermission(companyId int64, userId int, permissionIdList []int) (ok
 			permissionMap[permissionId] = true
 		}
 	}
-	if companyId < 1 {
-		permissionCheckInfo.Type = CheckTypeApply
-		return
-	}
-
 	// 潜在客户名下的
-	if companyId == 1 {
+	if companyId <= 1 {
 		permissionCheckInfo.Type = CheckTypeApply
 		return
 	}

+ 5 - 3
services/report/report.go

@@ -873,8 +873,10 @@ 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 reportItem.ClassifyIdSecond > 0 && reportItem.ClassifyIdSecond != reportItem.ClassifyId {
+					temp.ClassifyIdThird = reportItem.ClassifyId
+					temp.ClassifyNameThird = reportItem.ClassifyName
+				}
 				if len(v.Highlight["ClassifyNameSecond"]) > 0 {
 					temp.ClassifyNameSecond = v.Highlight["ClassifyNameSecond"][0]
 				}
@@ -976,7 +978,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
 			reportItem.ClassifyIdFirst = reportInfo.ClassifyIdFirst
 			reportItem.ClassifyIdSecond = reportInfo.ClassifyIdSecond
 			reportItem.ClassifyIdThird = reportInfo.ClassifyIdThird
-			reportItem.ClassifyIdThird = reportInfo.ClassifyIdThird
+			reportItem.ClassifyNameThird = reportInfo.ClassifyNameThird
 			reportItem.Stage = reportInfo.Stage
 			reportItem.Abstract = reportInfo.Abstract
 			if reportInfo.Abstract != "" {