From 5149ac02cbd770d9d643efaa3af9f94ab017be90 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Thu, 25 Sep 2025 13:22:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/reports/reports.pb.go | 32 +++++++++++++++++++++----------- api/reports/reports.proto | 11 ++++++----- internel/model/reports.go | 6 +++--- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/api/reports/reports.pb.go b/api/reports/reports.pb.go index fba2079..74fd6d7 100644 --- a/api/reports/reports.pb.go +++ b/api/reports/reports.pb.go @@ -850,11 +850,12 @@ type QuarterlyReport struct { 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"` //文件介绍 - Sort int32 `protobuf:"varint,4,opt,name=sort,proto3" json:"sort"` //排序 - Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status"` //状态(1:上架,2:下架) - UpdatedAt string `protobuf:"bytes,6,opt,name=updatedAt,proto3" json:"updatedAt"` //最近更新时间 - Operator string `protobuf:"bytes,7,opt,name=operator,proto3" json:"operator"` //操作人 - OperatorId int32 `protobuf:"varint,8,opt,name=operatorId,proto3" json:"operatorId"` //操作人Id + Attachment string `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment"` //附件 + Sort int32 `protobuf:"varint,5,opt,name=sort,proto3" json:"sort"` //排序 + Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status"` //状态(1:上架,2:下架) + UpdatedAt string `protobuf:"bytes,7,opt,name=updatedAt,proto3" json:"updatedAt"` //最近更新时间 + 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 *QuarterlyReport) Reset() { @@ -910,6 +911,13 @@ func (x *QuarterlyReport) GetFileIntroduce() string { return "" } +func (x *QuarterlyReport) GetAttachment() string { + if x != nil { + return x.Attachment + } + return "" +} + func (x *QuarterlyReport) GetSort() int32 { if x != nil { return x.Sort @@ -1424,21 +1432,23 @@ var file_api_reports_reports_proto_rawDesc = []byte{ 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, - 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xe9, 0x01, + 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x89, 0x02, 0x0a, 0x0f, 0x51, 0x75, 0x61, 0x72, 0x74, 0x65, 0x72, 0x6c, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 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, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 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, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 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, 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, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, + 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, 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, diff --git a/api/reports/reports.proto b/api/reports/reports.proto index adbaff3..4c0b02d 100644 --- a/api/reports/reports.proto +++ b/api/reports/reports.proto @@ -103,11 +103,12 @@ message QuarterlyReport{ int32 id = 1; //id string fileName = 2; //文件名称 string fileIntroduce = 3; //文件介绍 - int32 sort = 4; //排序 - int32 status = 5; //状态(1:上架,2:下架) - string updatedAt = 6; //最近更新时间 - string operator = 7; //操作人 - int32 operatorId = 8; //操作人Id + string attachment = 4; //附件 + int32 sort = 5; //排序 + int32 status = 6; //状态(1:上架,2:下架) + string updatedAt = 7; //最近更新时间 + string operator = 8; //操作人 + int32 operatorId = 9; //操作人Id } message AddQuarterlyReportReq{ diff --git a/internel/model/reports.go b/internel/model/reports.go index e2825e1..f6a6aae 100644 --- a/internel/model/reports.go +++ b/internel/model/reports.go @@ -13,7 +13,7 @@ type AnnualReport struct { 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 int64 `gorm:"column:date;type:int;not null;default:0;comment:日期"` - FileUrl string `gorm:"column:file_url;type:varchar(100);not null;default:'';comment:访问地址"` + FileUrl string `gorm:"column:file_url;type:varchar(1024);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:操作人"` @@ -31,8 +31,8 @@ type QuarterlyReport struct { 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:附件名称"` + Attachment string `gorm:"column:attachment;type:varchar(1024);not null;default:'';comment:附件"` + AttachmentName string `gorm:"column:attachment_name;type:varchar(1024);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:操作人"`