From b0126992cbbc4d845618f75805c81e8227ca1f18 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Sun, 28 Sep 2025 13:48:40 +0800 Subject: [PATCH] =?UTF-8?q?Updata:=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/members/members.pb.go | 48 ++++++++++++------------- api/members/members.proto | 12 +++---- clear.sh | 1 + conf/config.yaml | 14 ++++---- internel/model/committeeAppointments.go | 6 ++-- protocMembers.bat | 3 ++ 6 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 protocMembers.bat diff --git a/api/members/members.pb.go b/api/members/members.pb.go index 55967da..2c2765e 100644 --- a/api/members/members.pb.go +++ b/api/members/members.pb.go @@ -1175,9 +1175,9 @@ type CommitteeAppointments struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status"` - AuditCommittee string `protobuf:"bytes,3,opt,name=auditCommittee,proto3" json:"auditCommittee"` - CompensationCommittee string `protobuf:"bytes,4,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` - NominatingCommittee string `protobuf:"bytes,5,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` + AuditCommittee int32 `protobuf:"varint,3,opt,name=auditCommittee,proto3" json:"auditCommittee"` + CompensationCommittee int32 `protobuf:"varint,4,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` + NominatingCommittee int32 `protobuf:"varint,5,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` IsSetting int32 `protobuf:"varint,6,opt,name=isSetting,proto3" json:"isSetting"` } @@ -1227,25 +1227,25 @@ func (x *CommitteeAppointments) GetStatus() int32 { return 0 } -func (x *CommitteeAppointments) GetAuditCommittee() string { +func (x *CommitteeAppointments) GetAuditCommittee() int32 { if x != nil { return x.AuditCommittee } - return "" + return 0 } -func (x *CommitteeAppointments) GetCompensationCommittee() string { +func (x *CommitteeAppointments) GetCompensationCommittee() int32 { if x != nil { return x.CompensationCommittee } - return "" + return 0 } -func (x *CommitteeAppointments) GetNominatingCommittee() string { +func (x *CommitteeAppointments) GetNominatingCommittee() int32 { if x != nil { return x.NominatingCommittee } - return "" + return 0 } func (x *CommitteeAppointments) GetIsSetting() int32 { @@ -1263,9 +1263,9 @@ type EditCommitteeAppointmentsReq struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status"` - AuditCommittee string `protobuf:"bytes,4,opt,name=auditCommittee,proto3" json:"auditCommittee"` - CompensationCommittee string `protobuf:"bytes,5,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` - NominatingCommittee string `protobuf:"bytes,6,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` + AuditCommittee int32 `protobuf:"varint,4,opt,name=auditCommittee,proto3" json:"auditCommittee"` + CompensationCommittee int32 `protobuf:"varint,5,opt,name=compensationCommittee,proto3" json:"compensationCommittee"` + NominatingCommittee int32 `protobuf:"varint,6,opt,name=nominatingCommittee,proto3" json:"nominatingCommittee"` IsSetting int32 `protobuf:"varint,7,opt,name=isSetting,proto3" json:"isSetting"` Operator string `protobuf:"bytes,8,opt,name=operator,proto3" json:"operator"` OperatorId int32 `protobuf:"varint,9,opt,name=operatorId,proto3" json:"operatorId"` @@ -1324,25 +1324,25 @@ func (x *EditCommitteeAppointmentsReq) GetStatus() int32 { return 0 } -func (x *EditCommitteeAppointmentsReq) GetAuditCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetAuditCommittee() int32 { if x != nil { return x.AuditCommittee } - return "" + return 0 } -func (x *EditCommitteeAppointmentsReq) GetCompensationCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetCompensationCommittee() int32 { if x != nil { return x.CompensationCommittee } - return "" + return 0 } -func (x *EditCommitteeAppointmentsReq) GetNominatingCommittee() string { +func (x *EditCommitteeAppointmentsReq) GetNominatingCommittee() int32 { if x != nil { return x.NominatingCommittee } - return "" + return 0 } func (x *EditCommitteeAppointmentsReq) GetIsSetting() int32 { @@ -1555,13 +1555,13 @@ var file_api_members_members_proto_rawDesc = []byte{ 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, + 0x28, 0x05, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x05, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xc8, 0x02, 0x0a, 0x1c, 0x45, 0x64, 0x69, @@ -1572,13 +1572,13 @@ var file_api_members_members_proto_rawDesc = []byte{ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x05, 0x52, 0x0e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x6e, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x73, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, diff --git a/api/members/members.proto b/api/members/members.proto index 6d5bb7c..d9e8c19 100644 --- a/api/members/members.proto +++ b/api/members/members.proto @@ -138,9 +138,9 @@ message EditBoardOfDirectorsResp{ message CommitteeAppointments{ string name = 1; int32 status = 2; - string auditCommittee = 3; - string compensationCommittee = 4; - string nominatingCommittee = 5; + int32 auditCommittee = 3; + int32 compensationCommittee = 4; + int32 nominatingCommittee = 5; int32 isSetting = 6; } @@ -148,9 +148,9 @@ message EditCommitteeAppointmentsReq{ string uuid = 1; string name = 2; int32 status = 3; - string auditCommittee = 4; - string compensationCommittee = 5; - string nominatingCommittee = 6; + int32 auditCommittee = 4; + int32 compensationCommittee = 5; + int32 nominatingCommittee = 6; int32 isSetting = 7; string operator = 8; int32 operatorId = 9; diff --git a/clear.sh b/clear.sh index afdb8fd..c980a9d 100644 --- a/clear.sh +++ b/clear.sh @@ -1,2 +1,3 @@ ls api/reports/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}'; ls api/emailAlerts/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}'; +ls api/members/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}'; \ No newline at end of file diff --git a/conf/config.yaml b/conf/config.yaml index 25d7d85..0762024 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -1,9 +1,9 @@ docDb: - host: 172.16.100.99:9007 - user: artuser - password: C250PflXIWv2SQm8 - dbName: micro-document - # host: 127.0.0.1:3306 - # user: root - # password: 123456 + # host: 172.16.100.99:9007 + # user: artuser + # password: C250PflXIWv2SQm8 # dbName: micro-document + host: 127.0.0.1:3306 + user: root + password: 123456 + dbName: micro-document diff --git a/internel/model/committeeAppointments.go b/internel/model/committeeAppointments.go index c5ea92a..cfe2f17 100644 --- a/internel/model/committeeAppointments.go +++ b/internel/model/committeeAppointments.go @@ -14,9 +14,9 @@ type CommitteeAppointments struct { Uuid string `gorm:"column:uuid;type:varchar(256);not null;default:'';comment:uuid"` Name string `gorm:"column:name;type:varchar(30);not null;default:'';comment:姓名"` Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"` - AuditCommittee string `gorm:"column:audit_committee;type:varchar(10);not null;default:'';comment:审计委员会"` - CompensationCommittee string `gorm:"column:compensation_committee;type:varchar(10);not null;default:'';comment:薪酬委员会"` - NominatingCommittee string `gorm:"column:nominating_committee;type:varchar(10);not null;default:'';comment:提名委员会"` + AuditCommittee int32 `gorm:"column:audit_committee;type:int;not null;default:0;comment:审计委员会(1:Member 2:Chair)"` + CompensationCommittee int32 `gorm:"column:compensation_committee;type:int;not null;default:0;comment:薪酬委员会(1:Member 2:Chair)"` + NominatingCommittee int32 `gorm:"column:nominating_committee;type:int;not null;default:0;comment:提名委员会(1:Member 2:Chair)"` IsSetting int32 `gorm:"column:is_setting;type:int;not null;default:0;comment:是否设置:0 否 1 是"` } diff --git a/protocMembers.bat b/protocMembers.bat new file mode 100644 index 0000000..62ff02f --- /dev/null +++ b/protocMembers.bat @@ -0,0 +1,3 @@ +@echo off +protoc -I . -I ./api/members --proto_path=./api/members --go_out=./api/members --go-triple_out=./api/members --govalidators_out=./api/members ./api/members/members.proto +.\clear.sh \ No newline at end of file