WH01243 4 anni fa
parent
commit
e92cc49c51

+ 1 - 1
rpc/userlib/internal/logic/docdeletelogic.go

@@ -27,7 +27,7 @@ func NewDocDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocDele
 func (l *DocDeleteLogic) DocDelete(in *userlib.UserRecoveryRequest) (*userlib.UserDeleteResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &userlib.UserDeleteResponse{}
-	code,msg:= userLibService.UserDocDelete(in.UserDocId,in.AppId)
+	code,msg:= userLibService.UserDocDelete(in.UserDocId,in.AppId,in.UserId)
 	if code {
 		result.Code = 1
 		result.Message = msg

+ 1 - 2
rpc/userlib/internal/logic/docdownloadlogic.go

@@ -1,7 +1,6 @@
 package logic
 
 import (
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/config"
 	"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/services/model"
@@ -33,7 +32,7 @@ func (l *DocDownloadLogic) DocDownload(in *userlib.UserCollectRequest) (*userlib
 			UserId: in.UserId,
 			DocId:  in.DocId,
 			AppId:  in.AppId,
-		}, int(in.Cost), config.Configs.FileSystemConf.Etcd.Hosts, config.Configs.FileSystemConf.Etcd.Key)
+		}, int(in.Cost))
 	log.Printf("用户文档收藏,userId:[%s],docId:[%s] 是否成功:[%v]", in.UserId, in.DocId, b)
 	if b {
 		return &userlib.UserCollectResponse{

+ 1 - 1
rpc/userlib/internal/logic/docpermanentdeletelogic.go

@@ -26,7 +26,7 @@ func NewDocPermanentDeleteLogic(ctx context.Context, svcCtx *svc.ServiceContext)
 func (l *DocPermanentDeleteLogic) DocPermanentDelete(in *userlib.UserRecoveryRequest) (*userlib.UserCollectResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &userlib.UserCollectResponse{}
-	code,msg:= userLibService.UserDocPermanentDelete(in.UserDocId,in.AppId)
+	code,msg:= userLibService.UserDocPermanentDelete(in.UserDocId,in.AppId,in.UserId)
 	if code {
 		result.Code = 1
 		result.Message = msg

+ 1 - 1
rpc/userlib/internal/logic/docrestorelogic.go

@@ -26,7 +26,7 @@ func NewDocRestoreLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocRes
 func (l *DocRestoreLogic) DocRestore(in *userlib.UserRecoveryRequest) (*userlib.UserRestoreResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &userlib.UserRestoreResponse{}
-	code,msg:= userLibService.UserDocRestore(in.UserDocId,in.AppId)
+	code,msg:= userLibService.UserDocRestore(in.UserDocId,in.AppId,in.UserId)
 	if code {
 		result.Code = 1
 		result.Message =msg

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

@@ -58,6 +58,7 @@ func Test_UserDocDelete(t *testing.T)  {
 	resp, err := userLib.DocDelete(context.Background(), &userlibclient.UserRecoveryRequest{
 		UserDocId: int32(13),
 		AppId:int64(10000),
+		UserId:       "wh11",
 	})
 	if err != nil {
 		log.Println("UserDoc Collect call error:", err)
@@ -76,6 +77,7 @@ func Test_UserDocRestore(t *testing.T)  {
 	resp, err := userLib.DocRestore(context.Background(), &userlibclient.UserRecoveryRequest{
 		UserDocId: int32(10),
 		AppId:int64(10000),
+		UserId:       "wh11",
 	})
 	if err != nil {
 		log.Println("UserDoc Collect call error:", err)
@@ -94,6 +96,7 @@ func Test_UserDocPermanentDelete(t *testing.T)  {
 	resp, err := userLib.DocPermanentDelete(context.Background(), &userlibclient.UserRecoveryRequest{
 		UserDocId: int32(10),
 		AppId:int64(10000),
+		UserId:       "wh11",
 	})
 	if err != nil {
 		log.Println("UserDoc Collect call error:", err)

+ 2 - 1
rpc/userlib/userlib.proto

@@ -65,8 +65,9 @@ message UserDocsResponse {
     repeated userDocs data=4; //列表
 }
 message UserRecoveryRequest {
-    int32 userDocId =1;   //记录标识
+    int32 userDocId =1;   //文档标识
     int64 appId=2;//剑鱼标识
+    string userId=3;//用户标识
 }
 enum UserDocStatus {
     Normal =0;//文件正常

+ 93 - 83
rpc/userlib/userlib/userlib.pb.go

@@ -684,8 +684,9 @@ type UserRecoveryRequest struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserDocId int32 `protobuf:"varint,1,opt,name=userDocId,proto3" json:"userDocId,omitempty"` //记录标识
-	AppId     int64 `protobuf:"varint,2,opt,name=appId,proto3" json:"appId,omitempty"`         //剑鱼标识
+	UserDocId int32  `protobuf:"varint,1,opt,name=userDocId,proto3" json:"userDocId,omitempty"` //文档标识
+	AppId     int64  `protobuf:"varint,2,opt,name=appId,proto3" json:"appId,omitempty"`         //剑鱼标识
+	UserId    string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`        //用户标识
 }
 
 func (x *UserRecoveryRequest) Reset() {
@@ -734,6 +735,13 @@ func (x *UserRecoveryRequest) GetAppId() int64 {
 	return 0
 }
 
+func (x *UserRecoveryRequest) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
 type UserDocs struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -965,93 +973,95 @@ var file_userlib_proto_rawDesc = []byte{
 	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, 0x49, 0x0a, 0x13,
+	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, 0x03,
-	0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xa6, 0x04, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
-	0x44, 0x6f, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x02, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74,
-	0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09,
-	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70,
-	0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64,
-	0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x44, 0x6f, 0x63, 0x49,
-	0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x20,
-	0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x08, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x0b, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
-	0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x09, 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, 0x0a, 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, 0x0b, 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, 0x0c, 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, 0x0d, 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,
-	0x0e, 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, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61,
-	0x72, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55,
-	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x44, 0x6f, 0x63,
-	0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
-	0x49, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x11, 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, 0x12, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
-	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, 0x8e, 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, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+	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,
+	0xa6, 0x04, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x0e, 0x0a, 0x02,
+	0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08,
+	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61,
+	0x74, 0x65, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x55, 0x70, 0x64, 0x61,
+	0x74, 0x65, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41,
+	0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64,
+	0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x12, 0x14, 0x0a, 0x05, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74,
+	0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x44, 0x6f, 0x63,
+	0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x44, 0x65,
+	0x6c, 0x65, 0x74, 0x65, 0x18, 0x09, 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,
+	0x0a, 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, 0x0b, 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, 0x0c, 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, 0x0d, 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, 0x0e, 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, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+	0x44, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x44, 0x6f,
+	0x63, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0f, 0x44, 0x6f, 0x63, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f,
+	0x61, 0x64, 0x18, 0x11, 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, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x49, 0x73, 0x43, 0x6f,
+	0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 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, 0x8e, 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, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 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, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (

+ 5 - 5
rpc/userlib/userlibclient/userlib.go

@@ -14,16 +14,16 @@ import (
 )
 
 type (
-	UserDeleteResponse  = userlib.UserDeleteResponse
-	UserRecoveryRequest = userlib.UserRecoveryRequest
-	UserCollectRequest  = userlib.UserCollectRequest
 	UserCollectResponse = userlib.UserCollectResponse
 	UserDeleteRequest   = userlib.UserDeleteRequest
-	UserDocsResponse    = userlib.UserDocsResponse
-	UserDocs            = userlib.UserDocs
+	UserDeleteResponse  = userlib.UserDeleteResponse
 	UserRestoreRequest  = userlib.UserRestoreRequest
 	UserRestoreResponse = userlib.UserRestoreResponse
+	UserDocs            = userlib.UserDocs
+	UserCollectRequest  = userlib.UserCollectRequest
 	UserDocsRequest     = userlib.UserDocsRequest
+	UserDocsResponse    = userlib.UserDocsResponse
+	UserRecoveryRequest = userlib.UserRecoveryRequest
 
 	UserLib interface {
 		UserDocs(ctx context.Context, in *UserDocsRequest) (*UserDocsResponse, error)

+ 10 - 26
services/userlib/userDocService.go

@@ -107,7 +107,7 @@ func UserDocCancelCollect(userDocId string) bool {
 }
 
 //兑换操作
-func UserDocDownload(userDoc *model.UserDoc, cost int, hosts []string, key string) (bool, string) {
+func UserDocDownload(userDoc *model.UserDoc, cost int) (bool, string) {
 	log.Println("UserDocCollect exec ......")
 	msg := "兑换成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
@@ -235,25 +235,19 @@ func UserDocDownload(userDoc *model.UserDoc, cost int, hosts []string, key strin
 }
 
 //文档删除
-func UserDocDelete(userDocId int32, appId int64) (bool, string) {
+func UserDocDelete(userDocId int32, appId int64,userId string) (bool, string) {
 	msg := "文档删除成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
 		//逻辑删除
-		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? WHERE id = ?", model.UserDocStatus_LogicDelete, userDocId).Error
+		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? WHERE docId = ? and  userId=? and appId=?", model.UserDocStatus_LogicDelete, userDocId,userId,appId).Error
 		if err != nil {
 			msg = "文档删除失败"
 			log.Println("文档删除失败:", err)
 			tx.Rollback()
 			return err
 		}
-
-		docData := model.UserDoc{}
-		//查询用户文档详情
-		docRpcUtil.GetJyDocsDB().Select("userId,docId").First(&docData, userDocId)
-		log.Println(docData.UserId)
-		log.Println(docData.DocId)
 		//删除记录新增
-		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)", docData.DocId, docData.UserId, time.Now(), 1, appId).Error
+		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)",userDocId, userId, time.Now(), 1, appId).Error
 		if err != nil {
 			tx.Rollback()
 			msg = "删除记录新增失败"
@@ -270,24 +264,19 @@ func UserDocDelete(userDocId int32, appId int64) (bool, string) {
 }
 
 //文档回收
-func UserDocRestore(userDocId int32, appId int64) (bool, string) {
+func UserDocRestore(userDocId int32, appId int64,userId string) (bool, string) {
 	msg := "文档找回成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
 		//逻辑删除
-		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? WHERE id = ?", model.UserDocStatus_Normal, userDocId).Error
+		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? WHERE docId = ? and  userId=? and  appId=?", model.UserDocStatus_Normal, userDocId,userId,appId).Error
 		if err != nil {
 			msg = "文档找回失败"
 			log.Println("文档找回失败:", err)
 			tx.Rollback()
 			return err
 		}
-		docData := model.UserDoc{}
-		//查询用户文档详情
-		docRpcUtil.GetJyDocsDB().Select("userId,docId").First(&docData, userDocId)
-		log.Println(docData.UserId)
-		log.Println(docData.DocId)
 		//删除记录新增
-		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)", docData.DocId, docData.UserId, time.Now(), 2, appId).Error
+		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)", userDocId, userId, time.Now(), 2, appId).Error
 		if err != nil {
 			tx.Rollback()
 			msg = "删除记录新增失败"
@@ -302,24 +291,19 @@ func UserDocRestore(userDocId int32, appId int64) (bool, string) {
 	return true, msg
 
 } //永久删除
-func UserDocPermanentDelete(userDocId int32, appId int64) (bool, string) {
+func UserDocPermanentDelete(userDocId int32, appId int64,userId string) (bool, string) {
 	msg := "永久删除成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
 		//逻辑删除
-		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? ,isDownload=0 WHERE id = ?", model.UserDocStatus_PermanentlyDelete, userDocId).Error
+		err := docRpcUtil.GetJyDocsDB().Exec("UPDATE user_doc SET isDelete = ? ,isDownload=0 WHERE docId = ? and  userId=? and  appId=?", model.UserDocStatus_PermanentlyDelete, userDocId,userId,appId).Error
 		if err != nil {
 			msg = "永久删除失败"
 			log.Println("永久删除失败:", err)
 			tx.Rollback()
 			return err
 		}
-		docData := model.UserDoc{}
-		//查询用户文档详情
-		docRpcUtil.GetJyDocsDB().Select("userId,docId").First(&docData, userDocId)
-		log.Println(docData.UserId)
-		log.Println(docData.DocId)
 		//删除记录新增
-		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)", docData.DocId, docData.UserId, time.Now(), 4, appId).Error
+		err = docRpcUtil.GetJyDocsDB().Exec("insert into del_record (docId, userId, date, operate, appId) values (?,?,?,?,?)", userDocId, userId, time.Now(), 4, appId).Error
 		if err != nil {
 			tx.Rollback()
 			msg = "删除记录新增失败"

+ 1 - 2
services/util/baseInit.go

@@ -1,14 +1,13 @@
 package util
 
 import (
-	"log"
-
 	elastic "app.yhyue.com/moapp/jybase/esv7"
 	"app.yhyue.com/moapp/jybase/mysql"
 	"app.yhyue.com/moapp/jyfs/rpc/filesystemclient"
 	"github.com/tal-tech/go-zero/core/discov"
 	"github.com/tal-tech/go-zero/zrpc"
 	"gorm.io/gorm"
+	"log"
 )
 
 type MysqlDBConfig struct {