diff --git a/api/reports/reports.pb.go b/api/reports/reports.pb.go index 9091ef7..1934638 100644 --- a/api/reports/reports.pb.go +++ b/api/reports/reports.pb.go @@ -945,6 +945,392 @@ func (x *QuarterlyReport) GetOperatorId() int32 { return 0 } +type AddQuarterlyReportReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName"` //文件名称 + FileIntroduce string `protobuf:"bytes,2,opt,name=fileIntroduce,proto3" json:"fileIntroduce"` //文件介绍 + Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment"` //附件 + AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName"` //附件名称 + Operator string `protobuf:"bytes,5,opt,name=operator,proto3" json:"operator"` //操作人 + OperatorId int32 `protobuf:"varint,6,opt,name=operatorId,proto3" json:"operatorId"` //操作人Id +} + +func (x *AddQuarterlyReportReq) Reset() { + *x = AddQuarterlyReportReq{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddQuarterlyReportReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddQuarterlyReportReq) ProtoMessage() {} + +func (x *AddQuarterlyReportReq) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[13] + 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 AddQuarterlyReportReq.ProtoReflect.Descriptor instead. +func (*AddQuarterlyReportReq) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{13} +} + +func (x *AddQuarterlyReportReq) GetFileName() string { + if x != nil { + return x.FileName + } + return "" +} + +func (x *AddQuarterlyReportReq) GetFileIntroduce() string { + if x != nil { + return x.FileIntroduce + } + return "" +} + +func (x *AddQuarterlyReportReq) GetAttachment() string { + if x != nil { + return x.Attachment + } + return "" +} + +func (x *AddQuarterlyReportReq) GetAttachmentName() string { + if x != nil { + return x.AttachmentName + } + return "" +} + +func (x *AddQuarterlyReportReq) GetOperator() string { + if x != nil { + return x.Operator + } + return "" +} + +func (x *AddQuarterlyReportReq) GetOperatorId() int32 { + if x != nil { + return x.OperatorId + } + return 0 +} + +type AddQuarterlyReportResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` +} + +func (x *AddQuarterlyReportResp) Reset() { + *x = AddQuarterlyReportResp{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddQuarterlyReportResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddQuarterlyReportResp) ProtoMessage() {} + +func (x *AddQuarterlyReportResp) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[14] + 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 AddQuarterlyReportResp.ProtoReflect.Descriptor instead. +func (*AddQuarterlyReportResp) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{14} +} + +func (x *AddQuarterlyReportResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type EditQuarterlyReportReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` //id + FileName string `protobuf:"bytes,2,opt,name=fileName,proto3" json:"fileName"` //文件名称 + FileIntroduce string `protobuf:"bytes,3,opt,name=fileIntroduce,proto3" json:"fileIntroduce"` //文件介绍 + Attachment string `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment"` //附件 + AttachmentName string `protobuf:"bytes,5,opt,name=attachmentName,proto3" json:"attachmentName"` //附件名称 + Sort int32 `protobuf:"varint,6,opt,name=sort,proto3" json:"sort"` //排序 + Status int32 `protobuf:"varint,7,opt,name=status,proto3" json:"status"` //状态(1:上架,2:下架) + Operator string `protobuf:"bytes,8,opt,name=operator,proto3" json:"operator"` //操作人 + OperatorId int32 `protobuf:"varint,9,opt,name=operatorId,proto3" json:"operatorId"` //操作人Id +} + +func (x *EditQuarterlyReportReq) Reset() { + *x = EditQuarterlyReportReq{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EditQuarterlyReportReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EditQuarterlyReportReq) ProtoMessage() {} + +func (x *EditQuarterlyReportReq) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[15] + 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 EditQuarterlyReportReq.ProtoReflect.Descriptor instead. +func (*EditQuarterlyReportReq) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{15} +} + +func (x *EditQuarterlyReportReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *EditQuarterlyReportReq) GetFileName() string { + if x != nil { + return x.FileName + } + return "" +} + +func (x *EditQuarterlyReportReq) GetFileIntroduce() string { + if x != nil { + return x.FileIntroduce + } + return "" +} + +func (x *EditQuarterlyReportReq) GetAttachment() string { + if x != nil { + return x.Attachment + } + return "" +} + +func (x *EditQuarterlyReportReq) GetAttachmentName() string { + if x != nil { + return x.AttachmentName + } + return "" +} + +func (x *EditQuarterlyReportReq) GetSort() int32 { + if x != nil { + return x.Sort + } + return 0 +} + +func (x *EditQuarterlyReportReq) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *EditQuarterlyReportReq) GetOperator() string { + if x != nil { + return x.Operator + } + return "" +} + +func (x *EditQuarterlyReportReq) GetOperatorId() int32 { + if x != nil { + return x.OperatorId + } + return 0 +} + +type EditQuarterlyReportResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` +} + +func (x *EditQuarterlyReportResp) Reset() { + *x = EditQuarterlyReportResp{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EditQuarterlyReportResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EditQuarterlyReportResp) ProtoMessage() {} + +func (x *EditQuarterlyReportResp) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[16] + 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 EditQuarterlyReportResp.ProtoReflect.Descriptor instead. +func (*EditQuarterlyReportResp) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{16} +} + +func (x *EditQuarterlyReportResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type DeleteQuarterlyReportReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` +} + +func (x *DeleteQuarterlyReportReq) Reset() { + *x = DeleteQuarterlyReportReq{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQuarterlyReportReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQuarterlyReportReq) ProtoMessage() {} + +func (x *DeleteQuarterlyReportReq) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[17] + 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 DeleteQuarterlyReportReq.ProtoReflect.Descriptor instead. +func (*DeleteQuarterlyReportReq) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{17} +} + +func (x *DeleteQuarterlyReportReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +type DeleteQuarterlyReportResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` +} + +func (x *DeleteQuarterlyReportResp) Reset() { + *x = DeleteQuarterlyReportResp{} + if protoimpl.UnsafeEnabled { + mi := &file_api_reports_reports_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteQuarterlyReportResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteQuarterlyReportResp) ProtoMessage() {} + +func (x *DeleteQuarterlyReportResp) ProtoReflect() protoreflect.Message { + mi := &file_api_reports_reports_proto_msgTypes[18] + 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 DeleteQuarterlyReportResp.ProtoReflect.Descriptor instead. +func (*DeleteQuarterlyReportResp) Descriptor() ([]byte, []int) { + return file_api_reports_reports_proto_rawDescGZIP(), []int{18} +} + +func (x *DeleteQuarterlyReportResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + var File_api_reports_reports_proto protoreflect.FileDescriptor var file_api_reports_reports_proto_rawDesc = []byte{ @@ -1053,37 +1439,97 @@ var file_api_reports_reports_proto_rawDesc = []byte{ 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x32, 0xbc, 0x03, - 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x1f, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, - 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x1a, 0x20, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x05, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0xdd, 0x01, + 0x0a, 0x15, 0x41, 0x64, 0x64, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, + 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x2a, 0x0a, + 0x16, 0x41, 0x64, 0x64, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x9a, 0x02, 0x0a, 0x16, 0x45, 0x64, + 0x69, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x74, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, + 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, + 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x17, 0x45, 0x64, 0x69, 0x74, 0x51, 0x75, + 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6d, 0x73, 0x67, 0x22, 0x2a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x61, + 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x2d, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, + 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xcd, + 0x05, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x1f, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x45, 0x64, 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x64, - 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x55, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x75, - 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, + 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, + 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x45, 0x64, 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1c, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x45, + 0x64, 0x69, 0x74, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, + 0x75, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x75, 0x61, 0x6c, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0c, 0x5a, 0x0a, - 0x2e, 0x2f, 0x3b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, + 0x12, 0x41, 0x64, 0x64, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a, 0x13, 0x45, 0x64, 0x69, 0x74, 0x51, 0x75, 0x61, 0x72, + 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x2e, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, + 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x51, 0x75, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5e, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, + 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, + 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x51, 0x75, 0x61, 0x72, 0x74, + 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0c, + 0x5a, 0x0a, 0x2e, 0x2f, 0x3b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1098,7 +1544,7 @@ func file_api_reports_reports_proto_rawDescGZIP() []byte { return file_api_reports_reports_proto_rawDescData } -var file_api_reports_reports_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_api_reports_reports_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_api_reports_reports_proto_goTypes = []interface{}{ (*Filtrate)(nil), // 0: reports.Filtrate (*GetAnnualReportListReq)(nil), // 1: reports.GetAnnualReportListReq @@ -1113,6 +1559,12 @@ var file_api_reports_reports_proto_goTypes = []interface{}{ (*GetQuarterlyReportListReq)(nil), // 10: reports.GetQuarterlyReportListReq (*GetQuarterlyReportListResp)(nil), // 11: reports.GetQuarterlyReportListResp (*QuarterlyReport)(nil), // 12: reports.QuarterlyReport + (*AddQuarterlyReportReq)(nil), // 13: reports.AddQuarterlyReportReq + (*AddQuarterlyReportResp)(nil), // 14: reports.AddQuarterlyReportResp + (*EditQuarterlyReportReq)(nil), // 15: reports.EditQuarterlyReportReq + (*EditQuarterlyReportResp)(nil), // 16: reports.EditQuarterlyReportResp + (*DeleteQuarterlyReportReq)(nil), // 17: reports.DeleteQuarterlyReportReq + (*DeleteQuarterlyReportResp)(nil), // 18: reports.DeleteQuarterlyReportResp } var file_api_reports_reports_proto_depIdxs = []int32{ 0, // 0: reports.GetAnnualReportListReq.filtrate:type_name -> reports.Filtrate @@ -1124,13 +1576,19 @@ var file_api_reports_reports_proto_depIdxs = []int32{ 6, // 6: reports.Reports.EditAnnualReport:input_type -> reports.EditAnnualReportReq 8, // 7: reports.Reports.DeleteAnnualReport:input_type -> reports.DeleteAnnualReportReq 10, // 8: reports.Reports.GetQuarterlyReportList:input_type -> reports.GetQuarterlyReportListReq - 2, // 9: reports.Reports.GetAnnualReportList:output_type -> reports.GetAnnualReportListResp - 5, // 10: reports.Reports.AddAnnualReport:output_type -> reports.AddAnnualReportResp - 7, // 11: reports.Reports.EditAnnualReport:output_type -> reports.EditAnnualReportResp - 9, // 12: reports.Reports.DeleteAnnualReport:output_type -> reports.DeleteAnnualReportResp - 11, // 13: reports.Reports.GetQuarterlyReportList:output_type -> reports.GetQuarterlyReportListResp - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type + 13, // 9: reports.Reports.AddQuarterlyReport:input_type -> reports.AddQuarterlyReportReq + 15, // 10: reports.Reports.EditQuarterlyReport:input_type -> reports.EditQuarterlyReportReq + 17, // 11: reports.Reports.DeleteQuarterlyReport:input_type -> reports.DeleteQuarterlyReportReq + 2, // 12: reports.Reports.GetAnnualReportList:output_type -> reports.GetAnnualReportListResp + 5, // 13: reports.Reports.AddAnnualReport:output_type -> reports.AddAnnualReportResp + 7, // 14: reports.Reports.EditAnnualReport:output_type -> reports.EditAnnualReportResp + 9, // 15: reports.Reports.DeleteAnnualReport:output_type -> reports.DeleteAnnualReportResp + 11, // 16: reports.Reports.GetQuarterlyReportList:output_type -> reports.GetQuarterlyReportListResp + 14, // 17: reports.Reports.AddQuarterlyReport:output_type -> reports.AddQuarterlyReportResp + 16, // 18: reports.Reports.EditQuarterlyReport:output_type -> reports.EditQuarterlyReportResp + 18, // 19: reports.Reports.DeleteQuarterlyReport:output_type -> reports.DeleteQuarterlyReportResp + 12, // [12:20] is the sub-list for method output_type + 4, // [4:12] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name @@ -1298,6 +1756,78 @@ func file_api_reports_reports_proto_init() { return nil } } + file_api_reports_reports_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddQuarterlyReportReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_reports_reports_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddQuarterlyReportResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_reports_reports_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EditQuarterlyReportReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_reports_reports_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EditQuarterlyReportResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_reports_reports_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQuarterlyReportReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_reports_reports_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteQuarterlyReportResp); 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{ @@ -1305,7 +1835,7 @@ func file_api_reports_reports_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_reports_reports_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/api/reports/reports.proto b/api/reports/reports.proto index a8e3391..ac03c96 100644 --- a/api/reports/reports.proto +++ b/api/reports/reports.proto @@ -13,6 +13,9 @@ service Reports{ rpc DeleteAnnualReport(DeleteAnnualReportReq) returns (DeleteAnnualReportResp); //==================================季度报告====================================== rpc GetQuarterlyReportList(GetQuarterlyReportListReq) returns (GetQuarterlyReportListResp); + rpc AddQuarterlyReport(AddQuarterlyReportReq) returns (AddQuarterlyReportResp); + rpc EditQuarterlyReport(EditQuarterlyReportReq) returns (EditQuarterlyReportResp); + rpc DeleteQuarterlyReport(DeleteQuarterlyReportReq) returns (DeleteQuarterlyReportResp); } message Filtrate{ @@ -107,3 +110,39 @@ message QuarterlyReport{ int32 operatorId = 8; //操作人Id } +message AddQuarterlyReportReq{ + string fileName = 1; //文件名称 + string fileIntroduce = 2; //文件介绍 + string attachment = 3; //附件 + string attachmentName = 4; //附件名称 + string operator = 5; //操作人 + int32 operatorId = 6; //操作人Id +} + +message AddQuarterlyReportResp{ + string msg = 1; +} + +message EditQuarterlyReportReq{ + int32 id = 1; //id + string fileName = 2; //文件名称 + string fileIntroduce = 3; //文件介绍 + string attachment = 4; //附件 + string attachmentName = 5; //附件名称 + int32 sort = 6; //排序 + int32 status = 7; //状态(1:上架,2:下架) + string operator = 8; //操作人 + int32 operatorId = 9; //操作人Id +} + +message EditQuarterlyReportResp{ + string msg = 1; +} + +message DeleteQuarterlyReportReq{ + int32 id = 1; +} + +message DeleteQuarterlyReportResp{ + string msg = 1; +} \ No newline at end of file diff --git a/api/reports/reports.validator.pb.go b/api/reports/reports.validator.pb.go index f0d3e82..14c042b 100644 --- a/api/reports/reports.validator.pb.go +++ b/api/reports/reports.validator.pb.go @@ -78,3 +78,21 @@ func (this *GetQuarterlyReportListResp) Validate() error { func (this *QuarterlyReport) Validate() error { return nil } +func (this *AddQuarterlyReportReq) Validate() error { + return nil +} +func (this *AddQuarterlyReportResp) Validate() error { + return nil +} +func (this *EditQuarterlyReportReq) Validate() error { + return nil +} +func (this *EditQuarterlyReportResp) Validate() error { + return nil +} +func (this *DeleteQuarterlyReportReq) Validate() error { + return nil +} +func (this *DeleteQuarterlyReportResp) Validate() error { + return nil +} diff --git a/api/reports/reports_triple.pb.go b/api/reports/reports_triple.pb.go index f4466f9..78c1f7c 100644 --- a/api/reports/reports_triple.pb.go +++ b/api/reports/reports_triple.pb.go @@ -35,6 +35,9 @@ type ReportsClient interface { DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment) // ==================================季度报告====================================== GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment) + AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment) + EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment) + DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment) } type reportsClient struct { @@ -47,6 +50,9 @@ type ReportsClientImpl struct { EditAnnualReport func(ctx context.Context, in *EditAnnualReportReq) (*EditAnnualReportResp, error) DeleteAnnualReport func(ctx context.Context, in *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) GetQuarterlyReportList func(ctx context.Context, in *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) + AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) + EditQuarterlyReport func(ctx context.Context, in *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) + DeleteQuarterlyReport func(ctx context.Context, in *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) } func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient { @@ -91,6 +97,24 @@ func (c *reportsClient) GetQuarterlyReportList(ctx context.Context, in *GetQuart return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetQuarterlyReportList", in, out) } +func (c *reportsClient) AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment) { + out := new(AddQuarterlyReportResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddQuarterlyReport", in, out) +} + +func (c *reportsClient) EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment) { + out := new(EditQuarterlyReportResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditQuarterlyReport", in, out) +} + +func (c *reportsClient) DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment) { + out := new(DeleteQuarterlyReportResp) + interfaceKey := ctx.Value(constant.InterfaceKey).(string) + return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteQuarterlyReport", in, out) +} + // ReportsServer is the server API for Reports service. // All implementations must embed UnimplementedReportsServer // for forward compatibility @@ -102,6 +126,9 @@ type ReportsServer interface { DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) // ==================================季度报告====================================== GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) + AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) + EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) + DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) mustEmbedUnimplementedReportsServer() } @@ -125,6 +152,15 @@ func (UnimplementedReportsServer) DeleteAnnualReport(context.Context, *DeleteAnn func (UnimplementedReportsServer) GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportList not implemented") } +func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented") +} +func (UnimplementedReportsServer) EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method EditQuarterlyReport not implemented") +} +func (UnimplementedReportsServer) DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteQuarterlyReport not implemented") +} func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) { s.proxyImpl = impl } @@ -298,6 +334,93 @@ func _Reports_GetQuarterlyReportList_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Reports_AddQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(AddQuarterlyReportReq) + if err := dec(in); err != nil { + return nil, err + } + base := srv.(dubbo3.Dubbo3GrpcService) + args := []interface{}{} + args = append(args, in) + md, _ := metadata.FromIncomingContext(ctx) + invAttachment := make(map[string]interface{}, len(md)) + for k, v := range md { + invAttachment[k] = v + } + invo := invocation.NewRPCInvocation("AddQuarterlyReport", args, invAttachment) + if interceptor == nil { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + info := &grpc_go.UnaryServerInfo{ + Server: srv, + FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + return interceptor(ctx, in, info, handler) +} + +func _Reports_EditQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(EditQuarterlyReportReq) + if err := dec(in); err != nil { + return nil, err + } + base := srv.(dubbo3.Dubbo3GrpcService) + args := []interface{}{} + args = append(args, in) + md, _ := metadata.FromIncomingContext(ctx) + invAttachment := make(map[string]interface{}, len(md)) + for k, v := range md { + invAttachment[k] = v + } + invo := invocation.NewRPCInvocation("EditQuarterlyReport", args, invAttachment) + if interceptor == nil { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + info := &grpc_go.UnaryServerInfo{ + Server: srv, + FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + return interceptor(ctx, in, info, handler) +} + +func _Reports_DeleteQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteQuarterlyReportReq) + if err := dec(in); err != nil { + return nil, err + } + base := srv.(dubbo3.Dubbo3GrpcService) + args := []interface{}{} + args = append(args, in) + md, _ := metadata.FromIncomingContext(ctx) + invAttachment := make(map[string]interface{}, len(md)) + for k, v := range md { + invAttachment[k] = v + } + invo := invocation.NewRPCInvocation("DeleteQuarterlyReport", args, invAttachment) + if interceptor == nil { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + info := &grpc_go.UnaryServerInfo{ + Server: srv, + FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string), + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + result := base.XXX_GetProxyImpl().Invoke(ctx, invo) + return result, result.Error() + } + return interceptor(ctx, in, info, handler) +} + // Reports_ServiceDesc is the grpc_go.ServiceDesc for Reports service. // It's only intended for direct use with grpc_go.RegisterService, // and not to be introspected or modified (even as a copy) @@ -325,6 +448,18 @@ var Reports_ServiceDesc = grpc_go.ServiceDesc{ MethodName: "GetQuarterlyReportList", Handler: _Reports_GetQuarterlyReportList_Handler, }, + { + MethodName: "AddQuarterlyReport", + Handler: _Reports_AddQuarterlyReport_Handler, + }, + { + MethodName: "EditQuarterlyReport", + Handler: _Reports_EditQuarterlyReport_Handler, + }, + { + MethodName: "DeleteQuarterlyReport", + Handler: _Reports_DeleteQuarterlyReport_Handler, + }, }, Streams: []grpc_go.StreamDesc{}, Metadata: "api/reports/reports.proto", diff --git a/cmd/app.go b/cmd/app.go index 9c60aa2..7f652d8 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -22,6 +22,7 @@ func main() { config.SetProviderService(&controller.PressReleasesProvider{}) config.SetProviderService(&controller.SecFilingsProvider{}) config.SetProviderService(&controller.AnnualReportProvider{}) + config.SetProviderService(&controller.QuarterlyReportProvider{}) if err := config.Load(); err != nil { panic(err) diff --git a/internel/controller/quarterlyReport.go b/internel/controller/quarterlyReport.go new file mode 100644 index 0000000..0458d3f --- /dev/null +++ b/internel/controller/quarterlyReport.go @@ -0,0 +1,31 @@ +package controller + +import ( + "context" + "micro-document/api/reports" + "micro-document/internel/logic" +) + +type QuarterlyReportProvider struct { + reports.UnimplementedReportsServer +} + +// 获取季度报告列表 +func (QuarterlyReportProvider) List(_ context.Context, req *reports.GetQuarterlyReportListReq) (resp *reports.GetQuarterlyReportListResp, err error) { + return logic.QuarterlyReportsLogic.List(req) +} + +// 增加季度报告 +func (QuarterlyReportProvider) Add(_ context.Context, req *reports.AddQuarterlyReportReq) (resp *reports.AddQuarterlyReportResp, err error) { + return logic.QuarterlyReportsLogic.Add(req) +} + +// 编辑季度报告 +func (QuarterlyReportProvider) Edit(_ context.Context, req *reports.EditQuarterlyReportReq) (resp *reports.EditQuarterlyReportResp, err error) { + return logic.QuarterlyReportsLogic.Edit(req) +} + +// 删除季度报告 +func (QuarterlyReportProvider) Delete(_ context.Context, req *reports.DeleteQuarterlyReportReq) (resp *reports.DeleteQuarterlyReportResp, err error) { + return logic.QuarterlyReportsLogic.Delete(req) +} diff --git a/internel/dao/quarterlyReports.go b/internel/dao/quarterlyReports.go new file mode 100644 index 0000000..e19b5fe --- /dev/null +++ b/internel/dao/quarterlyReports.go @@ -0,0 +1,72 @@ +package dao + +import ( + "errors" + "micro-document/api/reports" + "micro-document/internel/model" + "micro-document/pkg/db" + "time" +) + +type quarterlyReportsDao struct{} + +var QuarterlyReportsDao = new(quarterlyReportsDao) + +func (quarterlyReportsDao) List(req *reports.GetQuarterlyReportListReq) (data []model.QuarterlyReport, total int64, err error) { + dbQuery := db.DocDB.Model(&model.QuarterlyReport{}) + if req.Filtrate != nil { + if req.Filtrate.FileName != "" { + dbQuery = dbQuery.Where("file_name LIKE ?", "%"+req.Filtrate.FileName+"%") + } + if req.Filtrate.Status != 0 { + dbQuery = dbQuery.Where("status = ?", req.Filtrate.Status) + } + } + dbQuery.Count(&total) + err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error + if err != nil { + return + } + return +} + +func (quarterlyReportsDao) Add(req *reports.AddQuarterlyReportReq) (err error) { + err = db.DocDB.Model(&model.QuarterlyReport{}).Create(&model.QuarterlyReport{ + FileName: req.FileName, + FileIntroduce: req.FileIntroduce, + Attachment: req.Attachment, + AttachmentName: req.AttachmentName, + Operator: req.Operator, + OperatorID: req.OperatorId, + }).Error + if err != nil { + return errors.New("新增季度报告失败") + } + return +} + +func (quarterlyReportsDao) Edit(req *reports.EditQuarterlyReportReq) (err error) { + err = db.DocDB.Model(&model.QuarterlyReport{}).Where("id = ?", req.Id).UpdateColumns(&model.QuarterlyReport{ + FileName: req.FileName, + FileIntroduce: req.FileIntroduce, + Attachment: req.Attachment, + AttachmentName: req.AttachmentName, + Status: req.Status, + Sort: req.Sort, + Operator: req.Operator, + OperatorID: req.OperatorId, + UpdatedAt: time.Now(), + }).Error + if err != nil { + return errors.New("编辑季度报告失败") + } + return +} + +func (quarterlyReportsDao) Delete(req *reports.DeleteQuarterlyReportReq) (err error) { + err = db.DocDB.Model(&model.QuarterlyReport{}).Where("id = ?", req.Id).Delete(&model.QuarterlyReport{}).Error + if err != nil { + return errors.New("删除季度报告失败") + } + return +} diff --git a/internel/logic/quarterlyReports.go b/internel/logic/quarterlyReports.go new file mode 100644 index 0000000..51d10c2 --- /dev/null +++ b/internel/logic/quarterlyReports.go @@ -0,0 +1,64 @@ +package logic + +import ( + "errors" + "micro-document/api/reports" + "micro-document/internel/dao" + util "micro-document/pkg/utils" + + "github.com/jinzhu/copier" +) + +type quarterlyReportsLogic struct{} + +var QuarterlyReportsLogic = new(quarterlyReportsLogic) + +// 获取季度报告列表 +func (quarterlyReportsLogic) List(req *reports.GetQuarterlyReportListReq) (result *reports.GetQuarterlyReportListResp, err error) { + result = &reports.GetQuarterlyReportListResp{ + Page: req.Page, + PageSize: req.PageSize, + } + data, total, err := dao.QuarterlyReportsDao.List(req) + if err != nil { + return nil, errors.New("查询季度报告失败") + } + result.Total = int32(total) + if err = copier.CopyWithOption(&result.Data, &data, util.CopierProtoOptions); err != nil { + return nil, errors.New("复制季度报告失败") + } + return result, nil +} + +// 增加季度报告 +func (quarterlyReportsLogic) Add(req *reports.AddQuarterlyReportReq) (result *reports.AddQuarterlyReportResp, err error) { + result = &reports.AddQuarterlyReportResp{} + err = dao.QuarterlyReportsDao.Add(req) + if err != nil { + return nil, errors.New("新增季度报告失败") + } + result.Msg = "新增季度报告成功" + return result, nil +} + +// 编辑季度报告 +func (quarterlyReportsLogic) Edit(req *reports.EditQuarterlyReportReq) (result *reports.EditQuarterlyReportResp, err error) { + result = &reports.EditQuarterlyReportResp{} + err = dao.QuarterlyReportsDao.Edit(req) + if err != nil { + return nil, errors.New("编辑季度报告失败") + } + result.Msg = "编辑季度报告成功" + return result, nil +} + +// 删除季度报告 +func (quarterlyReportsLogic) Delete(req *reports.DeleteQuarterlyReportReq) (result *reports.DeleteQuarterlyReportResp, err error) { + result = &reports.DeleteQuarterlyReportResp{} + err = dao.QuarterlyReportsDao.Delete(req) + if err != nil { + return nil, errors.New("删除季度报告失败") + } + result.Msg = "删除季度报告成功" + return result, nil +} diff --git a/internel/model/reports.go b/internel/model/reports.go index bb34e8a..163d84f 100644 --- a/internel/model/reports.go +++ b/internel/model/reports.go @@ -3,23 +3,42 @@ package model import ( "time" - "gorm.io/plugin/soft_delete" + "gorm.io/gorm" ) type AnnualReport struct { ID uint `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time - DeletedAt soft_delete.DeletedAt - FileName string `gorm:"column:file_name;type:varchar(100);not null;default:'';comment:文件名称"` - Date string `gorm:"column:date;type:varchar(100);not null;default:'';comment:日期"` - FileUrl string `gorm:"column:file_url;type:varchar(100);not null;default:'';comment:访问地址"` - Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` - Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"` - Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"` - OperatorID int32 `gorm:"column:operator_id;comment:操作人Id"` + DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_annual_report_deleted_at;"` + FileName string `gorm:"column:file_name;type:varchar(100);not null;default:'';comment:文件名称"` + Date string `gorm:"column:date;type:varchar(100);not null;default:'';comment:日期"` + FileUrl string `gorm:"column:file_url;type:varchar(100);not null;default:'';comment:访问地址"` + Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` + Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"` + Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"` + OperatorID int32 `gorm:"column:operator_id;comment:操作人Id"` } func (*AnnualReport) TableName() string { return "annual_report" } + +type QuarterlyReport struct { + ID uint `gorm:"primarykey"` + CreatedAt time.Time + UpdatedAt time.Time + DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_quarterly_report_deleted_at;"` + FileName string `gorm:"column:file_name;type:varchar(100);not null;default:'';comment:文件名称"` + FileIntroduce string `gorm:"column:file_introduce;type:varchar(100);not null;default:'';comment:文件介绍"` + Attachment string `gorm:"column:attachment;type:varchar(100);not null;default:'';comment:附件"` + AttachmentName string `gorm:"column:attachment_name;type:varchar(100);not null;default:'';comment:附件名称"` + Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` + Sort int32 `gorm:"column:sort;type:int;not null;default:1;comment:排序"` + Operator string `gorm:"column:operator;type:varchar(100);not null;default:'';comment:操作人"` + OperatorID int32 `gorm:"column:operator_id;comment:操作人Id"` +} + +func (*QuarterlyReport) TableName() string { + return "quarterly_report" +} diff --git a/pkg/db/db.go b/pkg/db/db.go index 68144db..808646b 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -40,6 +40,8 @@ func DbInit() { &model.PressReleases{}, &model.SecFilings{}, &model.FormType{}, - &model.AnnualReport{}) + &model.AnnualReport{}, + &model.QuarterlyReport{}, + ) } }