Răsfoiți Sursa

feat:P525 userlib 我的收藏 接口调整

fuwencai 1 an în urmă
părinte
comite
1554a15aa6

+ 6 - 2
rpc/userlib/etc/userlib.yaml

@@ -11,9 +11,13 @@ FileSystemConf:
     Key: integral.rpc
 JyDocsMysqlDB:
   DriverName: "mysql"
-  DataSourceName: "root:Topnet123@tcp(192.168.3.11:3366)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
+  DataSourceName: "root:=PDT49#80Z!RVv52_z@tcp(192.168.3.217:4000)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
   MaxOpenConn: 20
   MaxIdleConn: 10
   MaxConnLifeTime: 100
 Callee: "文库"
-Node: "1"
+Node: "1"
+JyPremiumTag:
+  行业报告: true
+  行业解决方案: true
+  投标文件: true

+ 4 - 3
rpc/userlib/internal/config/config.go

@@ -9,8 +9,9 @@ type Config struct {
 	zrpc.RpcServerConf
 	JyDocsMysqlDB  jyDocRpcUtil.MysqlDBConfig
 	FileSystemConf zrpc.RpcClientConf
-	Callee			string
-	Node			string
+	Callee         string
+	Node           string
+	JyPremiumTag   map[string]bool
 }
 
-var   Configs Config
+var Configs Config

+ 26 - 1
rpc/userlib/internal/logic/userdocslogic.go

@@ -5,6 +5,7 @@ import (
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 	userLibService "app.yhyue.com/moapp/jy_docs/services/userlib"
 	"context"
+	"strings"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -23,7 +24,12 @@ func NewUserDocsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserDocs
 	}
 }
 
-//我的文档 收藏和兑换
+const (
+	ProductTypeMemberFree = 1 // 商品类型 会员免费
+	ProductTypePremium    = 2 // 商品类型 精品文档
+)
+
+// 我的文档 收藏和兑换
 func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocsResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &userlib.UserDocsResponse{}
@@ -33,6 +39,23 @@ func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocs
 		if value.IsDownload == 1 {
 			value.Cost = "已购买"
 		}
+		// 因为tidb的历史数据没有处理 收藏列表需要展示商品类型 所以需要处理一下
+		if value.ProductType == 0 && in.UserDocCategory == int64(1) {
+			var flag bool
+			tags := strings.Split(value.DocTags, ",")
+			for i := 0; i < len(tags); i++ {
+				if l.svcCtx.Config.JyPremiumTag[tags[i]] {
+					// 说明是剑鱼精品文档
+					flag = true
+					value.ProductType = ProductTypePremium
+					break
+				}
+			}
+			if !flag {
+				// 否则是剑鱼会员免费文档
+				value.ProductType = ProductTypeMemberFree
+			}
+		}
 		docList = append(docList, &userlib.UserDocs{
 			CreateAt:      value.CreateAt.Unix(),
 			UpdateAt:      value.UpdateAt.Unix(),
@@ -48,6 +71,8 @@ func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocs
 			IsDownload:    int64(value.IsDownload),
 			IsCollection:  int64(value.IsCollection),
 			Cost:          value.Cost,
+			ProductType:   value.ProductType,
+			Source:        value.Source,
 		})
 	}
 	if code {

+ 2 - 1
rpc/userlib/internal/server/userlibserver.go

@@ -8,11 +8,12 @@ import (
 
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/logic"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 )
 
 type UserLibServer struct {
 	svcCtx *svc.ServiceContext
+	userlib.UnimplementedUserLibServer
 }
 
 func NewUserLibServer(svcCtx *svc.ServiceContext) *UserLibServer {

+ 1334 - 0
rpc/userlib/type/userlib/userlib.pb.go

@@ -0,0 +1,1334 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
+// source: userlib.proto
+
+package userlib
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+//用户文档类别
+type UserDocCategory int32
+
+const (
+	UserDocCategory_SelfUpload UserDocCategory = 0 //自己上传
+	UserDocCategory_Download   UserDocCategory = 1 //转存(下载)
+	UserDocCategory_Collect    UserDocCategory = 2 //收藏
+)
+
+// Enum value maps for UserDocCategory.
+var (
+	UserDocCategory_name = map[int32]string{
+		0: "SelfUpload",
+		1: "Download",
+		2: "Collect",
+	}
+	UserDocCategory_value = map[string]int32{
+		"SelfUpload": 0,
+		"Download":   1,
+		"Collect":    2,
+	}
+)
+
+func (x UserDocCategory) Enum() *UserDocCategory {
+	p := new(UserDocCategory)
+	*p = x
+	return p
+}
+
+func (x UserDocCategory) String() string {
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserDocCategory) Descriptor() protoreflect.EnumDescriptor {
+	return file_userlib_proto_enumTypes[0].Descriptor()
+}
+
+func (UserDocCategory) Type() protoreflect.EnumType {
+	return &file_userlib_proto_enumTypes[0]
+}
+
+func (x UserDocCategory) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use UserDocCategory.Descriptor instead.
+func (UserDocCategory) EnumDescriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{0}
+}
+
+//文件类型
+type UserDocFileType int32
+
+const (
+	UserDocFileType_Word  UserDocFileType = 0
+	UserDocFileType_PDF   UserDocFileType = 1
+	UserDocFileType_EXCEL UserDocFileType = 2
+	UserDocFileType_PPT   UserDocFileType = 3
+	UserDocFileType_TXT   UserDocFileType = 4
+	UserDocFileType_Other UserDocFileType = 5
+)
+
+// Enum value maps for UserDocFileType.
+var (
+	UserDocFileType_name = map[int32]string{
+		0: "Word",
+		1: "PDF",
+		2: "EXCEL",
+		3: "PPT",
+		4: "TXT",
+		5: "Other",
+	}
+	UserDocFileType_value = map[string]int32{
+		"Word":  0,
+		"PDF":   1,
+		"EXCEL": 2,
+		"PPT":   3,
+		"TXT":   4,
+		"Other": 5,
+	}
+)
+
+func (x UserDocFileType) Enum() *UserDocFileType {
+	p := new(UserDocFileType)
+	*p = x
+	return p
+}
+
+func (x UserDocFileType) String() string {
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserDocFileType) Descriptor() protoreflect.EnumDescriptor {
+	return file_userlib_proto_enumTypes[1].Descriptor()
+}
+
+func (UserDocFileType) Type() protoreflect.EnumType {
+	return &file_userlib_proto_enumTypes[1]
+}
+
+func (x UserDocFileType) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use UserDocFileType.Descriptor instead.
+func (UserDocFileType) EnumDescriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{1}
+}
+
+type UserDocStatus int32
+
+const (
+	UserDocStatus_Normal            UserDocStatus = 0 //文件正常
+	UserDocStatus_LogicDelete       UserDocStatus = 1 //删除
+	UserDocStatus_PermanentlyDelete UserDocStatus = 2 //永久删除
+)
+
+// Enum value maps for UserDocStatus.
+var (
+	UserDocStatus_name = map[int32]string{
+		0: "Normal",
+		1: "LogicDelete",
+		2: "PermanentlyDelete",
+	}
+	UserDocStatus_value = map[string]int32{
+		"Normal":            0,
+		"LogicDelete":       1,
+		"PermanentlyDelete": 2,
+	}
+)
+
+func (x UserDocStatus) Enum() *UserDocStatus {
+	p := new(UserDocStatus)
+	*p = x
+	return p
+}
+
+func (x UserDocStatus) String() string {
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserDocStatus) Descriptor() protoreflect.EnumDescriptor {
+	return file_userlib_proto_enumTypes[2].Descriptor()
+}
+
+func (UserDocStatus) Type() protoreflect.EnumType {
+	return &file_userlib_proto_enumTypes[2]
+}
+
+func (x UserDocStatus) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use UserDocStatus.Descriptor instead.
+func (UserDocStatus) EnumDescriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{2}
+}
+
+//用户收藏|转存
+type UserCollectRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //用户id
+	DocId  string `protobuf:"bytes,2,opt,name=docId,proto3" json:"docId,omitempty"`   //文档id
+	Cost   int32  `protobuf:"varint,3,opt,name=cost,proto3" json:"cost,omitempty"`    //收藏|转存费用
+	AppId  string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"`   //剑鱼标识
+}
+
+func (x *UserCollectRequest) Reset() {
+	*x = UserCollectRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserCollectRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCollectRequest) ProtoMessage() {}
+
+func (x *UserCollectRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[0]
+	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 UserCollectRequest.ProtoReflect.Descriptor instead.
+func (*UserCollectRequest) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserCollectRequest) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *UserCollectRequest) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+func (x *UserCollectRequest) GetCost() int32 {
+	if x != nil {
+		return x.Cost
+	}
+	return 0
+}
+
+func (x *UserCollectRequest) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+type UserCollectResponse struct {
+	state         protoimpl.MessageState
+	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"` //响应消息
+}
+
+func (x *UserCollectResponse) Reset() {
+	*x = UserCollectResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserCollectResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCollectResponse) ProtoMessage() {}
+
+func (x *UserCollectResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[1]
+	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 UserCollectResponse.ProtoReflect.Descriptor instead.
+func (*UserCollectResponse) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserCollectResponse) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *UserCollectResponse) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+//用户取消收藏
+type UserCancelRequest 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"` //用户标识
+	AppId  string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`   //剑鱼标识
+}
+
+func (x *UserCancelRequest) Reset() {
+	*x = UserCancelRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserCancelRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCancelRequest) ProtoMessage() {}
+
+func (x *UserCancelRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[2]
+	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 UserCancelRequest.ProtoReflect.Descriptor instead.
+func (*UserCancelRequest) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserCancelRequest) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+func (x *UserCancelRequest) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *UserCancelRequest) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+type UserDeleteResponse struct {
+	state         protoimpl.MessageState
+	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"` //响应消息
+}
+
+func (x *UserDeleteResponse) Reset() {
+	*x = UserDeleteResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserDeleteResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserDeleteResponse) ProtoMessage() {}
+
+func (x *UserDeleteResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[3]
+	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 UserDeleteResponse.ProtoReflect.Descriptor instead.
+func (*UserDeleteResponse) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UserDeleteResponse) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *UserDeleteResponse) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+//用户恢复
+type UserRestoreRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	DocId string `protobuf:"bytes,1,opt,name=docId,proto3" json:"docId,omitempty"` //文档id
+}
+
+func (x *UserRestoreRequest) Reset() {
+	*x = UserRestoreRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserRestoreRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRestoreRequest) ProtoMessage() {}
+
+func (x *UserRestoreRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[4]
+	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 UserRestoreRequest.ProtoReflect.Descriptor instead.
+func (*UserRestoreRequest) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UserRestoreRequest) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+type UserRestoreResponse struct {
+	state         protoimpl.MessageState
+	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"` //响应消息
+}
+
+func (x *UserRestoreResponse) Reset() {
+	*x = UserRestoreResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserRestoreResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRestoreResponse) ProtoMessage() {}
+
+func (x *UserRestoreResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_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 UserRestoreResponse.ProtoReflect.Descriptor instead.
+func (*UserRestoreResponse) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UserRestoreResponse) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *UserRestoreResponse) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+//用户文档列表
+type UserDocsRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserId          string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`                    //用户id
+	AppId           string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`                      //剑鱼标识
+	UserDocCategory int64  `protobuf:"varint,3,opt,name=userDocCategory,proto3" json:"userDocCategory,omitempty"` //用户文档分类 0兑换的 1收藏的 2回收站的
+	Page            int64  `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
+	PageSize        int64  `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
+}
+
+func (x *UserDocsRequest) Reset() {
+	*x = UserDocsRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserDocsRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserDocsRequest) ProtoMessage() {}
+
+func (x *UserDocsRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_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 UserDocsRequest.ProtoReflect.Descriptor instead.
+func (*UserDocsRequest) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UserDocsRequest) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *UserDocsRequest) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *UserDocsRequest) GetUserDocCategory() int64 {
+	if x != nil {
+		return x.UserDocCategory
+	}
+	return 0
+}
+
+func (x *UserDocsRequest) GetPage() int64 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
+func (x *UserDocsRequest) GetPageSize() int64 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+type UserDocsResponse struct {
+	state         protoimpl.MessageState
+	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"` //响应消息
+	Count   int64       `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`    //总数
+	Data    []*UserDocs `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"`       //列表
+}
+
+func (x *UserDocsResponse) Reset() {
+	*x = UserDocsResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserDocsResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserDocsResponse) ProtoMessage() {}
+
+func (x *UserDocsResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_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 UserDocsResponse.ProtoReflect.Descriptor instead.
+func (*UserDocsResponse) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *UserDocsResponse) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *UserDocsResponse) GetMessage() string {
+	if x != nil {
+		return x.Message
+	}
+	return ""
+}
+
+func (x *UserDocsResponse) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+func (x *UserDocsResponse) GetData() []*UserDocs {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type UserRecoveryRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserDocId int32  `protobuf:"varint,1,opt,name=userDocId,proto3" json:"userDocId,omitempty"` //文档标识
+	AppId     string `protobuf:"bytes,2,opt,name=appId,proto3" json:"appId,omitempty"`          //剑鱼标识
+	UserId    string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`        //用户标识
+}
+
+func (x *UserRecoveryRequest) Reset() {
+	*x = UserRecoveryRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserRecoveryRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRecoveryRequest) ProtoMessage() {}
+
+func (x *UserRecoveryRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_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 UserRecoveryRequest.ProtoReflect.Descriptor instead.
+func (*UserRecoveryRequest) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *UserRecoveryRequest) GetUserDocId() int32 {
+	if x != nil {
+		return x.UserDocId
+	}
+	return 0
+}
+
+func (x *UserRecoveryRequest) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+func (x *UserRecoveryRequest) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+type MergeInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	MergeUser  string `protobuf:"bytes,1,opt,name=mergeUser,proto3" json:"mergeUser,omitempty"`   //合并用户
+	MergedUser string `protobuf:"bytes,2,opt,name=mergedUser,proto3" json:"mergedUser,omitempty"` //被合并用户
+	AppId      string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"`           //身份标识
+}
+
+func (x *MergeInfo) Reset() {
+	*x = MergeInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MergeInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MergeInfo) ProtoMessage() {}
+
+func (x *MergeInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_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 MergeInfo.ProtoReflect.Descriptor instead.
+func (*MergeInfo) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *MergeInfo) GetMergeUser() string {
+	if x != nil {
+		return x.MergeUser
+	}
+	return ""
+}
+
+func (x *MergeInfo) GetMergedUser() string {
+	if x != nil {
+		return x.MergedUser
+	}
+	return ""
+}
+
+func (x *MergeInfo) GetAppId() string {
+	if x != nil {
+		return x.AppId
+	}
+	return ""
+}
+
+type UserDocs struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	CreateAt      int64  `protobuf:"varint,1,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`          //创建时间
+	UpdateAt      int64  `protobuf:"varint,2,opt,name=UpdateAt,proto3" json:"UpdateAt,omitempty"`          //修改时间
+	DeletedAt     int64  `protobuf:"varint,3,opt,name=DeletedAt,proto3" json:"DeletedAt,omitempty"`        //删除时间
+	DocId         string `protobuf:"bytes,4,opt,name=DocId,proto3" json:"DocId,omitempty"`                 //文档标识
+	IsDelete      int64  `protobuf:"varint,5,opt,name=IsDelete,proto3" json:"IsDelete,omitempty"`          //是否删除,0 未删除  1 已逻辑删除 2永久删除
+	DocName       string `protobuf:"bytes,6,opt,name=DocName,proto3" json:"DocName,omitempty"`             //文档名
+	DocFileType   int64  `protobuf:"varint,7,opt,name=DocFileType,proto3" json:"DocFileType,omitempty"`    //文件类型,0-doc ,1-pdf ,2-xls 3 ppt 4- txt 5- 其他
+	DocFileSuffix string `protobuf:"bytes,8,opt,name=DocFileSuffix,proto3" json:"DocFileSuffix,omitempty"` //文件后辍
+	DocFileSize   int64  `protobuf:"varint,9,opt,name=DocFileSize,proto3" json:"DocFileSize,omitempty"`    //文件大小
+	DocPageSize   int64  `protobuf:"varint,10,opt,name=DocPageSize,proto3" json:"DocPageSize,omitempty"`   //页数
+	DocSummary    string `protobuf:"bytes,11,opt,name=DocSummary,proto3" json:"DocSummary,omitempty"`      //文档摘要
+	IsDownload    int64  `protobuf:"varint,12,opt,name=IsDownload,proto3" json:"IsDownload,omitempty"`     //是否转存0未转存1转存
+	IsCollection  int64  `protobuf:"varint,13,opt,name=IsCollection,proto3" json:"IsCollection,omitempty"` //是否收藏0未收藏1收藏
+	Cost          string `protobuf:"bytes,14,opt,name=Cost,proto3" json:"Cost,omitempty"`                  //收藏|转存费用
+	Source        int64  `protobuf:"varint,15,opt,name=source,proto3" json:"source,omitempty"`             // 来源  '文档来源:剑鱼- 1 豆丁- 2',
+	ProductType   int64  `protobuf:"varint,16,opt,name=productType,proto3" json:"productType,omitempty"`   // '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
+}
+
+func (x *UserDocs) Reset() {
+	*x = UserDocs{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_userlib_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserDocs) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserDocs) ProtoMessage() {}
+
+func (x *UserDocs) ProtoReflect() protoreflect.Message {
+	mi := &file_userlib_proto_msgTypes[10]
+	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 UserDocs.ProtoReflect.Descriptor instead.
+func (*UserDocs) Descriptor() ([]byte, []int) {
+	return file_userlib_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *UserDocs) GetCreateAt() int64 {
+	if x != nil {
+		return x.CreateAt
+	}
+	return 0
+}
+
+func (x *UserDocs) GetUpdateAt() int64 {
+	if x != nil {
+		return x.UpdateAt
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDeletedAt() int64 {
+	if x != nil {
+		return x.DeletedAt
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDocId() string {
+	if x != nil {
+		return x.DocId
+	}
+	return ""
+}
+
+func (x *UserDocs) GetIsDelete() int64 {
+	if x != nil {
+		return x.IsDelete
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDocName() string {
+	if x != nil {
+		return x.DocName
+	}
+	return ""
+}
+
+func (x *UserDocs) GetDocFileType() int64 {
+	if x != nil {
+		return x.DocFileType
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDocFileSuffix() string {
+	if x != nil {
+		return x.DocFileSuffix
+	}
+	return ""
+}
+
+func (x *UserDocs) GetDocFileSize() int64 {
+	if x != nil {
+		return x.DocFileSize
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDocPageSize() int64 {
+	if x != nil {
+		return x.DocPageSize
+	}
+	return 0
+}
+
+func (x *UserDocs) GetDocSummary() string {
+	if x != nil {
+		return x.DocSummary
+	}
+	return ""
+}
+
+func (x *UserDocs) GetIsDownload() int64 {
+	if x != nil {
+		return x.IsDownload
+	}
+	return 0
+}
+
+func (x *UserDocs) GetIsCollection() int64 {
+	if x != nil {
+		return x.IsCollection
+	}
+	return 0
+}
+
+func (x *UserDocs) GetCost() string {
+	if x != nil {
+		return x.Cost
+	}
+	return ""
+}
+
+func (x *UserDocs) GetSource() int64 {
+	if x != nil {
+		return x.Source
+	}
+	return 0
+}
+
+func (x *UserDocs) GetProductType() int64 {
+	if x != nil {
+		return x.ProductType
+	}
+	return 0
+}
+
+var File_userlib_proto protoreflect.FileDescriptor
+
+var file_userlib_proto_rawDesc = []byte{
+	0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+	0x07, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x22, 0x6c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72,
+	0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
+	0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
+	0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74,
+	0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f,
+	0x6c, 0x6c, 0x65, 0x63, 0x74, 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, 0x22, 0x57, 0x0a, 0x11, 0x55,
+	0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	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, 0x12, 0x14,
+	0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
+	0x70, 0x70, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65,
+	0x74, 0x65, 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, 0x22, 0x2a, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72,
+	0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14,
+	0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64,
+	0x6f, 0x63, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x74,
+	0x6f, 0x72, 0x65, 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, 0x22, 0x99, 0x01, 0x0a, 0x0f, 0x55, 0x73,
+	0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
+	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x75,
+	0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74,
+	0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67,
+	0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67,
+	0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x7d, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63,
+	0x73, 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, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x04,
+	0x64, 0x61, 0x74, 0x61, 0x22, 0x61, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f,
+	0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75,
+	0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
+	0x75, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70,
+	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12,
+	0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x09, 0x6d, 0x65, 0x72, 0x67, 0x65,
+	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x55, 0x73, 0x65,
+	0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x55, 0x73,
+	0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x55, 0x73,
+	0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xea, 0x03, 0x0a, 0x08, 0x75, 0x73, 0x65,
+	0x72, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
+	0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
+	0x74, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x1c, 0x0a,
+	0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x44,
+	0x6f, 0x63, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x44, 0x6f, 0x63, 0x49,
+	0x64, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x08, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18, 0x0a,
+	0x07, 0x44, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+	0x44, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x46, 0x69,
+	0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x44, 0x6f,
+	0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x6f, 0x63,
+	0x46, 0x69, 0x6c, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0d, 0x44, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12,
+	0x20, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x09,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x44, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a,
+	0x65, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x44, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53,
+	0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72,
+	0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d,
+	0x61, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
+	0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x49, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
+	0x6f, 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+	0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c,
+	0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18,
+	0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79,
+	0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
+	0x74, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x3c, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63,
+	0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x66,
+	0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e,
+	0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x46, 0x69,
+	0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x6f, 0x72, 0x64, 0x10, 0x00,
+	0x12, 0x07, 0x0a, 0x03, 0x50, 0x44, 0x46, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x58, 0x43,
+	0x45, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x50, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a,
+	0x03, 0x54, 0x58, 0x54, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x10,
+	0x05, 0x2a, 0x43, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0f,
+	0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x01, 0x12,
+	0x15, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x44, 0x65,
+	0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x32, 0xcd, 0x04, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x4c,
+	0x69, 0x62, 0x12, 0x3f, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18,
+	0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63,
+	0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c,
+	0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
+	0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
+	0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c,
+	0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x10,
+	0x44, 0x6f, 0x63, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+	0x12, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
+	0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75,
+	0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74,
+	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x44, 0x6f, 0x63,
+	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55,
+	0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x48, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12,
+	0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+	0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
+	0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x74,
+	0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44,
+	0x6f, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65,
+	0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69,
+	0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x44, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x6d,
+	0x61, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65,
+	0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72,
+	0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x4d,
+	0x65, 0x72, 0x67, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x6d,
+	0x65, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c,
+	0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72,
+	0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_userlib_proto_rawDescOnce sync.Once
+	file_userlib_proto_rawDescData = file_userlib_proto_rawDesc
+)
+
+func file_userlib_proto_rawDescGZIP() []byte {
+	file_userlib_proto_rawDescOnce.Do(func() {
+		file_userlib_proto_rawDescData = protoimpl.X.CompressGZIP(file_userlib_proto_rawDescData)
+	})
+	return file_userlib_proto_rawDescData
+}
+
+var file_userlib_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_userlib_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_userlib_proto_goTypes = []interface{}{
+	(UserDocCategory)(0),        // 0: userlib.UserDocCategory
+	(UserDocFileType)(0),        // 1: userlib.UserDocFileType
+	(UserDocStatus)(0),          // 2: userlib.UserDocStatus
+	(*UserCollectRequest)(nil),  // 3: userlib.UserCollectRequest
+	(*UserCollectResponse)(nil), // 4: userlib.UserCollectResponse
+	(*UserCancelRequest)(nil),   // 5: userlib.UserCancelRequest
+	(*UserDeleteResponse)(nil),  // 6: userlib.UserDeleteResponse
+	(*UserRestoreRequest)(nil),  // 7: userlib.UserRestoreRequest
+	(*UserRestoreResponse)(nil), // 8: userlib.UserRestoreResponse
+	(*UserDocsRequest)(nil),     // 9: userlib.UserDocsRequest
+	(*UserDocsResponse)(nil),    // 10: userlib.UserDocsResponse
+	(*UserRecoveryRequest)(nil), // 11: userlib.UserRecoveryRequest
+	(*MergeInfo)(nil),           // 12: userlib.mergeInfo
+	(*UserDocs)(nil),            // 13: userlib.userDocs
+}
+var file_userlib_proto_depIdxs = []int32{
+	13, // 0: userlib.UserDocsResponse.data:type_name -> userlib.userDocs
+	9,  // 1: userlib.UserLib.UserDocs:input_type -> userlib.UserDocsRequest
+	3,  // 2: userlib.UserLib.DocCollect:input_type -> userlib.UserCollectRequest
+	5,  // 3: userlib.UserLib.DocCancelCollect:input_type -> userlib.UserCancelRequest
+	11, // 4: userlib.UserLib.DocDelete:input_type -> userlib.UserRecoveryRequest
+	11, // 5: userlib.UserLib.DocRestore:input_type -> userlib.UserRecoveryRequest
+	3,  // 6: userlib.UserLib.DocDownload:input_type -> userlib.UserCollectRequest
+	11, // 7: userlib.UserLib.DocPermanentDelete:input_type -> userlib.UserRecoveryRequest
+	12, // 8: userlib.UserLib.UserMerge:input_type -> userlib.mergeInfo
+	10, // 9: userlib.UserLib.UserDocs:output_type -> userlib.UserDocsResponse
+	4,  // 10: userlib.UserLib.DocCollect:output_type -> userlib.UserCollectResponse
+	6,  // 11: userlib.UserLib.DocCancelCollect:output_type -> userlib.UserDeleteResponse
+	6,  // 12: userlib.UserLib.DocDelete:output_type -> userlib.UserDeleteResponse
+	8,  // 13: userlib.UserLib.DocRestore:output_type -> userlib.UserRestoreResponse
+	4,  // 14: userlib.UserLib.DocDownload:output_type -> userlib.UserCollectResponse
+	4,  // 15: userlib.UserLib.DocPermanentDelete:output_type -> userlib.UserCollectResponse
+	4,  // 16: userlib.UserLib.UserMerge:output_type -> userlib.UserCollectResponse
+	9,  // [9:17] is the sub-list for method output_type
+	1,  // [1:9] 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
+}
+
+func init() { file_userlib_proto_init() }
+func file_userlib_proto_init() {
+	if File_userlib_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_userlib_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserCollectRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserCollectResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserCancelRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserDeleteResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserRestoreRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserRestoreResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserDocsRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserDocsResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserRecoveryRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MergeInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_userlib_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserDocs); 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{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_userlib_proto_rawDesc,
+			NumEnums:      3,
+			NumMessages:   11,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_userlib_proto_goTypes,
+		DependencyIndexes: file_userlib_proto_depIdxs,
+		EnumInfos:         file_userlib_proto_enumTypes,
+		MessageInfos:      file_userlib_proto_msgTypes,
+	}.Build()
+	File_userlib_proto = out.File
+	file_userlib_proto_rawDesc = nil
+	file_userlib_proto_goTypes = nil
+	file_userlib_proto_depIdxs = nil
+}

+ 357 - 0
rpc/userlib/type/userlib/userlib_grpc.pb.go

@@ -0,0 +1,357 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
+// source: userlib.proto
+
+package userlib
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// UserLibClient is the client API for UserLib service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type UserLibClient interface {
+	UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error)
+	DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+	DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+	DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error)
+	DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error)
+}
+
+type userLibClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewUserLibClient(cc grpc.ClientConnInterface) UserLibClient {
+	return &userLibClient{cc}
+}
+
+func (c *userLibClient) UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error) {
+	out := new(UserDocsResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserDocs", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCollect", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	out := new(UserDeleteResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCancelCollect", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	out := new(UserDeleteResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDelete", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error) {
+	out := new(UserRestoreResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocRestore", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDownload", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocPermanentDelete", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserMerge", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// UserLibServer is the server API for UserLib service.
+// All implementations must embed UnimplementedUserLibServer
+// for forward compatibility
+type UserLibServer interface {
+	UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error)
+	DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
+	DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error)
+	DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error)
+	DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error)
+	DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
+	DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error)
+	UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error)
+	mustEmbedUnimplementedUserLibServer()
+}
+
+// UnimplementedUserLibServer must be embedded to have forward compatible implementations.
+type UnimplementedUserLibServer struct {
+}
+
+func (UnimplementedUserLibServer) UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserDocs not implemented")
+}
+func (UnimplementedUserLibServer) DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocCollect not implemented")
+}
+func (UnimplementedUserLibServer) DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocCancelCollect not implemented")
+}
+func (UnimplementedUserLibServer) DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocDelete not implemented")
+}
+func (UnimplementedUserLibServer) DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocRestore not implemented")
+}
+func (UnimplementedUserLibServer) DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocDownload not implemented")
+}
+func (UnimplementedUserLibServer) DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocPermanentDelete not implemented")
+}
+func (UnimplementedUserLibServer) UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserMerge not implemented")
+}
+func (UnimplementedUserLibServer) mustEmbedUnimplementedUserLibServer() {}
+
+// UnsafeUserLibServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to UserLibServer will
+// result in compilation errors.
+type UnsafeUserLibServer interface {
+	mustEmbedUnimplementedUserLibServer()
+}
+
+func RegisterUserLibServer(s grpc.ServiceRegistrar, srv UserLibServer) {
+	s.RegisterService(&UserLib_ServiceDesc, srv)
+}
+
+func _UserLib_UserDocs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserDocsRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).UserDocs(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/UserDocs",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).UserDocs(ctx, req.(*UserDocsRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCollectRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocCollect(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocCollect",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocCollect(ctx, req.(*UserCollectRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocCancelCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCancelRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocCancelCollect(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocCancelCollect",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocCancelCollect(ctx, req.(*UserCancelRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocDelete(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocDelete",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocDelete(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocRestore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocRestore(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocRestore",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocRestore(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCollectRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocDownload(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocDownload",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocDownload(ctx, req.(*UserCollectRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocPermanentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocPermanentDelete(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocPermanentDelete",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocPermanentDelete(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_UserMerge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(MergeInfo)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).UserMerge(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/UserMerge",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).UserMerge(ctx, req.(*MergeInfo))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// UserLib_ServiceDesc is the grpc.ServiceDesc for UserLib service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var UserLib_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "userlib.UserLib",
+	HandlerType: (*UserLibServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "UserDocs",
+			Handler:    _UserLib_UserDocs_Handler,
+		},
+		{
+			MethodName: "DocCollect",
+			Handler:    _UserLib_DocCollect_Handler,
+		},
+		{
+			MethodName: "DocCancelCollect",
+			Handler:    _UserLib_DocCancelCollect_Handler,
+		},
+		{
+			MethodName: "DocDelete",
+			Handler:    _UserLib_DocDelete_Handler,
+		},
+		{
+			MethodName: "DocRestore",
+			Handler:    _UserLib_DocRestore_Handler,
+		},
+		{
+			MethodName: "DocDownload",
+			Handler:    _UserLib_DocDownload_Handler,
+		},
+		{
+			MethodName: "DocPermanentDelete",
+			Handler:    _UserLib_DocPermanentDelete_Handler,
+		},
+		{
+			MethodName: "UserMerge",
+			Handler:    _UserLib_UserMerge_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "userlib.proto",
+}

+ 5 - 3
rpc/userlib/userlib.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 	"app.yhyue.com/moapp/jy_docs/services/model"
 	userLibService "app.yhyue.com/moapp/jy_docs/services/userlib"
 	jyDocsRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
@@ -15,13 +16,14 @@ import (
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/config"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/server"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
+
 var configFile = flag.String("f", "etc/userlib.yaml", "the config file")
+
 func main() {
 	flag.Parse()
 	conf.MustLoad(*configFile, &config.Configs)
@@ -74,7 +76,7 @@ func rateLimitInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
 	if flag {
 		log.Println("接口调用日志记录成功")
 	}
-	return resp,err
+	return resp, err
 }
 
 // Strval 获取变量的字符串值
@@ -133,4 +135,4 @@ func Strval(value interface{}) string {
 	}
 
 	return key
-}
+}

+ 3 - 0
rpc/userlib/userlib.proto

@@ -1,5 +1,6 @@
 syntax = "proto3";
 package userlib;
+option go_package = "./userlib";
 
 //用户文档类别
 enum UserDocCategory {
@@ -95,6 +96,8 @@ message userDocs {
     int64 	IsDownload=12;//是否转存0未转存1转存
     int64	IsCollection=13;//是否收藏0未收藏1收藏
     string	Cost=14;//收藏|转存费用
+    int64 source = 15;// 来源  '文档来源:剑鱼- 1 豆丁- 2',
+    int64 productType = 16;// '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 service  UserLib {
     rpc UserDocs(UserDocsRequest) returns (UserDocsResponse);//用户文档列表

+ 88 - 0
rpc/userlib/userlib/userlib.go

@@ -0,0 +1,88 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: userlib.proto
+
+package userlib
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
+
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+type (
+	MergeInfo           = userlib.MergeInfo
+	UserCancelRequest   = userlib.UserCancelRequest
+	UserCollectRequest  = userlib.UserCollectRequest
+	UserCollectResponse = userlib.UserCollectResponse
+	UserDeleteResponse  = userlib.UserDeleteResponse
+	UserDocs            = userlib.UserDocs
+	UserDocsRequest     = userlib.UserDocsRequest
+	UserDocsResponse    = userlib.UserDocsResponse
+	UserRecoveryRequest = userlib.UserRecoveryRequest
+	UserRestoreRequest  = userlib.UserRestoreRequest
+	UserRestoreResponse = userlib.UserRestoreResponse
+
+	UserLib interface {
+		UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error)
+		DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+		DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+		DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error)
+		DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	}
+
+	defaultUserLib struct {
+		cli zrpc.Client
+	}
+)
+
+func NewUserLib(cli zrpc.Client) UserLib {
+	return &defaultUserLib{
+		cli: cli,
+	}
+}
+
+func (m *defaultUserLib) UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.UserDocs(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocCollect(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocCancelCollect(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocDelete(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocRestore(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocDownload(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocPermanentDelete(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.UserMerge(ctx, in, opts...)
+}

+ 3 - 0
services/model/stdlib.go

@@ -58,6 +58,9 @@ type UserDoc struct {
 	PreviewImgId    string    `json:"preview_img_id" gorm:"column:previewImgId"`
 	PreviewImgUrl   string    `json:"preview_img_url" gorm:"column:previewImgUrl"`
 	Cost            string    `json:"cost" gorm:"column:cost"`
+	Source          int64     `json:"source" gorm:"column:source"`
+	ProductType     int64     `json:"product_type" gorm:"column:product_type" `
+	DocTags         string    `json:"docTags" gorm:"column:docTags"`
 }
 
 func (ud *UserDoc) TableName() string {

+ 10 - 11
services/userlib/userDocService.go

@@ -1,18 +1,18 @@
 package userlib
 
 import (
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 	"errors"
 	"fmt"
 	"log"
 	"time"
 
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 	"app.yhyue.com/moapp/jy_docs/services/model"
 	docRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
 	"gorm.io/gorm"
 )
 
-//文档收藏
+// 文档收藏
 func UserDocCollect(userDoc *model.UserDoc) bool {
 	log.Println("UserDocCollect exec ......")
 	orm := docRpcUtil.GetJyDocsDB()
@@ -86,7 +86,7 @@ func UserDocCollect(userDoc *model.UserDoc) bool {
 	return true
 }
 
-//文档取消收藏
+// 文档取消收藏
 func UserDocCancelCollect(docId, userId, appId string) bool {
 	orm := docRpcUtil.GetJyDocsDB()
 	err := orm.Transaction(func(tx *gorm.DB) error {
@@ -120,7 +120,7 @@ func UserDocCancelCollect(docId, userId, appId string) bool {
 	return true
 }
 
-//兑换操作
+// 兑换操作
 func UserDocDownload(userDoc *model.UserDoc, cost int) (bool, string) {
 	log.Println("UserDocCollect exec ......")
 	msg := "兑换成功"
@@ -249,7 +249,7 @@ func UserDocDownload(userDoc *model.UserDoc, cost int) (bool, string) {
 	return true, msg
 }
 
-//文档删除
+// 文档删除
 func UserDocDelete(userDocId int32, appId, userId string) (bool, string) {
 	msg := "文档删除成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
@@ -278,7 +278,7 @@ func UserDocDelete(userDocId int32, appId, userId string) (bool, string) {
 
 }
 
-//文档回收
+// 文档回收
 func UserDocRestore(userDocId int32, appId, userId string) (bool, string) {
 	msg := "文档找回成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
@@ -334,7 +334,7 @@ func UserDocPermanentDelete(userDocId int32, appId, userId string) (bool, string
 
 }
 
-//我的文库列表(包括回收站列表)0兑换的 1收藏的 2回收站的
+// 我的文库列表(包括回收站列表)0兑换的 1收藏的 2回收站的
 func UserDocsList(in *userlib.UserDocsRequest) ([]*model.UserDoc, int64, bool, string) {
 	msg := "查询成功"
 	data := []*model.UserDoc{}
@@ -354,9 +354,8 @@ func UserDocsList(in *userlib.UserDocsRequest) ([]*model.UserDoc, int64, bool, s
 			}
 		case int64(1):
 			//收藏的
-			err := docRpcUtil.GetJyDocsDB().Table("user_doc").Where(" userId=? and isCollection=1 and appId=? ", in.UserId, in.AppId).Find(&data)
-			count = int64(len(data))
-			err = docRpcUtil.GetJyDocsDB().Table("user_doc").Where("userId=? and isCollection=1 and appId=? order by create_at desc  limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
+			err := docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT count(*) FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id)  where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 ", in.UserId, in.AppId).Count(&count)
+			err = docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT ud.create_at,ud.update_at,ud.docCategory,ud.isDownload,ud.isCollection,d.price as cost,d.docTags,d.docFileType,d.docName,d.docFileSuffix,d.docFileSize,d.docPageSize,d.docSummary,d.source,d.product_type FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id)  where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0   order by create_at desc  limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
 			if err.Error != nil {
 				log.Println("查询收藏记录失败:", err)
 				msg = "查询收藏记录失败"
@@ -399,7 +398,7 @@ func InterfaceLog(in *model.InterfaceLog) bool {
 	return true
 }
 
-//账号合并
+// 账号合并
 func UserMerge(mergeUser, mergedUser, appId string) (bool, string) {
 	log.Println("UserMerge exec ......")
 	orm := docRpcUtil.GetJyDocsDB()