diff --git a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.pb.go b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.pb.go index 2656f54e..bcc26fcb 100644 --- a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.pb.go +++ b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.pb.go @@ -42,7 +42,7 @@ type SetCorrArg struct { //角色ID RoleId string `protobuf:"bytes,1,opt,name=RoleId,proto3" json:"RoleId,omitempty"` //菜单ID - MenuId []string `protobuf:"bytes,2,rep,name=MenuId,proto3" json:"MenuId,omitempty"` + MenuIds []string `protobuf:"bytes,2,rep,name=MenuIds,proto3" json:"MenuIds,omitempty"` } func (x *SetCorrArg) Reset() { @@ -84,9 +84,9 @@ func (x *SetCorrArg) GetRoleId() string { return "" } -func (x *SetCorrArg) GetMenuId() []string { +func (x *SetCorrArg) GetMenuIds() []string { if x != nil { - return x.MenuId + return x.MenuIds } return nil } @@ -216,36 +216,36 @@ var File_BaseRoleMenu_proto protoreflect.FileDescriptor var file_BaseRoleMenu_proto_rawDesc = []byte{ 0x0a, 0x12, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, - 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x41, 0x72, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4d, - 0x65, 0x6e, 0x75, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, - 0x41, 0x72, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x65, 0x0a, 0x05, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4c, 0x69, - 0x73, 0x74, 0x32, 0xb8, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, - 0x65, 0x6e, 0x75, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x43, 0x6f, 0x72, 0x72, - 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x41, 0x72, 0x67, 0x1a, - 0x18, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x13, 0x53, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x4d, 0x65, 0x6e, 0x75, 0x49, 0x64, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x72, 0x72, 0x41, 0x72, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x65, 0x0a, + 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x4c, 0x69, 0x73, 0x74, 0x32, 0xb8, 0x01, 0x0a, 0x12, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x43, 0x6f, 0x72, 0x72, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, - 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x41, 0x72, + 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, 0x41, 0x72, 0x67, 0x1a, 0x18, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x40, 0x0a, - 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x2e, 0x64, 0x73, 0x6d, - 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, 0x01, 0x5a, 0x13, 0x2e, 0x3b, 0x42, 0x61, 0x73, 0x65, 0x52, - 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, 0x00, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, + 0x13, 0x53, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, + 0x43, 0x6f, 0x72, 0x72, 0x12, 0x1d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, + 0x65, 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x72, 0x72, + 0x41, 0x72, 0x67, 0x1a, 0x18, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, + 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, + 0x40, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x73, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x2e, 0x64, + 0x73, 0x6d, 0x69, 0x6e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0c, 0x42, 0x61, 0x73, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, 0x01, 0x5a, 0x13, 0x2e, 0x3b, 0x42, 0x61, 0x73, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x6e, 0x75, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0xa2, 0x02, + 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.proto b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.proto index 8983680c..3565289e 100644 --- a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.proto +++ b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuProto/BaseRoleMenu.proto @@ -24,7 +24,7 @@ message SetCorrArg { //角色ID string RoleId = 1; //菜单ID - repeated string MenuId = 2; + repeated string MenuIds = 2; } message GetCorrArg{ diff --git a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuService/BaseRoleMenuService.go b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuService/BaseRoleMenuService.go index 86e76551..2a087a8c 100644 --- a/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuService/BaseRoleMenuService.go +++ b/dsBaseRpc/RpcService/BaseRoleMenu/BaseRoleMenuService/BaseRoleMenuService.go @@ -50,10 +50,10 @@ func (s *Rpc) SetBaseRoleMenuCorr(ctx context.Context, in *BaseRoleMenuProto.Set //声明实体数组 modelArray := make([]models.TBaseRoleMenu, 0) //循环添加班级 - for i := 0; i <= len(in.MenuId); i++ { + for i := 0; i <= len(in.MenuIds); i++ { model := new(models.TBaseRoleMenu) model.Id = CommonUtil.GetUUID() - model.MenuId = in.MenuId[i] + model.MenuId = in.MenuIds[i] model.RoleId = in.RoleId model.BUse = 1 //添加到实体数组