fuwencai 4 سال پیش
والد
کامیت
407b524d34

+ 30 - 0
rpc/stdlib/internal/logic/docactivitylogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DocActivityLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDocActivityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocActivityLogic {
+	return &DocActivityLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *DocActivityLogic) DocActivity(in *stdlib.DocActivityReq) (*stdlib.DocQueryResponse, error) {
+	// todo: add your logic here and delete this line
+
+	return &stdlib.DocQueryResponse{}, nil
+}

+ 30 - 0
rpc/stdlib/internal/logic/docgetchecklogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DocGetCheckLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDocGetCheckLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocGetCheckLogic {
+	return &DocGetCheckLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *DocGetCheckLogic) DocGetCheck(in *stdlib.DocGetCheckReq) (*stdlib.DocGetCheckResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &stdlib.DocGetCheckResp{}, nil
+}

+ 30 - 0
rpc/stdlib/internal/logic/docgetcontentlogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
+
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DocGetContentLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDocGetContentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocGetContentLogic {
+	return &DocGetContentLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *DocGetContentLogic) DocGetContent(in *stdlib.DocGetCheckReq) (*stdlib.DocGetContentResp, error) {
+	// todo: add your logic here and delete this line
+
+	return &stdlib.DocGetContentResp{}, nil
+}

+ 30 - 0
rpc/stdlib/internal/logic/docstatisticslogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/internal/svc"
+	"app.yhyue.com/moapp/jydocs/rpc/stdlib/stdlib"
+	stdlibService "app.yhyue.com/moapp/jydocs/services/stdlib"
+	"github.com/tal-tech/go-zero/core/logx"
+)
+
+type DocStatisticsLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDocStatisticsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocStatisticsLogic {
+	return &DocStatisticsLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *DocStatisticsLogic) DocStatistics(in *stdlib.DocStatisticsReq) (*stdlib.DocChangeResp, error) {
+	// todo: add your logic here and delete this line
+	stdlibService.DocStatistics(in.DocId, int(in.DocStatisticsType))
+	return &stdlib.DocChangeResp{State: true}, nil
+}

+ 20 - 0
rpc/stdlib/internal/server/stdlibserver.go

@@ -35,3 +35,23 @@ func (s *StdlibServer) DocOff(ctx context.Context, in *stdlib.DocChangeReq) (*st
 	l := logic.NewDocOffLogic(ctx, s.svcCtx)
 	return l.DocOff(in)
 }
+
+func (s *StdlibServer) DocStatistics(ctx context.Context, in *stdlib.DocStatisticsReq) (*stdlib.DocChangeResp, error) {
+	l := logic.NewDocStatisticsLogic(ctx, s.svcCtx)
+	return l.DocStatistics(in)
+}
+
+func (s *StdlibServer) DocGetCheck(ctx context.Context, in *stdlib.DocGetCheckReq) (*stdlib.DocGetCheckResp, error) {
+	l := logic.NewDocGetCheckLogic(ctx, s.svcCtx)
+	return l.DocGetCheck(in)
+}
+
+func (s *StdlibServer) DocGetContent(ctx context.Context, in *stdlib.DocGetCheckReq) (*stdlib.DocGetContentResp, error) {
+	l := logic.NewDocGetContentLogic(ctx, s.svcCtx)
+	return l.DocGetContent(in)
+}
+
+func (s *StdlibServer) DocActivity(ctx context.Context, in *stdlib.DocActivityReq) (*stdlib.DocQueryResponse, error) {
+	l := logic.NewDocActivityLogic(ctx, s.svcCtx)
+	return l.DocActivity(in)
+}

+ 52 - 12
rpc/stdlib/stdlib.proto

@@ -2,30 +2,33 @@ syntax = "proto3";
 
 package stdlib;
 
-
-
 message DocQueryRequest {
-  string keyWords = 1; //检索词
-  int32 pageNum = 2; //页码
+  int32 pageNum = 1; //页码 
+  int32 pageSize = 2; //每页数量
+  string keyWords = 3; //检索词  文档名检索  模糊
+  repeated string itemArr = 4;  // 分类 []string
+  repeated string tagArr = 5;  // 标签 []string
+  int32 publishTimeSort = 6;  // 发布时间排序 1正序 2倒序
+  int32 downloadSort = 7;		// 下载次数排序 1正序 2倒序
+  int32	viewSort = 8;			// 浏览量排序 1正序 2倒序
 }
 
 message DocQueryResponse {
   int32 code = 1;    //响应代码
-  string message = 2; //响应消息
+  string msg = 2; //响应消息
   repeated Doc docs = 3;//文档列表集合,没有分页参数
   int32 total = 4; //总数
 }
 
-
-
 message Doc {
-  string id = 1;//文档id
-  string name = 2;//文档名称
-  int32 type = 3;//文档类型
-  int32 fileSize = 4;//文档大小
-  int32 pageSize = 5;//文档页码数
+  string docId = 1;//文档id
+  string docName = 2;//文档名称
+  int32 docType = 3;//文档类型
+  int32 docFileSize = 4;//文档大小
+  int32 docPageSize = 5;//文档页码数
   string tags = 6;//文档标签
   string userId = 7;//上传人id
+  string docSummary = 8; //摘要
 }
 
 message DocChangeReq {
@@ -37,8 +40,45 @@ message DocChangeResp {
   bool state = 1; //是否成功
 }
 
+message DocStatisticsReq {
+  string docId = 1; //文档id
+  int32 DocStatisticsType = 2; //文档统计类型 1增加下载次数 2增加浏览次数 3评分
+}
+
+message DocGetCheckReq {
+  string docId = 1; //文档id
+  string userId = 2; //用户id
+}
+
+message DocGetCheckResp {
+  int32 code = 1;    //响应代码
+  string msg = 2; //响应消息
+  string docName = 3;//文档名称
+  int32 docType = 4;//文档类型
+  int32 docFileSize = 5;//文档大小
+  int32 docPageSize = 6;//文档页码数
+  string tags = 7;//文档标签
+  string userId = 8;//上传人id
+  string docSummary = 9; //摘要
+}
+
+message DocGetContentResp {
+  int32 code = 1;    //响应代码
+  string msg = 2; //响应消息
+  bytes docContent = 3; //文件内容
+}
+
+message DocActivityReq {
+  int32 pageNum = 1; //页码 
+  int32 pageSize = 2; //每页数量
+}
+
 service Stdlib {
   rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
   rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
   rpc DocOff(DocChangeReq) returns(DocChangeResp); //文档下架
+  rpc DocStatistics(DocStatisticsReq) returns(DocChangeResp); //文档浏览次数下载次数处理
+  rpc DocGetCheck(DocGetCheckReq) returns(DocGetCheckResp); //获取文档-检查文档是否可获取,返回页面数据
+  rpc DocGetContent(DocGetCheckReq) returns(DocGetContentResp); //获取文档-页面打开pdf调用查询oss
+  rpc DocActivity(DocActivityReq) returns(DocQueryResponse); //活动文档列表
 }

+ 761 - 82
rpc/stdlib/stdlib/stdlib.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.25.0
-// 	protoc        v3.15.1
+// 	protoc-gen-go v1.23.0
+// 	protoc        v3.11.4
 // source: stdlib.proto
 
 package stdlib
@@ -34,8 +34,14 @@ type DocQueryRequest struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	KeyWords string `protobuf:"bytes,1,opt,name=keyWords,proto3" json:"keyWords,omitempty"` //检索词
-	PageNum  int32  `protobuf:"varint,2,opt,name=pageNum,proto3" json:"pageNum,omitempty"`  //页码
+	PageNum         int32    `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`                 //页码
+	PageSize        int32    `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`               //每页数量
+	KeyWords        string   `protobuf:"bytes,3,opt,name=keyWords,proto3" json:"keyWords,omitempty"`                //检索词  文档名检索  模糊
+	ItemArr         []string `protobuf:"bytes,4,rep,name=itemArr,proto3" json:"itemArr,omitempty"`                  // 分类 []string
+	TagArr          []string `protobuf:"bytes,5,rep,name=tagArr,proto3" json:"tagArr,omitempty"`                    // 标签 []string
+	PublishTimeSort int32    `protobuf:"varint,6,opt,name=publishTimeSort,proto3" json:"publishTimeSort,omitempty"` // 发布时间排序 1正序 2倒序
+	DownloadSort    int32    `protobuf:"varint,7,opt,name=downloadSort,proto3" json:"downloadSort,omitempty"`       // 下载次数排序 1正序 2倒序
+	ViewSort        int32    `protobuf:"varint,8,opt,name=viewSort,proto3" json:"viewSort,omitempty"`               // 浏览量排序 1正序 2倒序
 }
 
 func (x *DocQueryRequest) Reset() {
@@ -70,6 +76,20 @@ func (*DocQueryRequest) Descriptor() ([]byte, []int) {
 	return file_stdlib_proto_rawDescGZIP(), []int{0}
 }
 
+func (x *DocQueryRequest) GetPageNum() int32 {
+	if x != nil {
+		return x.PageNum
+	}
+	return 0
+}
+
+func (x *DocQueryRequest) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
 func (x *DocQueryRequest) GetKeyWords() string {
 	if x != nil {
 		return x.KeyWords
@@ -77,9 +97,37 @@ func (x *DocQueryRequest) GetKeyWords() string {
 	return ""
 }
 
-func (x *DocQueryRequest) GetPageNum() int32 {
+func (x *DocQueryRequest) GetItemArr() []string {
 	if x != nil {
-		return x.PageNum
+		return x.ItemArr
+	}
+	return nil
+}
+
+func (x *DocQueryRequest) GetTagArr() []string {
+	if x != nil {
+		return x.TagArr
+	}
+	return nil
+}
+
+func (x *DocQueryRequest) GetPublishTimeSort() int32 {
+	if x != nil {
+		return x.PublishTimeSort
+	}
+	return 0
+}
+
+func (x *DocQueryRequest) GetDownloadSort() int32 {
+	if x != nil {
+		return x.DownloadSort
+	}
+	return 0
+}
+
+func (x *DocQueryRequest) GetViewSort() int32 {
+	if x != nil {
+		return x.ViewSort
 	}
 	return 0
 }
@@ -89,10 +137,10 @@ type DocQueryResponse struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`      //响应代码
-	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //响应消息
-	Docs    []*Doc `protobuf:"bytes,3,rep,name=docs,proto3" json:"docs,omitempty"`       //文档列表集合,没有分页参数
-	Total   int32  `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`    //总数
+	Code  int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`   //响应代码
+	Msg   string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`      //响应消息
+	Docs  []*Doc `protobuf:"bytes,3,rep,name=docs,proto3" json:"docs,omitempty"`    //文档列表集合,没有分页参数
+	Total int32  `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` //总数
 }
 
 func (x *DocQueryResponse) Reset() {
@@ -134,9 +182,9 @@ func (x *DocQueryResponse) GetCode() int32 {
 	return 0
 }
 
-func (x *DocQueryResponse) GetMessage() string {
+func (x *DocQueryResponse) GetMsg() string {
 	if x != nil {
-		return x.Message
+		return x.Msg
 	}
 	return ""
 }
@@ -160,13 +208,14 @@ type Doc struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Id       string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`              //文档id
-	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`          //文档名称
-	Type     int32  `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`         //文档类型
-	FileSize int32  `protobuf:"varint,4,opt,name=fileSize,proto3" json:"fileSize,omitempty"` //文档大小
-	PageSize int32  `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //文档页码数
-	Tags     string `protobuf:"bytes,6,opt,name=tags,proto3" json:"tags,omitempty"`          //文档标签
-	UserId   string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`      //上传人id
+	DocId       string `protobuf:"bytes,1,opt,name=docId,proto3" json:"docId,omitempty"`              //文档id
+	DocName     string `protobuf:"bytes,2,opt,name=docName,proto3" json:"docName,omitempty"`          //文档名称
+	DocType     int32  `protobuf:"varint,3,opt,name=docType,proto3" json:"docType,omitempty"`         //文档类型
+	DocFileSize int32  `protobuf:"varint,4,opt,name=docFileSize,proto3" json:"docFileSize,omitempty"` //文档大小
+	DocPageSize int32  `protobuf:"varint,5,opt,name=docPageSize,proto3" json:"docPageSize,omitempty"` //文档页码数
+	Tags        string `protobuf:"bytes,6,opt,name=tags,proto3" json:"tags,omitempty"`                //文档标签
+	UserId      string `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`            //上传人id
+	DocSummary  string `protobuf:"bytes,8,opt,name=docSummary,proto3" json:"docSummary,omitempty"`    //摘要
 }
 
 func (x *Doc) Reset() {
@@ -201,37 +250,37 @@ func (*Doc) Descriptor() ([]byte, []int) {
 	return file_stdlib_proto_rawDescGZIP(), []int{2}
 }
 
-func (x *Doc) GetId() string {
+func (x *Doc) GetDocId() string {
 	if x != nil {
-		return x.Id
+		return x.DocId
 	}
 	return ""
 }
 
-func (x *Doc) GetName() string {
+func (x *Doc) GetDocName() string {
 	if x != nil {
-		return x.Name
+		return x.DocName
 	}
 	return ""
 }
 
-func (x *Doc) GetType() int32 {
+func (x *Doc) GetDocType() int32 {
 	if x != nil {
-		return x.Type
+		return x.DocType
 	}
 	return 0
 }
 
-func (x *Doc) GetFileSize() int32 {
+func (x *Doc) GetDocFileSize() int32 {
 	if x != nil {
-		return x.FileSize
+		return x.DocFileSize
 	}
 	return 0
 }
 
-func (x *Doc) GetPageSize() int32 {
+func (x *Doc) GetDocPageSize() int32 {
 	if x != nil {
-		return x.PageSize
+		return x.DocPageSize
 	}
 	return 0
 }
@@ -250,6 +299,13 @@ func (x *Doc) GetUserId() string {
 	return ""
 }
 
+func (x *Doc) GetDocSummary() string {
+	if x != nil {
+		return x.DocSummary
+	}
+	return ""
+}
+
 type DocChangeReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -352,51 +408,457 @@ func (x *DocChangeResp) GetState() bool {
 	return false
 }
 
+type DocStatisticsReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DocId             string `protobuf:"bytes,1,opt,name=docId,proto3" json:"docId,omitempty"`                          //文档id
+	DocStatisticsType int32  `protobuf:"varint,2,opt,name=DocStatisticsType,proto3" json:"DocStatisticsType,omitempty"` //文档统计类型 1增加下载次数 2增加浏览次数 3评分
+}
+
+func (x *DocStatisticsReq) Reset() {
+	*x = DocStatisticsReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocStatisticsReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocStatisticsReq) ProtoMessage() {}
+
+func (x *DocStatisticsReq) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocStatisticsReq.ProtoReflect.Descriptor instead.
+func (*DocStatisticsReq) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DocStatisticsReq) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+func (x *DocStatisticsReq) GetDocStatisticsType() int32 {
+	if x != nil {
+		return x.DocStatisticsType
+	}
+	return 0
+}
+
+type DocGetCheckReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DocId  string `protobuf:"bytes,1,opt,name=docId,proto3" json:"docId,omitempty"`   //文档id
+	UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` //用户id
+}
+
+func (x *DocGetCheckReq) Reset() {
+	*x = DocGetCheckReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocGetCheckReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocGetCheckReq) ProtoMessage() {}
+
+func (x *DocGetCheckReq) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocGetCheckReq.ProtoReflect.Descriptor instead.
+func (*DocGetCheckReq) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *DocGetCheckReq) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+func (x *DocGetCheckReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+type DocGetCheckResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code        int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`               //响应代码
+	Msg         string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`                  //响应消息
+	DocName     string `protobuf:"bytes,3,opt,name=docName,proto3" json:"docName,omitempty"`          //文档名称
+	DocType     int32  `protobuf:"varint,4,opt,name=docType,proto3" json:"docType,omitempty"`         //文档类型
+	DocFileSize int32  `protobuf:"varint,5,opt,name=docFileSize,proto3" json:"docFileSize,omitempty"` //文档大小
+	DocPageSize int32  `protobuf:"varint,6,opt,name=docPageSize,proto3" json:"docPageSize,omitempty"` //文档页码数
+	Tags        string `protobuf:"bytes,7,opt,name=tags,proto3" json:"tags,omitempty"`                //文档标签
+	UserId      string `protobuf:"bytes,8,opt,name=userId,proto3" json:"userId,omitempty"`            //上传人id
+	DocSummary  string `protobuf:"bytes,9,opt,name=docSummary,proto3" json:"docSummary,omitempty"`    //摘要
+}
+
+func (x *DocGetCheckResp) Reset() {
+	*x = DocGetCheckResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocGetCheckResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocGetCheckResp) ProtoMessage() {}
+
+func (x *DocGetCheckResp) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocGetCheckResp.ProtoReflect.Descriptor instead.
+func (*DocGetCheckResp) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DocGetCheckResp) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *DocGetCheckResp) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
+func (x *DocGetCheckResp) GetDocName() string {
+	if x != nil {
+		return x.DocName
+	}
+	return ""
+}
+
+func (x *DocGetCheckResp) GetDocType() int32 {
+	if x != nil {
+		return x.DocType
+	}
+	return 0
+}
+
+func (x *DocGetCheckResp) GetDocFileSize() int32 {
+	if x != nil {
+		return x.DocFileSize
+	}
+	return 0
+}
+
+func (x *DocGetCheckResp) GetDocPageSize() int32 {
+	if x != nil {
+		return x.DocPageSize
+	}
+	return 0
+}
+
+func (x *DocGetCheckResp) GetTags() string {
+	if x != nil {
+		return x.Tags
+	}
+	return ""
+}
+
+func (x *DocGetCheckResp) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *DocGetCheckResp) GetDocSummary() string {
+	if x != nil {
+		return x.DocSummary
+	}
+	return ""
+}
+
+type DocGetContentResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code       int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`            //响应代码
+	Msg        string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`               //响应消息
+	DocContent []byte `protobuf:"bytes,3,opt,name=docContent,proto3" json:"docContent,omitempty"` //文件内容
+}
+
+func (x *DocGetContentResp) Reset() {
+	*x = DocGetContentResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocGetContentResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocGetContentResp) ProtoMessage() {}
+
+func (x *DocGetContentResp) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocGetContentResp.ProtoReflect.Descriptor instead.
+func (*DocGetContentResp) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DocGetContentResp) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *DocGetContentResp) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
+func (x *DocGetContentResp) GetDocContent() []byte {
+	if x != nil {
+		return x.DocContent
+	}
+	return nil
+}
+
+type DocActivityReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PageNum  int32 `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`   //页码
+	PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //每页数量
+}
+
+func (x *DocActivityReq) Reset() {
+	*x = DocActivityReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocActivityReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocActivityReq) ProtoMessage() {}
+
+func (x *DocActivityReq) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocActivityReq.ProtoReflect.Descriptor instead.
+func (*DocActivityReq) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DocActivityReq) GetPageNum() int32 {
+	if x != nil {
+		return x.PageNum
+	}
+	return 0
+}
+
+func (x *DocActivityReq) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
 var File_stdlib_proto protoreflect.FileDescriptor
 
 var file_stdlib_proto_rawDesc = []byte{
 	0x0a, 0x0c, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
-	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x22, 0x47, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65,
-	0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79,
-	0x57, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79,
-	0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22,
-	0x77, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
-	0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
-	0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
-	0x0b, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x52, 0x04, 0x64, 0x6f,
-	0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0xa1, 0x01, 0x0a, 0x03, 0x44, 0x6f, 0x63,
-	0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
-	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
-	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65,
-	0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
-	0x53, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
-	0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
-	0x74, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x0c,
-	0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02,
-	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
-	0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65,
-	0x61, 0x73, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67,
-	0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x32, 0xb4, 0x01, 0x0a, 0x06,
-	0x53, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x12, 0x3d, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65,
-	0x72, 0x79, 0x12, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51,
-	0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x74,
-	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73,
-	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x44, 0x6f, 0x63, 0x4f, 0x6e, 0x12, 0x14,
-	0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67,
-	0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f,
-	0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x44,
-	0x6f, 0x63, 0x4f, 0x66, 0x66, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
-	0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74,
-	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65,
-	0x73, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x22, 0xff, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x51, 0x75,
+	0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61,
+	0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x67,
+	0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07,
+	0x69, 0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x69,
+	0x74, 0x65, 0x6d, 0x41, 0x72, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x41, 0x72, 0x72,
+	0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x67, 0x41, 0x72, 0x72, 0x12, 0x28,
+	0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72,
+	0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
+	0x54, 0x69, 0x6d, 0x65, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x6f, 0x77, 0x6e,
+	0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
+	0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08,
+	0x76, 0x69, 0x65, 0x77, 0x53, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
+	0x76, 0x69, 0x65, 0x77, 0x53, 0x6f, 0x72, 0x74, 0x22, 0x6f, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x51,
+	0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d,
+	0x73, 0x67, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x0b, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x52, 0x04, 0x64,
+	0x6f, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0xdf, 0x01, 0x0a, 0x03, 0x44, 0x6f,
+	0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61,
+	0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d,
+	0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x07, 0x64, 0x6f, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+	0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
+	0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a,
+	0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12,
+	0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
+	0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
+	0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x36, 0x0a, 0x0c, 0x44,
+	0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72,
+	0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x61,
+	0x73, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x56, 0x0a, 0x10, 0x44, 0x6f,
+	0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14,
+	0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64,
+	0x6f, 0x63, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69,
+	0x73, 0x74, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
+	0x11, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x54, 0x79,
+	0x70, 0x65, 0x22, 0x3e, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63,
+	0x6b, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x22, 0xfb, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65,
+	0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73,
+	0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07,
+	0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64,
+	0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x54, 0x79, 0x70,
+	0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x6f, 0x63, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69,
+	0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
+	0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65,
+	0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x09,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79,
+	0x22, 0x59, 0x0a, 0x11, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
+	0x6f, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
+	0x0a, 0x64, 0x6f, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x0e, 0x44,
+	0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a,
+	0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
+	0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+	0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+	0x69, 0x7a, 0x65, 0x32, 0xbb, 0x03, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x12, 0x3d,
+	0x0a, 0x08, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x73, 0x74, 0x64,
+	0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
+	0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a,
+	0x05, 0x44, 0x6f, 0x63, 0x4f, 0x6e, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e,
+	0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73,
+	0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x4f, 0x66, 0x66, 0x12, 0x14, 0x2e,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
+	0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
+	0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x44, 0x6f,
+	0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x74,
+	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
+	0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
+	0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0b,
+	0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x73, 0x74,
+	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
+	0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d,
+	0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65,
+	0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
+	0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x3f, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12,
+	0x16, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69,
+	0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62,
+	0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -411,24 +873,37 @@ func file_stdlib_proto_rawDescGZIP() []byte {
 	return file_stdlib_proto_rawDescData
 }
 
-var file_stdlib_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_stdlib_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
 var file_stdlib_proto_goTypes = []interface{}{
-	(*DocQueryRequest)(nil),  // 0: stdlib.DocQueryRequest
-	(*DocQueryResponse)(nil), // 1: stdlib.DocQueryResponse
-	(*Doc)(nil),              // 2: stdlib.Doc
-	(*DocChangeReq)(nil),     // 3: stdlib.DocChangeReq
-	(*DocChangeResp)(nil),    // 4: stdlib.DocChangeResp
+	(*DocQueryRequest)(nil),   // 0: stdlib.DocQueryRequest
+	(*DocQueryResponse)(nil),  // 1: stdlib.DocQueryResponse
+	(*Doc)(nil),               // 2: stdlib.Doc
+	(*DocChangeReq)(nil),      // 3: stdlib.DocChangeReq
+	(*DocChangeResp)(nil),     // 4: stdlib.DocChangeResp
+	(*DocStatisticsReq)(nil),  // 5: stdlib.DocStatisticsReq
+	(*DocGetCheckReq)(nil),    // 6: stdlib.DocGetCheckReq
+	(*DocGetCheckResp)(nil),   // 7: stdlib.DocGetCheckResp
+	(*DocGetContentResp)(nil), // 8: stdlib.DocGetContentResp
+	(*DocActivityReq)(nil),    // 9: stdlib.DocActivityReq
 }
 var file_stdlib_proto_depIdxs = []int32{
 	2, // 0: stdlib.DocQueryResponse.docs:type_name -> stdlib.Doc
 	0, // 1: stdlib.Stdlib.DocQuery:input_type -> stdlib.DocQueryRequest
 	3, // 2: stdlib.Stdlib.DocOn:input_type -> stdlib.DocChangeReq
 	3, // 3: stdlib.Stdlib.DocOff:input_type -> stdlib.DocChangeReq
-	1, // 4: stdlib.Stdlib.DocQuery:output_type -> stdlib.DocQueryResponse
-	4, // 5: stdlib.Stdlib.DocOn:output_type -> stdlib.DocChangeResp
-	4, // 6: stdlib.Stdlib.DocOff:output_type -> stdlib.DocChangeResp
-	4, // [4:7] is the sub-list for method output_type
-	1, // [1:4] is the sub-list for method input_type
+	5, // 4: stdlib.Stdlib.DocStatistics:input_type -> stdlib.DocStatisticsReq
+	6, // 5: stdlib.Stdlib.DocGetCheck:input_type -> stdlib.DocGetCheckReq
+	6, // 6: stdlib.Stdlib.DocGetContent:input_type -> stdlib.DocGetCheckReq
+	9, // 7: stdlib.Stdlib.DocActivity:input_type -> stdlib.DocActivityReq
+	1, // 8: stdlib.Stdlib.DocQuery:output_type -> stdlib.DocQueryResponse
+	4, // 9: stdlib.Stdlib.DocOn:output_type -> stdlib.DocChangeResp
+	4, // 10: stdlib.Stdlib.DocOff:output_type -> stdlib.DocChangeResp
+	4, // 11: stdlib.Stdlib.DocStatistics:output_type -> stdlib.DocChangeResp
+	7, // 12: stdlib.Stdlib.DocGetCheck:output_type -> stdlib.DocGetCheckResp
+	8, // 13: stdlib.Stdlib.DocGetContent:output_type -> stdlib.DocGetContentResp
+	1, // 14: stdlib.Stdlib.DocActivity:output_type -> stdlib.DocQueryResponse
+	8, // [8:15] is the sub-list for method output_type
+	1, // [1:8] is the sub-list for method input_type
 	1, // [1:1] is the sub-list for extension type_name
 	1, // [1:1] is the sub-list for extension extendee
 	0, // [0:1] is the sub-list for field type_name
@@ -500,6 +975,66 @@ func file_stdlib_proto_init() {
 				return nil
 			}
 		}
+		file_stdlib_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocStatisticsReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_stdlib_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocGetCheckReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_stdlib_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocGetCheckResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_stdlib_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocGetContentResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_stdlib_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocActivityReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -507,7 +1042,7 @@ func file_stdlib_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_stdlib_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   5,
+			NumMessages:   10,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -536,6 +1071,10 @@ type StdlibClient interface {
 	DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error)
 	DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
 	DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+	DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+	DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error)
+	DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error)
+	DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocQueryResponse, error)
 }
 
 type stdlibClient struct {
@@ -573,11 +1112,51 @@ func (c *stdlibClient) DocOff(ctx context.Context, in *DocChangeReq, opts ...grp
 	return out, nil
 }
 
+func (c *stdlibClient) DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	out := new(DocChangeResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocStatistics", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error) {
+	out := new(DocGetCheckResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetCheck", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error) {
+	out := new(DocGetContentResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetContent", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocQueryResponse, error) {
+	out := new(DocQueryResponse)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocActivity", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // StdlibServer is the server API for Stdlib service.
 type StdlibServer interface {
 	DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error)
 	DocOn(context.Context, *DocChangeReq) (*DocChangeResp, error)
 	DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error)
+	DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error)
+	DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error)
+	DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error)
+	DocActivity(context.Context, *DocActivityReq) (*DocQueryResponse, error)
 }
 
 // UnimplementedStdlibServer can be embedded to have forward compatible implementations.
@@ -593,6 +1172,18 @@ func (*UnimplementedStdlibServer) DocOn(context.Context, *DocChangeReq) (*DocCha
 func (*UnimplementedStdlibServer) DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method DocOff not implemented")
 }
+func (*UnimplementedStdlibServer) DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocStatistics not implemented")
+}
+func (*UnimplementedStdlibServer) DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocGetCheck not implemented")
+}
+func (*UnimplementedStdlibServer) DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocGetContent not implemented")
+}
+func (*UnimplementedStdlibServer) DocActivity(context.Context, *DocActivityReq) (*DocQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocActivity not implemented")
+}
 
 func RegisterStdlibServer(s *grpc.Server, srv StdlibServer) {
 	s.RegisterService(&_Stdlib_serviceDesc, srv)
@@ -652,6 +1243,78 @@ func _Stdlib_DocOff_Handler(srv interface{}, ctx context.Context, dec func(inter
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Stdlib_DocStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocStatisticsReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocStatistics(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocStatistics",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocStatistics(ctx, req.(*DocStatisticsReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocGetCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocGetCheckReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocGetCheck(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocGetCheck",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocGetCheck(ctx, req.(*DocGetCheckReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocGetContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocGetCheckReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocGetContent(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocGetContent",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocGetContent(ctx, req.(*DocGetCheckReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocActivityReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocActivity(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocActivity",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocActivity(ctx, req.(*DocActivityReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 var _Stdlib_serviceDesc = grpc.ServiceDesc{
 	ServiceName: "stdlib.Stdlib",
 	HandlerType: (*StdlibServer)(nil),
@@ -668,6 +1331,22 @@ var _Stdlib_serviceDesc = grpc.ServiceDesc{
 			MethodName: "DocOff",
 			Handler:    _Stdlib_DocOff_Handler,
 		},
+		{
+			MethodName: "DocStatistics",
+			Handler:    _Stdlib_DocStatistics_Handler,
+		},
+		{
+			MethodName: "DocGetCheck",
+			Handler:    _Stdlib_DocGetCheck_Handler,
+		},
+		{
+			MethodName: "DocGetContent",
+			Handler:    _Stdlib_DocGetContent_Handler,
+		},
+		{
+			MethodName: "DocActivity",
+			Handler:    _Stdlib_DocActivity_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "stdlib.proto",

+ 34 - 5
rpc/stdlib/stdlibclient/stdlib.go

@@ -14,16 +14,25 @@ import (
 )
 
 type (
-	DocQueryRequest  = stdlib.DocQueryRequest
-	DocQueryResponse = stdlib.DocQueryResponse
-	Doc              = stdlib.Doc
-	DocChangeReq     = stdlib.DocChangeReq
-	DocChangeResp    = stdlib.DocChangeResp
+	DocQueryResponse  = stdlib.DocQueryResponse
+	Doc               = stdlib.Doc
+	DocChangeResp     = stdlib.DocChangeResp
+	DocGetCheckReq    = stdlib.DocGetCheckReq
+	DocGetCheckResp   = stdlib.DocGetCheckResp
+	DocQueryRequest   = stdlib.DocQueryRequest
+	DocStatisticsReq  = stdlib.DocStatisticsReq
+	DocGetContentResp = stdlib.DocGetContentResp
+	DocActivityReq    = stdlib.DocActivityReq
+	DocChangeReq      = stdlib.DocChangeReq
 
 	Stdlib interface {
 		DocQuery(ctx context.Context, in *DocQueryRequest) (*DocQueryResponse, error)
 		DocOn(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error)
 		DocOff(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error)
+		DocStatistics(ctx context.Context, in *DocStatisticsReq) (*DocChangeResp, error)
+		DocGetCheck(ctx context.Context, in *DocGetCheckReq) (*DocGetCheckResp, error)
+		DocGetContent(ctx context.Context, in *DocGetCheckReq) (*DocGetContentResp, error)
+		DocActivity(ctx context.Context, in *DocActivityReq) (*DocQueryResponse, error)
 	}
 
 	defaultStdlib struct {
@@ -51,3 +60,23 @@ func (m *defaultStdlib) DocOff(ctx context.Context, in *DocChangeReq) (*DocChang
 	client := stdlib.NewStdlibClient(m.cli.Conn())
 	return client.DocOff(ctx, in)
 }
+
+func (m *defaultStdlib) DocStatistics(ctx context.Context, in *DocStatisticsReq) (*DocChangeResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocStatistics(ctx, in)
+}
+
+func (m *defaultStdlib) DocGetCheck(ctx context.Context, in *DocGetCheckReq) (*DocGetCheckResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocGetCheck(ctx, in)
+}
+
+func (m *defaultStdlib) DocGetContent(ctx context.Context, in *DocGetCheckReq) (*DocGetContentResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocGetContent(ctx, in)
+}
+
+func (m *defaultStdlib) DocActivity(ctx context.Context, in *DocActivityReq) (*DocQueryResponse, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocActivity(ctx, in)
+}

+ 11 - 2
rpc/userlib/internal/logic/docdeletelogic.go

@@ -1,6 +1,7 @@
 package logic
 
 import (
+	userLibService "app.yhyue.com/moapp/jydocs/services/userlib"
 	"context"
 
 	"app.yhyue.com/moapp/jydocs/rpc/userlib/internal/svc"
@@ -25,6 +26,14 @@ func NewDocDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocDele
 
 func (l *DocDeleteLogic) DocDelete(in *userlib.UserDeleteRequest) (*userlib.UserDeleteResponse, error) {
 	// todo: add your logic here and delete this line
-
-	return &userlib.UserDeleteResponse{}, nil
+	result := &userlib.UserDeleteResponse{}
+	b := userLibService.UserDocDelete(in.DocId)
+	if b {
+		result.Code = 1
+		result.Message = "删除成功"
+		return result,nil
+	}
+	result.Code = 0
+	result.Message = "删除失败"
+	return result, nil
 }

+ 17 - 0
rpc/userlib/test/userLib_test.go

@@ -36,3 +36,20 @@ func Test_UserDocCollect(t *testing.T) {
 	}
 	log.Print("UserDoc Collect call response:", resp)
 }
+
+func Test_UserDocDelete(t *testing.T)  {
+	client := zrpc.MustNewClient(zrpc.RpcClientConf{
+		Etcd: discov.EtcdConf{
+			Hosts: []string{"192.168.3.240:2379"},
+			Key:   "jydocs.userlib.rpc",
+		},
+	})
+	userLib := userlibclient.NewUserLib(client)
+	resp, err := userLib.DocDelete(context.Background(), &userlibclient.UserDeleteRequest{
+		DocId: "8",
+	})
+	if err != nil {
+		log.Println("UserDoc Collect call error:", err)
+	}
+	log.Print("UserDoc Collect call response:", resp)
+}

+ 14 - 10
services/model/stdlib.go

@@ -25,18 +25,22 @@ type UserMoneyRecord struct {
 	DocSummary       string `json:"docSummary"`
 }
 
+func (ud *UserMoneyRecord) TableName() string {
+	return "doc"
+}
+
 type UserDoc struct {
 	BaseModel
-	UserId        string `json:"user_id"  gorm:"column:userId"`
-	DocId         string `json:"doc_id" gorm:"column:docId"`
-	DocCategory   int    `json:"doc_category" gorm:"column:docCategory"`
-	IsDelete      int    `json:"is_delete" gorm:"column:isDelete"`
-	DocName       string `json:"doc_name" gorm:"column:docName"`
-	DocFileType   int    `json:"doc_file_type" gorm:"column:docFileType"`
-	DocFileSuffix string `json:"doc_file_suffix" gorm:"column:docFileSuffix"`
-	DocFileSize   int    `json:"doc_file_size" gorm:"column:docFileSize"`
-	DocPageSize   int    `json:"doc_page_size" gorm:"column:docPageSize"`
-	DocSummary    string `json:"doc_summary" gorm:"column:docSummary"`
+	UserId          string `json:"user_id"  gorm:"column:userId"`
+	DocId           string `json:"doc_id" gorm:"column:docId"`
+	DocCategory     int    `json:"doc_category" gorm:"column:docCategory"`
+	IsDelete        int    `json:"is_delete" gorm:"column:isDelete"`
+	DocName         string `json:"doc_name" gorm:"column:docName"`
+	DocFileType     int    `json:"doc_file_type" gorm:"column:docFileType"`
+	DocFileSuffix   string `json:"doc_file_suffix" gorm:"column:docFileSuffix"`
+	DocFileSize     int    `json:"doc_file_size" gorm:"column:docFileSize"`
+	DocPageSize     int    `json:"doc_page_size" gorm:"column:docPageSize"`
+	DocSummary      string `json:"doc_summary" gorm:"column:docSummary"`
 	DocSourceUserId string `json:"doc_source_user_id" gorm:"column:docSourceUserId"`
 }
 

+ 7 - 7
services/stdlib/docChangeService.go

@@ -18,7 +18,7 @@ func ChangeDocumentOn(id string, reason int32) bool {
 	docData := map[string]interface{}{}
 	rs := jyDocsRpcUtil.GetJyDocsDB().Table("doc").Where("id=? and isDelete=0", id).Find(&docData)
 	if rs.Error != nil {
-		log.Println("上架文档 error:"+id,rs.Error)
+		log.Println("上架文档 error:"+id, rs.Error)
 		return false
 	} else {
 		if docData["id"] == nil {
@@ -37,15 +37,15 @@ func ChangeDocumentOn(id string, reason int32) bool {
 		if err := tx.Exec("insert into doc_change_record (docId,date,downOrUp,reason) values (?,?,?,?)", id, date, DocOn, reason).Error; err != nil {
 			return err
 		}
-		docData["_id"]=docData["id"]
+		docData["_id"] = docData["id"]
 		// todo es加数据 索引待替换 测试
 		if rs := elastic.Save("doc_lib", "doc", docData); rs != true {
 			return errors.New("发布到检索库失败")
 		}
 		return nil
 	})
-	log.Println("上架文档 error:"+id,err)
-	if err != nil{
+	log.Println("上架文档 error:"+id, err)
+	if err != nil {
 		return false
 	}
 	return true
@@ -57,7 +57,7 @@ func ChangeDocumentOff(id string, reason int32) bool {
 	docData := map[string]interface{}{}
 	rs := jyDocsRpcUtil.GetJyDocsDB().Table("doc").Where("id=? and isDelete=0", id).Find(&docData)
 	if rs.Error != nil {
-		log.Println("下架文档 error:"+id,rs.Error)
+		log.Println("下架文档 error:"+id, rs.Error)
 		return false
 	} else {
 		if docData["id"] == nil {
@@ -83,8 +83,8 @@ func ChangeDocumentOff(id string, reason int32) bool {
 		return nil
 	})
 
-	if err !=nil{
-		log.Println("上架文档 error:"+id,err)
+	if err != nil {
+		log.Println("上架文档 error:"+id, err)
 		return false
 	}
 	return true

+ 17 - 0
services/stdlib/docStatistics.go

@@ -0,0 +1,17 @@
+package stdlib
+
+import (
+	jyDocsRpcUtil "app.yhyue.com/moapp/jydocs/services/util"
+)
+
+func DocStatistics(docId string, dtype int) {
+	jyDocsRpcUtil.GetJyDocsDB()
+	if dtype == 1 { //下载次数增加1
+		//mysql
+
+		//es
+
+	} else if dtype == 2 { //浏览次数增加1
+
+	}
+}

+ 31 - 0
services/userlib/userDocService.go

@@ -5,6 +5,7 @@ import (
 	docRpcUtil "app.yhyue.com/moapp/jydocs/services/util"
 	"gorm.io/gorm"
 	"log"
+	"time"
 )
 
 func UserDocCollect(userDoc *model.UserDoc, cost int) bool {
@@ -31,3 +32,33 @@ func UserDocCollect(userDoc *model.UserDoc, cost int) bool {
 	}
 	return true
 }
+
+func UserDocDelete(docId string) bool {
+	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
+		orm := docRpcUtil.GetJyDocsDB()
+		docData := model.UserDoc{}
+		//查询用户文档详情
+		orm.Select("userId,docId").First(&docData,docId)
+		log.Println(docData.UserId)
+		log.Println(docData.DocId)
+
+
+		//逻辑删除
+		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = 1 WHERE id = ?",docId).Error
+		if err != nil {
+			tx.Rollback()
+			return err
+		}
+		//删除记录
+		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, viewType, source, shareUserId) values (?,?,?,?,?,?,?)",docId,docData.UserId,time.Now(),1,1,1,1).Error
+		if err != nil {
+			tx.Rollback()
+			return err
+		}
+		return nil
+	})
+	if err != nil {
+		return false
+	}
+	return true
+}

+ 2 - 1
services/util/baseInit.go

@@ -1,10 +1,11 @@
 package util
 
 import (
+	"log"
+
 	elastic "app.yhyue.com/moapp/jybase/esv7"
 	"app.yhyue.com/moapp/jybase/mysql"
 	"gorm.io/gorm"
-	"log"
 )
 
 type MysqlDBConfig struct {