Roc 2 weeks ago
parent
commit
b809564bc6
2 changed files with 13 additions and 1 deletions
  1. 12 0
      services/report/report_handle.go
  2. 1 1
      utils/constants.go

+ 12 - 0
services/report/report_handle.go

@@ -212,6 +212,18 @@ func processMap(data map[string]interface{}, opType string, tokenMap map[string]
 		switch v := value.(type) {
 		case string:
 			if key == "content" {
+				contentSource, ok := data["compType"]
+				if !ok {
+					continue
+				}
+				contentSourceType, ok := contentSource.(string)
+				if !ok {
+					continue
+				}
+				if !utils.InArrayByStr([]string{`sheet`, `chart`}, contentSourceType) {
+					continue
+				}
+
 				newContent := v
 				// 处理链接
 				switch opType {

+ 1 - 1
utils/constants.go

@@ -158,7 +158,7 @@ var PermissionFiccClassifyArr = [...]string{"宏观经济", "化工产业", "建
 // 缓存key
 const (
 	CACHE_KEY_USER_VIEW = "user_view_record" //用户阅读数据
-	CACHE_CHART_AUTH    = "chart:auth:"      //图表数据授权
+	CACHE_CHART_AUTH    = "eta:chart:auth:"  //图表数据授权
 )
 
 // es相关