浏览代码

feat:p525处理用户访问数据问题

fuwencai 1 年之前
父节点
当前提交
37192a983d
共有 3 个文件被更改,包括 4 次插入1 次删除
  1. 2 0
      rpc/stdlib/etc/stdlib.yaml
  2. 1 0
      rpc/stdlib/internal/config/config.go
  3. 1 1
      rpc/stdlib/internal/logic/docquerylogic.go

+ 2 - 0
rpc/stdlib/etc/stdlib.yaml

@@ -21,3 +21,5 @@ FileSystemConf:
   Key: moapp.filesystem.rpc
 DocBucketName: "jydoc-stdlib"
 PreviewBucketName: "jydoc-preview"
+SearchSource: # 文库搜索范围 1-剑鱼 2-豆丁
+  - "1" # 1-剑鱼 这配字符串方便拼接

+ 1 - 0
rpc/stdlib/internal/config/config.go

@@ -13,4 +13,5 @@ type Config struct {
 	EsConfig          jyDocRpcUtil.EsConfig
 	DocBucketName     string
 	PreviewBucketName string
+	SearchSource      []string // 文库搜索来源
 }

+ 1 - 1
rpc/stdlib/internal/logic/docquerylogic.go

@@ -51,5 +51,5 @@ func (l *DocQueryLogic) DocQuery(in *stdlib.DocQueryRequest) (*stdlib.DocQueryRe
 			}, nil
 		}
 	}
-	return stdlibService.DocQuery(in), nil
+	return stdlibService.DocQuery(in, l.svcCtx.Config.SearchSource), nil
 }