Compare commits

...

35 Commits

Author SHA1 Message Date
jiaji.H
c165a7be34 feat:添加注释与相关模块proto编译命令脚本 2025-10-14 11:34:28 +08:00
jiaji.H
2b082a5713 Updata:更新数据库和zookeeperIP 2025-10-14 09:13:10 +08:00
jiaji.H
c3e7670a50 Updata:添加返回信息 2025-10-13 16:57:39 +08:00
jiaji.H
2e9ef82878 Updata:更新pb文件 2025-10-11 10:46:24 +08:00
jiaji.H
9ebfdc1a8d Updata:更新pb文件 2025-10-11 10:23:37 +08:00
jiaji.H
52f50be16c Updata:增加分页 2025-10-10 15:35:20 +08:00
jiaji.H
e31fe02305 Updata:修改赋值msg 2025-10-10 13:38:50 +08:00
jiaji.H
aee7874c51 feat:增加fiee官网成员,年度、季度报告展示 2025-10-10 11:12:35 +08:00
jiaji.H
c1eed8a03b Updata:修改错误提升 2025-09-30 11:56:04 +08:00
jiaji.H
261f83694c Updata:更新编辑逻辑,直接更新空数据字段 2025-09-30 09:54:45 +08:00
jiaji.H
647227f3b5 Updata:根据跟新时间倒叙排列 2025-09-29 11:35:36 +08:00
jiaji.H
3f6bf1adb9 Updata:更新字段名称 2025-09-29 11:20:49 +08:00
jiaji.H
04537395d6 Updata:更新查找逻辑 2025-09-29 10:39:48 +08:00
jiaji.H
32c5f43314 Updata:更新赋值逻辑 2025-09-29 10:19:05 +08:00
jiaji.H
176b04972b Updata:调整字段 2025-09-29 10:11:01 +08:00
jiaji.H
53568dfea2 Updata:添加确实数据 2025-09-28 17:28:34 +08:00
jiaji.H
be2d53a955 Updata:调整复制逻辑 2025-09-28 16:57:53 +08:00
jiaji.H
cc98c6b43b Updata:跟新pb文件 2025-09-28 16:39:47 +08:00
jiaji.H
26c684f14f Updata:增加匹配字段 2025-09-28 16:30:00 +08:00
jiaji.H
b0126992cb Updata:修改部分字段类型 2025-09-28 13:48:40 +08:00
jiaji.H
32833c90ec feat:增加报告管理模块,成员管理模块,邮箱通知模块 2025-09-28 09:52:20 +08:00
jiaji.H
b5a8e87c4b feat:增加邮件通知模块功能接口 2025-09-25 16:10:58 +08:00
jiaji.H
202da975d0 Updata:更新pb文件增加返回字段 2025-09-25 14:38:58 +08:00
jiaji.H
50bd0d0702 Updata:修改字段类型 2025-09-25 14:27:53 +08:00
jiaji.H
cfeacb48fd Updata:增加邮箱管理模块 2025-09-25 13:57:19 +08:00
jiaji.H
5149ac02cb fix:修正字段长度 2025-09-25 13:22:51 +08:00
jiaji.H
2d491f4ec3 Updata:修改日期字段类型 2025-09-25 10:35:44 +08:00
jiaji.H
a22cd227ef fix:修正参数字段名称 2025-09-24 17:19:11 +08:00
jiaji.H
31c8132a5b Updata 2025-09-24 16:37:40 +08:00
jiaji.H
7cd0f99000 Updata 2025-09-24 16:37:21 +08:00
jiaji.H
2e65b8f2c8 Updata:合并文件 2025-09-24 16:35:37 +08:00
jiaji.H
af28100328 Updata:更新pb文件 2025-09-24 15:56:33 +08:00
jiaji.H
e0ad36252b Updata:更新接口名称 2025-09-24 15:39:31 +08:00
jiaji.H
9a38ef5101 feat:添加季度报告模块 2025-09-24 15:13:18 +08:00
jiaji.H
8584b6a94e feat:新增年度报告模块 2025-09-24 10:24:52 +08:00
55 changed files with 9901 additions and 12 deletions

33
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,33 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"env": {
"GOPATH":"C:\\Users\\lenovo\\go",
"GOOS":"windows"
},
"program": "${workspaceFolder}\\cmd",
"args":[]
},
{
"name": "Run app.go",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/app.go",
"cwd": "${workspaceFolder}/cmd",
"env": {
"DEBUG": "true",
"DUBBO_GO_CONFIG_PATH": "${workspaceFolder}/conf/dubbogo.yaml"
},
"dlvFlags": ["--check-go-version=false"]
}
]
}

22
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,22 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fa1b49",
"activityBar.background": "#fa1b49",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#155e02",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#fa1b49",
"statusBar.background": "#dd0531",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#fa1b49",
"statusBarItem.remoteBackground": "#dd0531",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#dd0531",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#dd053199",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#dd0531"
}

14
README.md Normal file
View File

@ -0,0 +1,14 @@
Fiee官网相关微服务
模块:
1.新闻管理pressreleases
proto编译protocPressreleases.bat
2.文档管理governance
proto编译protocGovernance.bat
3.成员信息管理members
proto编译protocMembers.bat
4.报告管理reports
proto编译protocReports.bat
5.邮件提醒管理emailAlerts
proto编译protocEmailAlerts.bat
6.SEC 文件管理secFilings
proto编译protocSecFilings.bat

View File

@ -0,0 +1,644 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v5.26.0
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type EmailAlertsSubmitReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName"`
LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
}
func (x *EmailAlertsSubmitReq) Reset() {
*x = EmailAlertsSubmitReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailAlertsSubmitReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailAlertsSubmitReq) ProtoMessage() {}
func (x *EmailAlertsSubmitReq) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[0]
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 EmailAlertsSubmitReq.ProtoReflect.Descriptor instead.
func (*EmailAlertsSubmitReq) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{0}
}
func (x *EmailAlertsSubmitReq) GetFirstName() string {
if x != nil {
return x.FirstName
}
return ""
}
func (x *EmailAlertsSubmitReq) GetLastName() string {
if x != nil {
return x.LastName
}
return ""
}
func (x *EmailAlertsSubmitReq) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *EmailAlertsSubmitReq) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
func (x *EmailAlertsSubmitReq) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
type EmailAlertsSubmitResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
}
func (x *EmailAlertsSubmitResp) Reset() {
*x = EmailAlertsSubmitResp{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailAlertsSubmitResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailAlertsSubmitResp) ProtoMessage() {}
func (x *EmailAlertsSubmitResp) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[1]
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 EmailAlertsSubmitResp.ProtoReflect.Descriptor instead.
func (*EmailAlertsSubmitResp) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{1}
}
func (x *EmailAlertsSubmitResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
// ========================= EmailInformatio ==============================
type Filtrate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,3,opt,name=company,proto3" json:"company"`
}
func (x *Filtrate) Reset() {
*x = Filtrate{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Filtrate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Filtrate) ProtoMessage() {}
func (x *Filtrate) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[2]
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 Filtrate.ProtoReflect.Descriptor instead.
func (*Filtrate) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{2}
}
func (x *Filtrate) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Filtrate) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *Filtrate) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
type GetEmailInformationListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize"`
Filtrate *Filtrate `protobuf:"bytes,3,opt,name=filtrate,proto3" json:"filtrate"`
}
func (x *GetEmailInformationListReq) Reset() {
*x = GetEmailInformationListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetEmailInformationListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetEmailInformationListReq) ProtoMessage() {}
func (x *GetEmailInformationListReq) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[3]
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 GetEmailInformationListReq.ProtoReflect.Descriptor instead.
func (*GetEmailInformationListReq) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{3}
}
func (x *GetEmailInformationListReq) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetEmailInformationListReq) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetEmailInformationListReq) GetFiltrate() *Filtrate {
if x != nil {
return x.Filtrate
}
return nil
}
type GetEmailInformationListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"`
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize"`
Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total"`
Data []*EmailInformation `protobuf:"bytes,5,rep,name=data,proto3" json:"data"`
}
func (x *GetEmailInformationListResp) Reset() {
*x = GetEmailInformationListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetEmailInformationListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetEmailInformationListResp) ProtoMessage() {}
func (x *GetEmailInformationListResp) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[4]
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 GetEmailInformationListResp.ProtoReflect.Descriptor instead.
func (*GetEmailInformationListResp) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{4}
}
func (x *GetEmailInformationListResp) GetMsg() string {
if x != nil {
return x.Msg
}
return ""
}
func (x *GetEmailInformationListResp) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *GetEmailInformationListResp) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *GetEmailInformationListResp) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
func (x *GetEmailInformationListResp) GetData() []*EmailInformation {
if x != nil {
return x.Data
}
return nil
}
type EmailInformation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
FullName string `protobuf:"bytes,2,opt,name=fullName,proto3" json:"fullName"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
Company string `protobuf:"bytes,4,opt,name=company,proto3" json:"company"`
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone"`
CreatedAt string `protobuf:"bytes,6,opt,name=createdAt,proto3" json:"createdAt"`
}
func (x *EmailInformation) Reset() {
*x = EmailInformation{}
if protoimpl.UnsafeEnabled {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmailInformation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmailInformation) ProtoMessage() {}
func (x *EmailInformation) ProtoReflect() protoreflect.Message {
mi := &file_api_emailAlerts_emailAlerts_proto_msgTypes[5]
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 EmailInformation.ProtoReflect.Descriptor instead.
func (*EmailInformation) Descriptor() ([]byte, []int) {
return file_api_emailAlerts_emailAlerts_proto_rawDescGZIP(), []int{5}
}
func (x *EmailInformation) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *EmailInformation) GetFullName() string {
if x != nil {
return x.FullName
}
return ""
}
func (x *EmailInformation) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *EmailInformation) GetCompany() string {
if x != nil {
return x.Company
}
return ""
}
func (x *EmailInformation) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *EmailInformation) GetCreatedAt() string {
if x != nil {
return x.CreatedAt
}
return ""
}
var File_api_emailAlerts_emailAlerts_proto protoreflect.FileDescriptor
var file_api_emailAlerts_emailAlerts_proto_rawDesc = []byte{
0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
0x73, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
0x22, 0x96, 0x01, 0x0a, 0x14, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73,
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x72,
0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69,
0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70,
0x61, 0x6e, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x29, 0x0a, 0x15, 0x45, 0x6d, 0x61,
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6d, 0x73, 0x67, 0x22, 0x4e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,
0x70, 0x61, 0x6e, 0x79, 0x22, 0x7f, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c,
0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72,
0x74, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x72, 0x61, 0x74, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c,
0x74, 0x72, 0x61, 0x74, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61,
0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x31, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6d,
0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49,
0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
0x22, 0xa2, 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61,
0x6e, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x32, 0xd7, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41,
0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x6d, 0x61,
0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c,
0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x45, 0x6d, 0x61, 0x69,
0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66,
0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x65,
0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d,
0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65,
0x72, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42,
0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x3b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x6c, 0x65, 0x72, 0x74,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_emailAlerts_emailAlerts_proto_rawDescOnce sync.Once
file_api_emailAlerts_emailAlerts_proto_rawDescData = file_api_emailAlerts_emailAlerts_proto_rawDesc
)
func file_api_emailAlerts_emailAlerts_proto_rawDescGZIP() []byte {
file_api_emailAlerts_emailAlerts_proto_rawDescOnce.Do(func() {
file_api_emailAlerts_emailAlerts_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_emailAlerts_emailAlerts_proto_rawDescData)
})
return file_api_emailAlerts_emailAlerts_proto_rawDescData
}
var file_api_emailAlerts_emailAlerts_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_api_emailAlerts_emailAlerts_proto_goTypes = []interface{}{
(*EmailAlertsSubmitReq)(nil), // 0: emailAlerts.EmailAlertsSubmitReq
(*EmailAlertsSubmitResp)(nil), // 1: emailAlerts.EmailAlertsSubmitResp
(*Filtrate)(nil), // 2: emailAlerts.Filtrate
(*GetEmailInformationListReq)(nil), // 3: emailAlerts.GetEmailInformationListReq
(*GetEmailInformationListResp)(nil), // 4: emailAlerts.GetEmailInformationListResp
(*EmailInformation)(nil), // 5: emailAlerts.EmailInformation
}
var file_api_emailAlerts_emailAlerts_proto_depIdxs = []int32{
2, // 0: emailAlerts.GetEmailInformationListReq.filtrate:type_name -> emailAlerts.Filtrate
5, // 1: emailAlerts.GetEmailInformationListResp.data:type_name -> emailAlerts.EmailInformation
0, // 2: emailAlerts.EmailAlerts.EmailAlertsSubmit:input_type -> emailAlerts.EmailAlertsSubmitReq
3, // 3: emailAlerts.EmailAlerts.GetEmailInformationList:input_type -> emailAlerts.GetEmailInformationListReq
1, // 4: emailAlerts.EmailAlerts.EmailAlertsSubmit:output_type -> emailAlerts.EmailAlertsSubmitResp
4, // 5: emailAlerts.EmailAlerts.GetEmailInformationList:output_type -> emailAlerts.GetEmailInformationListResp
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_api_emailAlerts_emailAlerts_proto_init() }
func file_api_emailAlerts_emailAlerts_proto_init() {
if File_api_emailAlerts_emailAlerts_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_emailAlerts_emailAlerts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailAlertsSubmitReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailAlertsSubmitResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Filtrate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetEmailInformationListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetEmailInformationListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_emailAlerts_emailAlerts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmailInformation); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_emailAlerts_emailAlerts_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_emailAlerts_emailAlerts_proto_goTypes,
DependencyIndexes: file_api_emailAlerts_emailAlerts_proto_depIdxs,
MessageInfos: file_api_emailAlerts_emailAlerts_proto_msgTypes,
}.Build()
File_api_emailAlerts_emailAlerts_proto = out.File
file_api_emailAlerts_emailAlerts_proto_rawDesc = nil
file_api_emailAlerts_emailAlerts_proto_goTypes = nil
file_api_emailAlerts_emailAlerts_proto_depIdxs = nil
}

View File

@ -0,0 +1,54 @@
syntax = "proto3";
package emailAlerts;
//import "descriptor.proto";
//import "validator.proto";
option go_package = "./;emailAlerts";
service EmailAlerts{
rpc EmailAlertsSubmit(EmailAlertsSubmitReq) returns (EmailAlertsSubmitResp);
//========================= EmailInformatio ==============================
rpc GetEmailInformationList(GetEmailInformationListReq) returns (GetEmailInformationListResp);
}
message EmailAlertsSubmitReq{
string firstName = 1;
string lastName = 2;
string email = 3;
string company = 4;
string phone = 5;
}
message EmailAlertsSubmitResp{
string msg = 1;
}
//========================= EmailInformatio ==============================
message Filtrate{
string name = 1;
string email = 2;
string company = 3;
}
message GetEmailInformationListReq{
int32 page = 1;
int32 pageSize = 2;
Filtrate filtrate = 3;
}
message GetEmailInformationListResp{
string msg = 1;
int32 page=2;
int32 pageSize =3;
int32 total = 4;
repeated EmailInformation data = 5;
}
message EmailInformation{
int32 id = 1;
string fullName = 2;
string email = 3;
string company = 4;
string phone = 5;
string createdAt = 6;
}

View File

@ -0,0 +1,47 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *EmailAlertsSubmitReq) Validate() error {
return nil
}
func (this *EmailAlertsSubmitResp) Validate() error {
return nil
}
func (this *Filtrate) Validate() error {
return nil
}
func (this *GetEmailInformationListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetEmailInformationListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *EmailInformation) Validate() error {
return nil
}

View File

@ -0,0 +1,194 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// source: api/emailAlerts/emailAlerts.proto
package emailAlerts
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// EmailAlertsClient is the client API for EmailAlerts service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type EmailAlertsClient interface {
EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment)
// ========================= EmailInformatio ==============================
GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment)
}
type emailAlertsClient struct {
cc *triple.TripleConn
}
type EmailAlertsClientImpl struct {
EmailAlertsSubmit func(ctx context.Context, in *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
GetEmailInformationList func(ctx context.Context, in *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
}
func (c *EmailAlertsClientImpl) GetDubboStub(cc *triple.TripleConn) EmailAlertsClient {
return NewEmailAlertsClient(cc)
}
func (c *EmailAlertsClientImpl) XXX_InterfaceName() string {
return "emailAlerts.EmailAlerts"
}
func NewEmailAlertsClient(cc *triple.TripleConn) EmailAlertsClient {
return &emailAlertsClient{cc}
}
func (c *emailAlertsClient) EmailAlertsSubmit(ctx context.Context, in *EmailAlertsSubmitReq, opts ...grpc_go.CallOption) (*EmailAlertsSubmitResp, common.ErrorWithAttachment) {
out := new(EmailAlertsSubmitResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EmailAlertsSubmit", in, out)
}
func (c *emailAlertsClient) GetEmailInformationList(ctx context.Context, in *GetEmailInformationListReq, opts ...grpc_go.CallOption) (*GetEmailInformationListResp, common.ErrorWithAttachment) {
out := new(GetEmailInformationListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetEmailInformationList", in, out)
}
// EmailAlertsServer is the server API for EmailAlerts service.
// All implementations must embed UnimplementedEmailAlertsServer
// for forward compatibility
type EmailAlertsServer interface {
EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error)
// ========================= EmailInformatio ==============================
GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error)
mustEmbedUnimplementedEmailAlertsServer()
}
// UnimplementedEmailAlertsServer must be embedded to have forward compatible implementations.
type UnimplementedEmailAlertsServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedEmailAlertsServer) EmailAlertsSubmit(context.Context, *EmailAlertsSubmitReq) (*EmailAlertsSubmitResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EmailAlertsSubmit not implemented")
}
func (UnimplementedEmailAlertsServer) GetEmailInformationList(context.Context, *GetEmailInformationListReq) (*GetEmailInformationListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEmailInformationList not implemented")
}
func (s *UnimplementedEmailAlertsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedEmailAlertsServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedEmailAlertsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &EmailAlerts_ServiceDesc
}
func (s *UnimplementedEmailAlertsServer) XXX_InterfaceName() string {
return "emailAlerts.EmailAlerts"
}
func (UnimplementedEmailAlertsServer) mustEmbedUnimplementedEmailAlertsServer() {}
// UnsafeEmailAlertsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EmailAlertsServer will
// result in compilation errors.
type UnsafeEmailAlertsServer interface {
mustEmbedUnimplementedEmailAlertsServer()
}
func RegisterEmailAlertsServer(s grpc_go.ServiceRegistrar, srv EmailAlertsServer) {
s.RegisterService(&EmailAlerts_ServiceDesc, srv)
}
func _EmailAlerts_EmailAlertsSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EmailAlertsSubmitReq)
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("EmailAlertsSubmit", 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 _EmailAlerts_GetEmailInformationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEmailInformationListReq)
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("GetEmailInformationList", 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)
}
// EmailAlerts_ServiceDesc is the grpc_go.ServiceDesc for EmailAlerts service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var EmailAlerts_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "emailAlerts.EmailAlerts",
HandlerType: (*EmailAlertsServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "EmailAlertsSubmit",
Handler: _EmailAlerts_EmailAlertsSubmit_Handler,
},
{
MethodName: "GetEmailInformationList",
Handler: _EmailAlerts_GetEmailInformationList_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/emailAlerts/emailAlerts.proto",
}

2607
api/members/members.pb.go Normal file

File diff suppressed because it is too large Load Diff

209
api/members/members.proto Normal file
View File

@ -0,0 +1,209 @@
syntax = "proto3";
package members;
//import "descriptor.proto";
//import "validator.proto";
option go_package = "./;members";
service Members{
//========================================================================
rpc AddMember(AddMemberReq) returns (AddMemberResp);
rpc EditMember(EditMemberReq) returns (EditMemberResp);
rpc DeleteMember(DeleteMemberReq) returns (DeleteMemberResp);
rpc GetMemberList(GetMemberListReq) returns (GetMemberListResp);
//==========================================================================
rpc EditManagement(EditManagementReq) returns (EditManagementResp);
rpc DisplayManagement(DisplayManagementReq) returns (DisplayManagementResp);
//==========================================================================
rpc EditBoardOfDirectors(EditBoardOfDirectorsReq) returns (EditBoardOfDirectorsResp);
rpc DisplayBoardOfDirectors(DisplayBoardOfDirectorsReq) returns (DisplayBoardOfDirectorsResp);
//========================================================================
rpc EditCommitteeAppointments(EditCommitteeAppointmentsReq) returns (EditCommitteeAppointmentsResp);
rpc DisplayCommitteeAppointments(DisplayCommitteeAppointmentsReq)returns(DisplayCommitteeAppointmentsResp);
}
//========================================================================
message AddMemberReq{
string uuid = 1;//uuid
string name = 2;//
string brief = 3;//
string introduction = 4;//
string operator = 5;//
int32 operatorId = 6;//Id
}
message AddMemberResp{
string msg = 1;
}
message EditMemberReq{
string uuid = 1;//uuid
string name = 2;//
string brief = 3;//
string introduction = 4;//
int32 sort = 5;//
string operator = 6;//
int32 operatorId = 7;//Id
}
message EditMemberResp{
string msg = 1;
}
message DeleteMemberReq{
string uuid = 1;//uuid
}
message DeleteMemberResp{
string msg = 1;
}
message Filtrate{
string name = 3;//
}
message GetMemberListReq{
int32 page = 1;
int32 pageSize = 2;
Filtrate filtrate = 3;//
}
message GetMemberListResp{
string msg = 1;
int32 page=2;
int32 pageSize =3;
int32 total = 4;
repeated Member data = 5;
}
message Member{
string uuid = 1;
string name = 2;
string brief = 3;
string introduction = 4;
int32 sort = 5;
Management management = 6;
BoardOfDirectors boardOfDirectors = 7;
CommitteeAppointments committeeAppointments = 8;
string updatedAt = 9;
string operator = 10;
}
//==========================================================================
message Management{
string name = 1;
string image = 2;
string brief = 3;
string introduction = 4;
int32 status = 5;
int32 isSetting = 6;
}
message EditManagementReq{
string uuid = 1;
string name = 2;
string image = 3;
int32 status = 4;
string brief = 5;
string introduction = 6;
int32 isSetting = 7;
string operator = 8;
int32 operatorId = 9;
}
message EditManagementResp{
string msg = 1;
}
message DisplayManagementReq{
}
message DisplayManagementResp{
repeated DisplayManagementItem item = 1;
}
message DisplayManagementItem{
string name = 1;
string image = 2;
string brief = 3;
string introduction = 4;
}
//========================================================================
message BoardOfDirectors{
string name = 1;
int32 status = 2;
string brief = 3;
string introduction = 4;
int32 isSetting = 5;
}
message EditBoardOfDirectorsReq{
string uuid = 1;
string name = 2;
int32 status = 3;
string brief = 4;
string introduction = 5;
int32 isSetting = 6;
string operator = 7;
int32 operatorId = 8;
}
message EditBoardOfDirectorsResp{
string msg = 1;
}
message DisplayBoardOfDirectorsReq{
}
message DisplayBoardOfDirectorsResp{
repeated DisplayBoardOfDirectorItem item = 1;
}
message DisplayBoardOfDirectorItem {
string name = 1;
string brief = 2;
string introduction = 3;
}
//========================================================================
message CommitteeAppointments{
string name = 1;
int32 status = 2;
int32 auditCommittee = 3;
int32 compensationCommittee = 4;
int32 nominatingCommittee = 5;
int32 isSetting = 6;
}
message EditCommitteeAppointmentsReq{
string uuid = 1;
string name = 2;
int32 status = 3;
int32 auditCommittee = 4;
int32 compensationCommittee = 5;
int32 nominatingCommittee = 6;
int32 isSetting = 7;
string operator = 8;
int32 operatorId = 9;
}
message EditCommitteeAppointmentsResp{
string msg = 1;
}
message DisplayCommitteeAppointmentsReq{
}
message DisplayCommitteeAppointmentsResp{
repeated DisplayCommitteeAppointmentsItem item = 1;
}
message DisplayCommitteeAppointmentsItem{
string name = 1;
int32 auditCommittee = 2;
int32 compensationCommittee = 3;
int32 nominatingCommittee = 4;
}

View File

@ -0,0 +1,149 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/members/members.proto
package members
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *AddMemberReq) Validate() error {
return nil
}
func (this *AddMemberResp) Validate() error {
return nil
}
func (this *EditMemberReq) Validate() error {
return nil
}
func (this *EditMemberResp) Validate() error {
return nil
}
func (this *DeleteMemberReq) Validate() error {
return nil
}
func (this *DeleteMemberResp) Validate() error {
return nil
}
func (this *Filtrate) Validate() error {
return nil
}
func (this *GetMemberListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetMemberListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *Member) Validate() error {
if this.Management != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Management); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Management", err)
}
}
if this.BoardOfDirectors != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.BoardOfDirectors); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("BoardOfDirectors", err)
}
}
if this.CommitteeAppointments != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.CommitteeAppointments); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("CommitteeAppointments", err)
}
}
return nil
}
func (this *Management) Validate() error {
return nil
}
func (this *EditManagementReq) Validate() error {
return nil
}
func (this *EditManagementResp) Validate() error {
return nil
}
func (this *DisplayManagementReq) Validate() error {
return nil
}
func (this *DisplayManagementResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayManagementItem) Validate() error {
return nil
}
func (this *BoardOfDirectors) Validate() error {
return nil
}
func (this *EditBoardOfDirectorsReq) Validate() error {
return nil
}
func (this *EditBoardOfDirectorsResp) Validate() error {
return nil
}
func (this *DisplayBoardOfDirectorsReq) Validate() error {
return nil
}
func (this *DisplayBoardOfDirectorsResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayBoardOfDirectorItem) Validate() error {
return nil
}
func (this *CommitteeAppointments) Validate() error {
return nil
}
func (this *EditCommitteeAppointmentsReq) Validate() error {
return nil
}
func (this *EditCommitteeAppointmentsResp) Validate() error {
return nil
}
func (this *DisplayCommitteeAppointmentsReq) Validate() error {
return nil
}
func (this *DisplayCommitteeAppointmentsResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayCommitteeAppointmentsItem) Validate() error {
return nil
}

View File

@ -0,0 +1,560 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// source: api/members/members.proto
package members
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// MembersClient is the client API for Members service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MembersClient interface {
// ==================================成员管理======================================
AddMember(ctx context.Context, in *AddMemberReq, opts ...grpc_go.CallOption) (*AddMemberResp, common.ErrorWithAttachment)
EditMember(ctx context.Context, in *EditMemberReq, opts ...grpc_go.CallOption) (*EditMemberResp, common.ErrorWithAttachment)
DeleteMember(ctx context.Context, in *DeleteMemberReq, opts ...grpc_go.CallOption) (*DeleteMemberResp, common.ErrorWithAttachment)
GetMemberList(ctx context.Context, in *GetMemberListReq, opts ...grpc_go.CallOption) (*GetMemberListResp, common.ErrorWithAttachment)
// ===================================成员信息管理=======================================
EditManagement(ctx context.Context, in *EditManagementReq, opts ...grpc_go.CallOption) (*EditManagementResp, common.ErrorWithAttachment)
DisplayManagement(ctx context.Context, in *DisplayManagementReq, opts ...grpc_go.CallOption) (*DisplayManagementResp, common.ErrorWithAttachment)
// ===================================董事会信息管理=======================================
EditBoardOfDirectors(ctx context.Context, in *EditBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*EditBoardOfDirectorsResp, common.ErrorWithAttachment)
DisplayBoardOfDirectors(ctx context.Context, in *DisplayBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*DisplayBoardOfDirectorsResp, common.ErrorWithAttachment)
// ==================================委员会任命管理======================================
EditCommitteeAppointments(ctx context.Context, in *EditCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*EditCommitteeAppointmentsResp, common.ErrorWithAttachment)
DisplayCommitteeAppointments(ctx context.Context, in *DisplayCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*DisplayCommitteeAppointmentsResp, common.ErrorWithAttachment)
}
type membersClient struct {
cc *triple.TripleConn
}
type MembersClientImpl struct {
AddMember func(ctx context.Context, in *AddMemberReq) (*AddMemberResp, error)
EditMember func(ctx context.Context, in *EditMemberReq) (*EditMemberResp, error)
DeleteMember func(ctx context.Context, in *DeleteMemberReq) (*DeleteMemberResp, error)
GetMemberList func(ctx context.Context, in *GetMemberListReq) (*GetMemberListResp, error)
EditManagement func(ctx context.Context, in *EditManagementReq) (*EditManagementResp, error)
DisplayManagement func(ctx context.Context, in *DisplayManagementReq) (*DisplayManagementResp, error)
EditBoardOfDirectors func(ctx context.Context, in *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error)
DisplayBoardOfDirectors func(ctx context.Context, in *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error)
EditCommitteeAppointments func(ctx context.Context, in *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error)
DisplayCommitteeAppointments func(ctx context.Context, in *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error)
}
func (c *MembersClientImpl) GetDubboStub(cc *triple.TripleConn) MembersClient {
return NewMembersClient(cc)
}
func (c *MembersClientImpl) XXX_InterfaceName() string {
return "members.Members"
}
func NewMembersClient(cc *triple.TripleConn) MembersClient {
return &membersClient{cc}
}
func (c *membersClient) AddMember(ctx context.Context, in *AddMemberReq, opts ...grpc_go.CallOption) (*AddMemberResp, common.ErrorWithAttachment) {
out := new(AddMemberResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddMember", in, out)
}
func (c *membersClient) EditMember(ctx context.Context, in *EditMemberReq, opts ...grpc_go.CallOption) (*EditMemberResp, common.ErrorWithAttachment) {
out := new(EditMemberResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditMember", in, out)
}
func (c *membersClient) DeleteMember(ctx context.Context, in *DeleteMemberReq, opts ...grpc_go.CallOption) (*DeleteMemberResp, common.ErrorWithAttachment) {
out := new(DeleteMemberResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteMember", in, out)
}
func (c *membersClient) GetMemberList(ctx context.Context, in *GetMemberListReq, opts ...grpc_go.CallOption) (*GetMemberListResp, common.ErrorWithAttachment) {
out := new(GetMemberListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetMemberList", in, out)
}
func (c *membersClient) EditManagement(ctx context.Context, in *EditManagementReq, opts ...grpc_go.CallOption) (*EditManagementResp, common.ErrorWithAttachment) {
out := new(EditManagementResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditManagement", in, out)
}
func (c *membersClient) DisplayManagement(ctx context.Context, in *DisplayManagementReq, opts ...grpc_go.CallOption) (*DisplayManagementResp, common.ErrorWithAttachment) {
out := new(DisplayManagementResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayManagement", in, out)
}
func (c *membersClient) EditBoardOfDirectors(ctx context.Context, in *EditBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*EditBoardOfDirectorsResp, common.ErrorWithAttachment) {
out := new(EditBoardOfDirectorsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditBoardOfDirectors", in, out)
}
func (c *membersClient) DisplayBoardOfDirectors(ctx context.Context, in *DisplayBoardOfDirectorsReq, opts ...grpc_go.CallOption) (*DisplayBoardOfDirectorsResp, common.ErrorWithAttachment) {
out := new(DisplayBoardOfDirectorsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayBoardOfDirectors", in, out)
}
func (c *membersClient) EditCommitteeAppointments(ctx context.Context, in *EditCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*EditCommitteeAppointmentsResp, common.ErrorWithAttachment) {
out := new(EditCommitteeAppointmentsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditCommitteeAppointments", in, out)
}
func (c *membersClient) DisplayCommitteeAppointments(ctx context.Context, in *DisplayCommitteeAppointmentsReq, opts ...grpc_go.CallOption) (*DisplayCommitteeAppointmentsResp, common.ErrorWithAttachment) {
out := new(DisplayCommitteeAppointmentsResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayCommitteeAppointments", in, out)
}
// MembersServer is the server API for Members service.
// All implementations must embed UnimplementedMembersServer
// for forward compatibility
type MembersServer interface {
// ==================================成员管理======================================
AddMember(context.Context, *AddMemberReq) (*AddMemberResp, error)
EditMember(context.Context, *EditMemberReq) (*EditMemberResp, error)
DeleteMember(context.Context, *DeleteMemberReq) (*DeleteMemberResp, error)
GetMemberList(context.Context, *GetMemberListReq) (*GetMemberListResp, error)
// ===================================成员信息管理=======================================
EditManagement(context.Context, *EditManagementReq) (*EditManagementResp, error)
DisplayManagement(context.Context, *DisplayManagementReq) (*DisplayManagementResp, error)
// ===================================董事会信息管理=======================================
EditBoardOfDirectors(context.Context, *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error)
DisplayBoardOfDirectors(context.Context, *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error)
// ==================================委员会任命管理======================================
EditCommitteeAppointments(context.Context, *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error)
DisplayCommitteeAppointments(context.Context, *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error)
mustEmbedUnimplementedMembersServer()
}
// UnimplementedMembersServer must be embedded to have forward compatible implementations.
type UnimplementedMembersServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedMembersServer) AddMember(context.Context, *AddMemberReq) (*AddMemberResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddMember not implemented")
}
func (UnimplementedMembersServer) EditMember(context.Context, *EditMemberReq) (*EditMemberResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditMember not implemented")
}
func (UnimplementedMembersServer) DeleteMember(context.Context, *DeleteMemberReq) (*DeleteMemberResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteMember not implemented")
}
func (UnimplementedMembersServer) GetMemberList(context.Context, *GetMemberListReq) (*GetMemberListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMemberList not implemented")
}
func (UnimplementedMembersServer) EditManagement(context.Context, *EditManagementReq) (*EditManagementResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditManagement not implemented")
}
func (UnimplementedMembersServer) DisplayManagement(context.Context, *DisplayManagementReq) (*DisplayManagementResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayManagement not implemented")
}
func (UnimplementedMembersServer) EditBoardOfDirectors(context.Context, *EditBoardOfDirectorsReq) (*EditBoardOfDirectorsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditBoardOfDirectors not implemented")
}
func (UnimplementedMembersServer) DisplayBoardOfDirectors(context.Context, *DisplayBoardOfDirectorsReq) (*DisplayBoardOfDirectorsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayBoardOfDirectors not implemented")
}
func (UnimplementedMembersServer) EditCommitteeAppointments(context.Context, *EditCommitteeAppointmentsReq) (*EditCommitteeAppointmentsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditCommitteeAppointments not implemented")
}
func (UnimplementedMembersServer) DisplayCommitteeAppointments(context.Context, *DisplayCommitteeAppointmentsReq) (*DisplayCommitteeAppointmentsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayCommitteeAppointments not implemented")
}
func (s *UnimplementedMembersServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedMembersServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedMembersServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Members_ServiceDesc
}
func (s *UnimplementedMembersServer) XXX_InterfaceName() string {
return "members.Members"
}
func (UnimplementedMembersServer) mustEmbedUnimplementedMembersServer() {}
// UnsafeMembersServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MembersServer will
// result in compilation errors.
type UnsafeMembersServer interface {
mustEmbedUnimplementedMembersServer()
}
func RegisterMembersServer(s grpc_go.ServiceRegistrar, srv MembersServer) {
s.RegisterService(&Members_ServiceDesc, srv)
}
func _Members_AddMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AddMemberReq)
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("AddMember", 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 _Members_EditMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditMemberReq)
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("EditMember", 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 _Members_DeleteMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteMemberReq)
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("DeleteMember", 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 _Members_GetMemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMemberListReq)
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("GetMemberList", 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 _Members_EditManagement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditManagementReq)
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("EditManagement", 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 _Members_DisplayManagement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayManagementReq)
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("DisplayManagement", 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 _Members_EditBoardOfDirectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditBoardOfDirectorsReq)
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("EditBoardOfDirectors", 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 _Members_DisplayBoardOfDirectors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayBoardOfDirectorsReq)
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("DisplayBoardOfDirectors", 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 _Members_EditCommitteeAppointments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditCommitteeAppointmentsReq)
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("EditCommitteeAppointments", 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 _Members_DisplayCommitteeAppointments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayCommitteeAppointmentsReq)
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("DisplayCommitteeAppointments", 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)
}
// Members_ServiceDesc is the grpc_go.ServiceDesc for Members service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Members_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "members.Members",
HandlerType: (*MembersServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "AddMember",
Handler: _Members_AddMember_Handler,
},
{
MethodName: "EditMember",
Handler: _Members_EditMember_Handler,
},
{
MethodName: "DeleteMember",
Handler: _Members_DeleteMember_Handler,
},
{
MethodName: "GetMemberList",
Handler: _Members_GetMemberList_Handler,
},
{
MethodName: "EditManagement",
Handler: _Members_EditManagement_Handler,
},
{
MethodName: "DisplayManagement",
Handler: _Members_DisplayManagement_Handler,
},
{
MethodName: "EditBoardOfDirectors",
Handler: _Members_EditBoardOfDirectors_Handler,
},
{
MethodName: "DisplayBoardOfDirectors",
Handler: _Members_DisplayBoardOfDirectors_Handler,
},
{
MethodName: "EditCommitteeAppointments",
Handler: _Members_EditCommitteeAppointments_Handler,
},
{
MethodName: "DisplayCommitteeAppointments",
Handler: _Members_DisplayCommitteeAppointments_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/members/members.proto",
}

2472
api/reports/reports.pb.go Normal file

File diff suppressed because it is too large Load Diff

194
api/reports/reports.proto Normal file
View File

@ -0,0 +1,194 @@
syntax = "proto3";
package reports;
//import "descriptor.proto";
//import "validator.proto";
option go_package = "./;reports";
service Reports{
//========================================================================
rpc GetAnnualReportList(GetAnnualReportListReq) returns (GetAnnualReportListResp);
rpc AddAnnualReport(AddAnnualReportReq) returns (AddAnnualReportResp);
rpc EditAnnualReport(EditAnnualReportReq) returns (EditAnnualReportResp);
rpc DeleteAnnualReport(DeleteAnnualReportReq) returns (DeleteAnnualReportResp);
rpc DisplayAnnualReport(DisplayAnnualReportReq) returns (DisplayAnnualReportResp);
//========================================================================
rpc GetQuarterlyReportList(GetQuarterlyReportListReq) returns (GetQuarterlyReportListResp);
rpc AddQuarterlyReport(AddQuarterlyReportReq) returns (AddQuarterlyReportResp);
rpc EditQuarterlyReport(EditQuarterlyReportReq) returns (EditQuarterlyReportResp);
rpc DeleteQuarterlyReport(DeleteQuarterlyReportReq) returns (DeleteQuarterlyReportResp);
rpc DisplayQuarterlyReport(DisplayQuarterlyReportReq) returns (DisplayQuarterlyReportResp);
}
message Filtrate{
string fileName = 3;//
int32 status = 4;//1:2:
}
message FiltrateWeb{
string fileName = 1;//
}
//========================================================================
message GetAnnualReportListReq{
int32 page = 1;
int32 pageSize = 2;
Filtrate filtrate = 3;
}
message GetAnnualReportListResp{
string msg = 1;
int32 page=2;
int32 pageSize =3;
int32 total = 4;
repeated AnnualReport data = 5;
}
message AnnualReport{
int32 id = 1; //id
string fileName = 2; //
int64 date = 3; //
string fileUrl = 4; //访
int32 status = 5; //12
int32 sort = 6; //
string updatedAt = 7; //
string operator = 8; //
int32 operatorId = 9; //Id
}
message AddAnnualReportReq{
string fileName = 1; //
int64 date = 2; //
string fileUrl = 3; //访
string operator = 4; //
int32 operatorId = 5; //Id
}
message AddAnnualReportResp{
string msg = 1;
}
message EditAnnualReportReq{
int32 id = 1; //id
string fileName = 2; //
int64 date = 3; //
string fileUrl = 4; //访
int32 sort = 5; //
int32 status = 6; //12
string operator = 7; //
int32 operatorId = 8; //Id
}
message EditAnnualReportResp{
string msg = 1;
}
message DeleteAnnualReportReq{
int32 id = 1;
}
message DeleteAnnualReportResp{
string msg = 1;
}
message DisplayAnnualReportReq{
int32 page = 1;
int32 pageSize = 2;
}
message DisplayAnnualReportResp{
int32 page=1;
int32 pageSize =2;
int32 total = 3;
repeated DisplayAnnualReportItem Item = 4;
}
message DisplayAnnualReportItem{
string fileName = 1;
int64 date = 2;
string fileUrl = 3;
}
//========================================================================
message GetQuarterlyReportListReq{
int32 page = 1;
int32 pageSize = 2;
Filtrate filtrate = 3;
}
message GetQuarterlyReportListResp{
string msg = 1;
int32 page=2;
int32 pageSize =3;
int32 total = 4;
repeated QuarterlyReport data = 5;
}
message QuarterlyReport{
int32 id = 1; //id
string fileName = 2; //
string fileIntroduce = 3; //
string attachment = 4; //
string attachmentName = 5; //
int32 sort = 6; //
int32 status = 7; //12
string updatedAt = 8; //
string operator = 9; //
int32 operatorId = 10; //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; //12
string operator = 8; //
int32 operatorId = 9; //Id
}
message EditQuarterlyReportResp{
string msg = 1;
}
message DeleteQuarterlyReportReq{
int32 id = 1;
}
message DeleteQuarterlyReportResp{
string msg = 1;
}
message DisplayQuarterlyReportReq{
int32 page = 1;
int32 pageSize = 2;
FiltrateWeb filtrate = 3;
}
message DisplayQuarterlyReportResp{
int32 page=1;
int32 pageSize =2;
int32 total = 3;
repeated DisplayQuarterlyReportItem Item = 4;
}
message DisplayQuarterlyReportItem {
string fileName =1;
string fileIntroduce = 2;
string attachment = 3;
string attachmentName = 4;
}

View File

@ -0,0 +1,138 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/reports/reports.proto
package reports
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *Filtrate) Validate() error {
return nil
}
func (this *FiltrateWeb) Validate() error {
return nil
}
func (this *GetAnnualReportListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetAnnualReportListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *AnnualReport) Validate() error {
return nil
}
func (this *AddAnnualReportReq) Validate() error {
return nil
}
func (this *AddAnnualReportResp) Validate() error {
return nil
}
func (this *EditAnnualReportReq) Validate() error {
return nil
}
func (this *EditAnnualReportResp) Validate() error {
return nil
}
func (this *DeleteAnnualReportReq) Validate() error {
return nil
}
func (this *DeleteAnnualReportResp) Validate() error {
return nil
}
func (this *DisplayAnnualReportReq) Validate() error {
return nil
}
func (this *DisplayAnnualReportResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayAnnualReportItem) Validate() error {
return nil
}
func (this *GetQuarterlyReportListReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *GetQuarterlyReportListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
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
}
func (this *DisplayQuarterlyReportReq) Validate() error {
if this.Filtrate != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Filtrate); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Filtrate", err)
}
}
return nil
}
func (this *DisplayQuarterlyReportResp) Validate() error {
for _, item := range this.Item {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Item", err)
}
}
}
return nil
}
func (this *DisplayQuarterlyReportItem) Validate() error {
return nil
}

View File

@ -0,0 +1,556 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// source: api/reports/reports.proto
package reports
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// ReportsClient is the client API for Reports service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ReportsClient interface {
// ==================================年度报告======================================
GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment)
AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment)
EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment)
DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment)
DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, 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)
DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment)
}
type reportsClient struct {
cc *triple.TripleConn
}
type ReportsClientImpl struct {
GetAnnualReportList func(ctx context.Context, in *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
AddAnnualReport func(ctx context.Context, in *AddAnnualReportReq) (*AddAnnualReportResp, error)
EditAnnualReport func(ctx context.Context, in *EditAnnualReportReq) (*EditAnnualReportResp, error)
DeleteAnnualReport func(ctx context.Context, in *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
DisplayAnnualReport func(ctx context.Context, in *DisplayAnnualReportReq) (*DisplayAnnualReportResp, 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)
DisplayQuarterlyReport func(ctx context.Context, in *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
}
func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient {
return NewReportsClient(cc)
}
func (c *ReportsClientImpl) XXX_InterfaceName() string {
return "reports.Reports"
}
func NewReportsClient(cc *triple.TripleConn) ReportsClient {
return &reportsClient{cc}
}
func (c *reportsClient) GetAnnualReportList(ctx context.Context, in *GetAnnualReportListReq, opts ...grpc_go.CallOption) (*GetAnnualReportListResp, common.ErrorWithAttachment) {
out := new(GetAnnualReportListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetAnnualReportList", in, out)
}
func (c *reportsClient) AddAnnualReport(ctx context.Context, in *AddAnnualReportReq, opts ...grpc_go.CallOption) (*AddAnnualReportResp, common.ErrorWithAttachment) {
out := new(AddAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddAnnualReport", in, out)
}
func (c *reportsClient) EditAnnualReport(ctx context.Context, in *EditAnnualReportReq, opts ...grpc_go.CallOption) (*EditAnnualReportResp, common.ErrorWithAttachment) {
out := new(EditAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/EditAnnualReport", in, out)
}
func (c *reportsClient) DeleteAnnualReport(ctx context.Context, in *DeleteAnnualReportReq, opts ...grpc_go.CallOption) (*DeleteAnnualReportResp, common.ErrorWithAttachment) {
out := new(DeleteAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteAnnualReport", in, out)
}
func (c *reportsClient) DisplayAnnualReport(ctx context.Context, in *DisplayAnnualReportReq, opts ...grpc_go.CallOption) (*DisplayAnnualReportResp, common.ErrorWithAttachment) {
out := new(DisplayAnnualReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayAnnualReport", in, out)
}
func (c *reportsClient) GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment) {
out := new(GetQuarterlyReportListResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
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)
}
func (c *reportsClient) DisplayQuarterlyReport(ctx context.Context, in *DisplayQuarterlyReportReq, opts ...grpc_go.CallOption) (*DisplayQuarterlyReportResp, common.ErrorWithAttachment) {
out := new(DisplayQuarterlyReportResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DisplayQuarterlyReport", in, out)
}
// ReportsServer is the server API for Reports service.
// All implementations must embed UnimplementedReportsServer
// for forward compatibility
type ReportsServer interface {
// ==================================年度报告======================================
GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error)
AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error)
EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error)
DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error)
DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, 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)
DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error)
mustEmbedUnimplementedReportsServer()
}
// UnimplementedReportsServer must be embedded to have forward compatible implementations.
type UnimplementedReportsServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedReportsServer) GetAnnualReportList(context.Context, *GetAnnualReportListReq) (*GetAnnualReportListResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAnnualReportList not implemented")
}
func (UnimplementedReportsServer) AddAnnualReport(context.Context, *AddAnnualReportReq) (*AddAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddAnnualReport not implemented")
}
func (UnimplementedReportsServer) EditAnnualReport(context.Context, *EditAnnualReportReq) (*EditAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method EditAnnualReport not implemented")
}
func (UnimplementedReportsServer) DeleteAnnualReport(context.Context, *DeleteAnnualReportReq) (*DeleteAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteAnnualReport not implemented")
}
func (UnimplementedReportsServer) DisplayAnnualReport(context.Context, *DisplayAnnualReportReq) (*DisplayAnnualReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayAnnualReport not implemented")
}
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 (UnimplementedReportsServer) DisplayQuarterlyReport(context.Context, *DisplayQuarterlyReportReq) (*DisplayQuarterlyReportResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisplayQuarterlyReport not implemented")
}
func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedReportsServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedReportsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Reports_ServiceDesc
}
func (s *UnimplementedReportsServer) XXX_InterfaceName() string {
return "reports.Reports"
}
func (UnimplementedReportsServer) mustEmbedUnimplementedReportsServer() {}
// UnsafeReportsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReportsServer will
// result in compilation errors.
type UnsafeReportsServer interface {
mustEmbedUnimplementedReportsServer()
}
func RegisterReportsServer(s grpc_go.ServiceRegistrar, srv ReportsServer) {
s.RegisterService(&Reports_ServiceDesc, srv)
}
func _Reports_GetAnnualReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAnnualReportListReq)
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("GetAnnualReportList", 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_AddAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AddAnnualReportReq)
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("AddAnnualReport", 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_EditAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(EditAnnualReportReq)
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("EditAnnualReport", 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_DeleteAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAnnualReportReq)
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("DeleteAnnualReport", 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_DisplayAnnualReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayAnnualReportReq)
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("DisplayAnnualReport", 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_GetQuarterlyReportList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetQuarterlyReportListReq)
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("GetQuarterlyReportList", 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_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)
}
func _Reports_DisplayQuarterlyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DisplayQuarterlyReportReq)
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("DisplayQuarterlyReport", 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)
var Reports_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "reports.Reports",
HandlerType: (*ReportsServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "GetAnnualReportList",
Handler: _Reports_GetAnnualReportList_Handler,
},
{
MethodName: "AddAnnualReport",
Handler: _Reports_AddAnnualReport_Handler,
},
{
MethodName: "EditAnnualReport",
Handler: _Reports_EditAnnualReport_Handler,
},
{
MethodName: "DeleteAnnualReport",
Handler: _Reports_DeleteAnnualReport_Handler,
},
{
MethodName: "DisplayAnnualReport",
Handler: _Reports_DisplayAnnualReport_Handler,
},
{
MethodName: "GetQuarterlyReportList",
Handler: _Reports_GetQuarterlyReportList_Handler,
},
{
MethodName: "AddQuarterlyReport",
Handler: _Reports_AddQuarterlyReport_Handler,
},
{
MethodName: "EditQuarterlyReport",
Handler: _Reports_EditQuarterlyReport_Handler,
},
{
MethodName: "DeleteQuarterlyReport",
Handler: _Reports_DeleteQuarterlyReport_Handler,
},
{
MethodName: "DisplayQuarterlyReport",
Handler: _Reports_DisplayQuarterlyReport_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "api/reports/reports.proto",
}

6
clear.sh Normal file
View File

@ -0,0 +1,6 @@
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,}';
ls api/secFilings/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
ls api/governance/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
ls api/pressreleases/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';

View File

@ -21,6 +21,9 @@ func main() {
config.SetProviderService(&controller.GovernanceProvider{})
config.SetProviderService(&controller.PressReleasesProvider{})
config.SetProviderService(&controller.SecFilingsProvider{})
config.SetProviderService(&controller.ReportProvider{})
config.SetProviderService(&controller.EmailAlertsProvider{})
config.SetProviderService(&controller.MembersProvider{})
if err := config.Load(); err != nil {
panic(err)

View File

@ -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

View File

@ -1,5 +1,5 @@
docDb:
host: 172.16.100.99:9007
user: artuser
password: C250PflXIWv2SQm8
host: 172.16.99.5:3306
user: root
password: StrongPass123!
dbName: micro-document

View File

@ -2,7 +2,7 @@ dubbo:
registries:
demoZK:
protocol: zookeeper
address: 172.16.100.93:2181
address: 172.16.99.5:2181
protocols:
triple:
name: tri

View File

@ -0,0 +1,19 @@
package controller
import (
"context"
"micro-document/api/emailAlerts"
"micro-document/internel/logic"
)
type EmailAlertsProvider struct {
emailAlerts.UnimplementedEmailAlertsServer
}
func (EmailAlertsProvider) EmailAlertsSubmit(_ context.Context, req *emailAlerts.EmailAlertsSubmitReq) (*emailAlerts.EmailAlertsSubmitResp, error) {
return logic.EmailAlertsLogic.EmailAlertsSubmit(req)
}
func (EmailAlertsProvider) GetEmailInformationList(_ context.Context, req *emailAlerts.GetEmailInformationListReq) (*emailAlerts.GetEmailInformationListResp, error) {
return logic.EmailAlertsLogic.GetEmailInformationList(req)
}

View File

@ -0,0 +1,55 @@
package controller
import (
"context"
"micro-document/api/members"
"micro-document/internel/logic"
)
type MembersProvider struct {
members.UnimplementedMembersServer
}
// ==================================成员管理======================================
func (MembersProvider) AddMember(_ context.Context, req *members.AddMemberReq) (*members.AddMemberResp, error) {
return logic.MembersLogic.AddMember(req)
}
func (MembersProvider) EditMember(_ context.Context, req *members.EditMemberReq) (*members.EditMemberResp, error) {
return logic.MembersLogic.EditMember(req)
}
func (MembersProvider) DeleteMember(_ context.Context, req *members.DeleteMemberReq) (*members.DeleteMemberResp, error) {
return logic.MembersLogic.DeleteMember(req)
}
func (MembersProvider) GetMemberList(_ context.Context, req *members.GetMemberListReq) (*members.GetMemberListResp, error) {
return logic.MembersLogic.GetMemberList(req)
}
// ===================================成员信息管理=======================================
func (MembersProvider) EditManagement(_ context.Context, req *members.EditManagementReq) (*members.EditManagementResp, error) {
return logic.MembersLogic.EditManagement(req)
}
func (MembersProvider) DisplayManagement(_ context.Context, req *members.DisplayManagementReq) (*members.DisplayManagementResp, error) {
return logic.MembersLogic.DisplayManagement(req)
}
// ==================================董事会信息管理======================================
func (MembersProvider) EditBoardOfDirectors(_ context.Context, req *members.EditBoardOfDirectorsReq) (*members.EditBoardOfDirectorsResp, error) {
return logic.MembersLogic.EditBoardOfDirectors(req)
}
func (MembersProvider) DisplayBoardOfDirectors(_ context.Context, req *members.DisplayBoardOfDirectorsReq) (*members.DisplayBoardOfDirectorsResp, error) {
return logic.MembersLogic.DisplayBoardOfDirectors(req)
}
// ==================================委员会任命管理======================================
func (MembersProvider) EditCommitteeAppointments(_ context.Context, req *members.EditCommitteeAppointmentsReq) (*members.EditCommitteeAppointmentsResp, error) {
return logic.MembersLogic.EditCommitteeAppointments(req)
}
func (MembersProvider) DisplayCommitteeAppointments(_ context.Context, req *members.DisplayCommitteeAppointmentsReq) (*members.DisplayCommitteeAppointmentsResp, error) {
return logic.MembersLogic.DisplayCommitteeAppointments(req)
}

View File

@ -0,0 +1,63 @@
package controller
import (
"context"
"micro-document/api/reports"
"micro-document/internel/logic"
)
type ReportProvider struct {
reports.UnimplementedReportsServer
}
// =======================================年度报告=======================================
// 获取年度报告列表
func (ReportProvider) GetAnnualReportList(_ context.Context, req *reports.GetAnnualReportListReq) (resp *reports.GetAnnualReportListResp, err error) {
return logic.AnnualReportsLogic.List(req)
}
// 新增年度报告
func (ReportProvider) AddAnnualReport(_ context.Context, req *reports.AddAnnualReportReq) (resp *reports.AddAnnualReportResp, err error) {
return logic.AnnualReportsLogic.Add(req)
}
// 编辑年度报告
func (ReportProvider) EditAnnualReport(_ context.Context, req *reports.EditAnnualReportReq) (resp *reports.EditAnnualReportResp, err error) {
return logic.AnnualReportsLogic.Edit(req)
}
// 删除年度报告
func (ReportProvider) DeleteAnnualReport(_ context.Context, req *reports.DeleteAnnualReportReq) (resp *reports.DeleteAnnualReportResp, err error) {
return logic.AnnualReportsLogic.Delete(req)
}
// 年度报告展示列表
func (ReportProvider) DisplayAnnualReport(_ context.Context, req *reports.DisplayAnnualReportReq) (resp *reports.DisplayAnnualReportResp, err error) {
return logic.AnnualReportsLogic.Display(req)
}
// =======================================季度报告=======================================
// 获取季度报告列表
func (ReportProvider) GetQuarterlyReportList(_ context.Context, req *reports.GetQuarterlyReportListReq) (resp *reports.GetQuarterlyReportListResp, err error) {
return logic.QuarterlyReportsLogic.List(req)
}
// 增加季度报告
func (ReportProvider) AddQuarterlyReport(_ context.Context, req *reports.AddQuarterlyReportReq) (resp *reports.AddQuarterlyReportResp, err error) {
return logic.QuarterlyReportsLogic.Add(req)
}
// 编辑季度报告
func (ReportProvider) EditQuarterlyReport(_ context.Context, req *reports.EditQuarterlyReportReq) (resp *reports.EditQuarterlyReportResp, err error) {
return logic.QuarterlyReportsLogic.Edit(req)
}
// 删除季度报告
func (ReportProvider) DeleteQuarterlyReport(_ context.Context, req *reports.DeleteQuarterlyReportReq) (resp *reports.DeleteQuarterlyReportResp, err error) {
return logic.QuarterlyReportsLogic.Delete(req)
}
// 季度报告展示列表
func (ReportProvider) DisplayQuarterlyReport(_ context.Context, req *reports.DisplayQuarterlyReportReq) (resp *reports.DisplayQuarterlyReportResp, err error) {
return logic.QuarterlyReportsLogic.Display(req)
}

View File

@ -0,0 +1,117 @@
package dao
import (
"errors"
"micro-document/api/reports"
"micro-document/internel/model"
"micro-document/pkg/db"
"micro-document/pkg/msg"
"time"
)
type annualReportsDao struct{}
var AnnualReportsDao = new(annualReportsDao)
func (annualReportsDao) List(req *reports.GetAnnualReportListReq) (data []model.AnnualReport, total int64, err error) {
dbQuery := db.DocDB.Model(&model.AnnualReport{})
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 = dbQuery.Order("updated_at DESC")
//数据查询
dbQuery.Count(&total)
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
return
}
return
}
func (annualReportsDao) Add(req *reports.AddAnnualReportReq) (err error) {
if req.FileName == "" {
return errors.New("文件名称不能为空")
}
if req.Date == 0 {
return errors.New("日期不能为空")
}
if req.FileUrl == "" {
return errors.New("文件地址不能为空")
}
err = db.DocDB.Model(&model.AnnualReport{}).Create(&model.AnnualReport{
FileName: req.FileName,
Date: req.Date,
FileUrl: req.FileUrl,
Operator: req.Operator,
OperatorId: req.OperatorId,
}).Error
if err != nil {
return errors.New("新增年度报告失败")
}
return
}
func (annualReportsDao) Edit(req *reports.EditAnnualReportReq) (err error) {
if req.FileName == "" {
return errors.New("文件名称不能为空")
}
if req.Date == 0 {
return errors.New("日期不能为空")
}
if req.FileUrl == "" {
return errors.New("文件地址不能为空")
}
err = db.DocDB.Model(&model.AnnualReport{}).Where("id = ?", req.Id).UpdateColumns(&model.AnnualReport{
FileName: req.FileName,
Date: req.Date,
FileUrl: req.FileUrl,
Status: req.Status,
Sort: req.Sort,
Operator: req.Operator,
OperatorId: req.OperatorId,
UpdatedAt: time.Now(),
}).Error
if err != nil {
return errors.New("编辑年度报告失败")
}
return
}
func (annualReportsDao) Delete(req *reports.DeleteAnnualReportReq) (err error) {
// 先查询记录是否存在且状态允许删除
var report model.AnnualReport
err = db.DocDB.Model(&model.AnnualReport{}).Where("id = ?", req.Id).First(&report).Error
if err != nil {
return errors.New("查询记录失败")
}
// 检查状态如果status=1则不允许删除
if report.Status == 1 {
return errors.New("该记录已上架,不允许删除")
}
// 执行删除操作
err = db.DocDB.Model(&model.AnnualReport{}).Where("id = ?", req.Id).Delete(&model.AnnualReport{}).Error
if err != nil {
return errors.New("删除年度报告失败")
}
return
}
func (annualReportsDao) Display(req *reports.DisplayAnnualReportReq) (data []model.AnnualReport, total int64, err error) {
result := db.DocDB.Model(&model.AnnualReport{})
result = result.Where("status = ?", msg.StatusOnline).Order("sort ASC")
result.Count(&total)
err = result.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
return nil, 0, errors.New("查询年度报告失败")
}
return data, total, nil
}

View File

@ -0,0 +1,48 @@
package dao
import (
"errors"
"micro-document/api/emailAlerts"
"micro-document/internel/model"
"micro-document/pkg/db"
)
type emailAlertsDao struct{}
var EmailAlertsDao = new(emailAlertsDao)
func (emailAlertsDao) Submit(req *emailAlerts.EmailAlertsSubmitReq) (err error) {
err = db.DocDB.Model(&model.EmailAlerts{}).Create(&model.EmailAlerts{
FirstName: req.FirstName,
LastName: req.LastName,
FullName: req.FirstName + req.LastName,
Email: req.Email,
Company: req.Company,
Phone: req.Phone,
}).Error
if err != nil {
return errors.New("新增邮件提醒失败")
}
return
}
func (emailAlertsDao) GetEmailInformationList(req *emailAlerts.GetEmailInformationListReq) (data []model.EmailAlerts, total int64, err error) {
dbQuery := db.DocDB.Model(&model.EmailAlerts{})
if req.Filtrate != nil {
if req.Filtrate.Name != "" {
dbQuery = dbQuery.Where("full_name LIKE ?", "%"+req.Filtrate.Name+"%")
}
if req.Filtrate.Email != "" {
dbQuery = dbQuery.Where("email LIKE ?", "%"+req.Filtrate.Email+"%")
}
if req.Filtrate.Company != "" {
dbQuery = dbQuery.Where("company LIKE ?", "%"+req.Filtrate.Company+"%")
}
}
dbQuery.Count(&total)
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
return
}
return
}

376
internel/dao/members.go Normal file
View File

@ -0,0 +1,376 @@
package dao
import (
"errors"
"micro-document/api/members"
"micro-document/internel/model"
"micro-document/pkg/db"
"micro-document/pkg/msg"
"time"
"gorm.io/gorm"
)
type membersDao struct{}
var MembersDao = new(membersDao)
func (membersDao) AddMember(req *members.AddMemberReq) (err error) {
if req.Name == "" {
return errors.New("姓名不能为空")
}
err = db.DocDB.Model(&model.Members{}).Create(&model.Members{
Uuid: req.Uuid,
Name: req.Name,
Brief: req.Brief,
Introduction: req.Introduction,
Operator: req.Operator,
OperatorID: req.OperatorId,
}).Error
if err != nil {
return errors.New("新增成员失败")
}
//同步增加成员管理,委员会,董事会信息
err = db.DocDB.Model(&model.Management{}).Create(&model.Management{
Uuid: req.Uuid,
Name: req.Name,
Brief: req.Brief,
Introduction: req.Introduction,
}).Error
if err != nil {
return errors.New("新增成员管理失败")
}
err = db.DocDB.Model(&model.BoardOfDirectors{}).Create(&model.BoardOfDirectors{
Uuid: req.Uuid,
Name: req.Name,
Brief: req.Brief,
Introduction: req.Introduction,
}).Error
if err != nil {
return errors.New("新增董事会失败")
}
err = db.DocDB.Model(&model.CommitteeAppointments{}).Create(&model.CommitteeAppointments{
Uuid: req.Uuid,
Name: req.Name,
}).Error
if err != nil {
return errors.New("新增委员会失败")
}
return
}
func (membersDao) EditMember(req *members.EditMemberReq) (err error) {
if req.Name == "" {
return errors.New("姓名不能为空")
}
err = db.DocDB.Model(&model.Members{}).Where("uuid = ?", req.Uuid).Select("name", "brief", "introduction", "sort", "operator", "operator_id").Updates(&model.Members{
Name: req.Name,
Brief: req.Brief,
Introduction: req.Introduction,
Sort: req.Sort,
Operator: req.Operator,
OperatorID: req.OperatorId,
UpdatedAt: time.Now(),
}).Error
return
}
// 删除成员及其相关记录
func (membersDao) DeleteMember(req *members.DeleteMemberReq) (err error) {
return db.DocDB.Transaction(func(tx *gorm.DB) error {
// 检查所有相关记录的状态
if err := checkAllStatus(tx, req.Uuid); err != nil {
return err
}
// 删除所有相关记录
if err := deleteAllRecords(tx, req.Uuid); err != nil {
return err
}
return nil
})
}
// 检查所有记录状态
func checkAllStatus(tx *gorm.DB, uuid string) error {
tables := []struct {
model interface{}
name string
}{
{&model.Management{}, "成员管理"},
{&model.BoardOfDirectors{}, "董事会"},
{&model.CommitteeAppointments{}, "委员会"},
}
for _, table := range tables {
var count int64
err := tx.Model(table.model).Where("uuid = ? AND status = ?", uuid, 1).Count(&count).Error
if err != nil {
return errors.New("查询" + table.name + "失败")
}
if count > 0 {
return errors.New("该" + table.name + "已上架,不允许删除")
}
}
return nil
}
// 删除所有记录
func deleteAllRecords(tx *gorm.DB, uuid string) error {
tables := []struct {
model interface{}
name string
}{
{&model.Members{}, "成员"},
{&model.Management{}, "成员管理"},
{&model.BoardOfDirectors{}, "董事会"},
{&model.CommitteeAppointments{}, "委员会"},
}
for _, table := range tables {
err := tx.Model(table.model).Where("uuid = ?", uuid).Delete(table.model).Error
if err != nil {
return errors.New("删除" + table.name + "失败")
}
}
return nil
}
// 获取成员列表
func (membersDao) GetMemberList(req *members.GetMemberListReq) (data []model.Members, total int64, err error) {
dbQuery := db.DocDB.Model(&model.Members{})
if req.Filtrate != nil {
if req.Filtrate.Name != "" {
dbQuery = dbQuery.Where("name like ?", "%"+req.Filtrate.Name+"%")
}
}
//数据查询
dbQuery.Count(&total)
err = dbQuery.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
return
}
return
}
// 通过uuid查询成员管理
func (membersDao) GetManagementByUuid(uuid string) (management model.Management, err error) {
management = model.Management{}
err = db.DocDB.Model(&model.Management{}).Where("uuid = ?", uuid).First(&management).Error
if err != nil {
return
}
return
}
// 通过uuid查询董事会
func (membersDao) GetBoardOfDirectorsByUuid(uuid string) (boardOfDirectors model.BoardOfDirectors, err error) {
boardOfDirectors = model.BoardOfDirectors{}
err = db.DocDB.Model(&model.BoardOfDirectors{}).Where("uuid = ?", uuid).First(&boardOfDirectors).Error
if err != nil {
return
}
return
}
// 通过uuid查询委员会
func (membersDao) GetCommitteeAppointmentsByUuid(uuid string) (committeeAppointments model.CommitteeAppointments, err error) {
committeeAppointments = model.CommitteeAppointments{}
err = db.DocDB.Model(&model.CommitteeAppointments{}).Where("uuid = ?", uuid).First(&committeeAppointments).Error
if err != nil {
return
}
return
}
// 编辑成员管理
func (membersDao) EditManagement(req *members.EditManagementReq) (err error) {
if req.Status == 0 {
return errors.New("状态不能为空")
}
if req.Introduction == "" {
return errors.New("详细介绍不能为空")
}
err = db.DocDB.Model(&model.Management{}).Where("uuid = ?", req.Uuid).Select("name", "image", "status", "brief", "introduction", "is_setting").Updates(&model.Management{
Name: req.Name,
Image: req.Image,
Status: req.Status,
Brief: req.Brief,
Introduction: req.Introduction,
IsSetting: 1,
}).Error
if err != nil {
return errors.New("编辑成员管理失败")
}
//更新主表操作人员信息和时间
err = db.DocDB.Model(&model.Members{}).Where("uuid = ?", req.Uuid).Updates(&model.Members{
Operator: req.Operator,
OperatorID: req.OperatorId,
UpdatedAt: time.Now(),
}).Error
if err != nil {
return errors.New("更新操作人员信息和时间失败")
}
return
}
// 编辑董事会
func (membersDao) EditBoardOfDirectors(req *members.EditBoardOfDirectorsReq) (err error) {
if req.Status == 0 {
return errors.New("状态不能为空")
}
if req.Introduction == "" {
return errors.New("详细介绍不能为空")
}
err = db.DocDB.Model(&model.BoardOfDirectors{}).Where("uuid = ?", req.Uuid).Select("name", "status", "brief", "introduction", "is_setting").Updates(&model.BoardOfDirectors{
Name: req.Name,
Status: req.Status,
Brief: req.Brief,
Introduction: req.Introduction,
IsSetting: 1,
}).Error
if err != nil {
return errors.New("编辑董事会失败")
}
//更新主表操作人员信息和时间
err = db.DocDB.Model(&model.Members{}).Where("uuid = ?", req.Uuid).Updates(&model.Members{
Operator: req.Operator,
OperatorID: req.OperatorId,
UpdatedAt: time.Now(),
}).Error
if err != nil {
return errors.New("更新操作人员信息和时间失败")
}
return
}
// 编辑委员会
func (membersDao) EditCommitteeAppointments(req *members.EditCommitteeAppointmentsReq) (err error) {
if req.AuditCommittee == 0 {
return errors.New("审计委员会不能为空")
}
if req.CompensationCommittee == 0 {
return errors.New("薪酬委员会不能为空")
}
if req.NominatingCommittee == 0 {
return errors.New("提名委员会不能为空")
}
if req.Status == 0 {
return errors.New("状态不能为空")
}
err = db.DocDB.Model(&model.CommitteeAppointments{}).Where("uuid = ?", req.Uuid).Updates(&model.CommitteeAppointments{
Name: req.Name,
Status: req.Status,
AuditCommittee: req.AuditCommittee,
CompensationCommittee: req.CompensationCommittee,
NominatingCommittee: req.NominatingCommittee,
IsSetting: 1,
}).Error
if err != nil {
return errors.New("编辑委员会失败")
}
//更新主表操作人员信息和时间
err = db.DocDB.Model(&model.Members{}).Where("uuid = ?", req.Uuid).Updates(&model.Members{
Operator: req.Operator,
OperatorID: req.OperatorId,
UpdatedAt: time.Now(),
}).Error
if err != nil {
return errors.New("更新操作人员信息和时间失败")
}
return
}
// =============批量查询成员管理,董事会,委员会接口==================
// 批量查询成员管理
func (membersDao) GetManagementByUuids(uuids []string) (map[string]model.Management, error) {
var managementList []model.Management
err := db.DocDB.Model(&model.Management{}).Where("uuid IN ?", uuids).Find(&managementList).Error
if err != nil {
return nil, err
}
// 转换为map
managementMap := make(map[string]model.Management)
for _, management := range managementList {
managementMap[management.Uuid] = management
}
return managementMap, nil
}
// 批量查询董事会
func (membersDao) GetBoardOfDirectorsByUuids(uuids []string) (map[string]model.BoardOfDirectors, error) {
var boardOfDirectorsList []model.BoardOfDirectors
err := db.DocDB.Model(&model.BoardOfDirectors{}).Where("uuid IN ?", uuids).Find(&boardOfDirectorsList).Error
if err != nil {
return nil, err
}
boardOfDirectorsMap := make(map[string]model.BoardOfDirectors)
for _, boardOfDirectors := range boardOfDirectorsList {
boardOfDirectorsMap[boardOfDirectors.Uuid] = boardOfDirectors
}
return boardOfDirectorsMap, nil
}
// 批量查询委员会
func (membersDao) GetCommitteeAppointmentsByUuids(uuids []string) (map[string]model.CommitteeAppointments, error) {
var committeeAppointmentsList []model.CommitteeAppointments
err := db.DocDB.Model(&model.CommitteeAppointments{}).Where("uuid IN ?", uuids).Find(&committeeAppointmentsList).Error
if err != nil {
return nil, err
}
committeeAppointmentsMap := make(map[string]model.CommitteeAppointments)
for _, committeeAppointments := range committeeAppointmentsList {
committeeAppointmentsMap[committeeAppointments.Uuid] = committeeAppointments
}
return committeeAppointmentsMap, nil
}
// =============批量查询官网展示成员管理,董事会,委员会接口==================
// 批量查询成员管理
func (membersDao) GetDisplayManagementList() (managementList []model.Management, err error) {
err = db.DocDB.Table("management").
Select("management.name", "management.image", "management.brief", "management.introduction").
Joins("INNER JOIN members ON management.uuid = members.uuid").
Where("management.status = ?", msg.StatusOnline). // 上架状态
Order("members.sort ASC"). // 按members表的sort字段升序排序
Find(&managementList).Error
if err != nil {
return nil, err
}
return
}
// 批量查询董事会
func (membersDao) GetDisplayBoardOfDirectorsList() (boardOfDirectorsList []model.BoardOfDirectors, err error) {
err = db.DocDB.Table("board_of_directors").
Select("board_of_directors.name", "board_of_directors.brief", "board_of_directors.introduction").
Joins("INNER JOIN members ON board_of_directors.uuid = members.uuid").
Where("board_of_directors.status = ?", msg.StatusOnline). // 上架状态
Order("members.sort ASC"). // 按members表的sort字段升序排序
Find(&boardOfDirectorsList).Error
if err != nil {
return nil, err
}
return
}
// 批量查询委员会
func (membersDao) GetDisplayCommitteeAppointmentsList() (committeeAppointmentsList []model.CommitteeAppointments, err error) {
err = db.DocDB.Table("committee_appointments").
Select("committee_appointments.name", "committee_appointments.audit_committee", "committee_appointments.compensation_committee", "committee_appointments.nominating_committee").
Joins("INNER JOIN members ON committee_appointments.uuid = members.uuid").
Where("committee_appointments.status = ?", msg.StatusOnline). // 上架状态
Order("members.sort ASC"). // 按members表的sort字段升序排序
Find(&committeeAppointmentsList).Error
if err != nil {
return nil, err
}
return
}

View File

@ -0,0 +1,116 @@
package dao
import (
"errors"
"micro-document/api/reports"
"micro-document/internel/model"
"micro-document/pkg/db"
"micro-document/pkg/msg"
"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 = dbQuery.Order("updated_at DESC")
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) {
if req.FileName == "" {
return errors.New("文件名称不能为空")
}
if req.Attachment == "" {
return errors.New("附件不能为空")
}
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) {
if req.FileName == "" {
return errors.New("文件名称不能为空")
}
if req.Attachment == "" {
return errors.New("附件不能为空")
}
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) {
// 先查询记录是否存在且状态允许删除
var report model.QuarterlyReport
err = db.DocDB.Model(&model.QuarterlyReport{}).Where("id = ?", req.Id).First(&report).Error
if err != nil {
return errors.New("查询记录失败")
}
// 检查状态如果status=1则不允许删除
if report.Status == 1 {
return errors.New("该记录已上架,不允许删除")
}
// 执行删除操作
err = db.DocDB.Model(&model.QuarterlyReport{}).Where("id = ?", req.Id).Delete(&model.QuarterlyReport{}).Error
if err != nil {
return errors.New("删除季度报告失败")
}
return
}
func (quarterlyReportsDao) Display(req *reports.DisplayQuarterlyReportReq) (data []model.QuarterlyReport, total int64, err error) {
result := db.DocDB.Model(&model.QuarterlyReport{})
if req.Filtrate != nil {
if req.Filtrate.FileName != "" {
result = result.Where("file_name LIKE ?", "%"+req.Filtrate.FileName+"%")
}
}
result = result.Where("status = ?", msg.StatusOnline).Order("sort ASC")
result.Count(&total)
err = result.Scopes(db.Pagination(req.Page, req.PageSize)).Find(&data).Error
if err != nil {
return nil, 0, errors.New("查询季度报告失败")
}
return
}

View File

@ -0,0 +1,82 @@
package logic
import (
"errors"
"micro-document/api/reports"
"micro-document/internel/dao"
"micro-document/internel/model"
util "micro-document/pkg/utils"
"github.com/jinzhu/copier"
"github.com/samber/lo"
)
type annualReportsLogic struct{}
var AnnualReportsLogic = new(annualReportsLogic)
func (annualReportsLogic) List(req *reports.GetAnnualReportListReq) (result *reports.GetAnnualReportListResp, err error) {
result = &reports.GetAnnualReportListResp{
Page: req.Page,
PageSize: req.PageSize,
}
data, total, err := dao.AnnualReportsDao.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 (annualReportsLogic) Add(req *reports.AddAnnualReportReq) (result *reports.AddAnnualReportResp, err error) {
result = &reports.AddAnnualReportResp{}
err = dao.AnnualReportsDao.Add(req)
if err != nil {
return nil, err
}
result.Msg = "新增年度报告成功"
return result, nil
}
func (annualReportsLogic) Edit(req *reports.EditAnnualReportReq) (result *reports.EditAnnualReportResp, err error) {
result = &reports.EditAnnualReportResp{}
err = dao.AnnualReportsDao.Edit(req)
if err != nil {
return nil, err
}
result.Msg = "编辑年度报告成功"
return result, nil
}
func (annualReportsLogic) Delete(req *reports.DeleteAnnualReportReq) (result *reports.DeleteAnnualReportResp, err error) {
result = &reports.DeleteAnnualReportResp{}
err = dao.AnnualReportsDao.Delete(req)
if err != nil {
return nil, err
}
result.Msg = "删除年度报告成功"
return result, nil
}
func (annualReportsLogic) Display(req *reports.DisplayAnnualReportReq) (result *reports.DisplayAnnualReportResp, err error) {
result = &reports.DisplayAnnualReportResp{
Page: req.Page,
PageSize: req.PageSize,
}
data, total, err := dao.AnnualReportsDao.Display(req)
if err != nil {
return nil, err
}
result.Total = int32(total)
result.Item = lo.Map(data, func(m model.AnnualReport, i int) *reports.DisplayAnnualReportItem {
return &reports.DisplayAnnualReportItem{
FileName: m.FileName,
Date: m.Date,
FileUrl: m.FileUrl,
}
})
return result, nil
}

View File

@ -0,0 +1,53 @@
package logic
import (
"errors"
"micro-document/api/emailAlerts"
"micro-document/internel/dao"
util "micro-document/pkg/utils"
"github.com/jinzhu/copier"
)
type emailAlertsLogic struct{}
var EmailAlertsLogic = new(emailAlertsLogic)
func (emailAlertsLogic) EmailAlertsSubmit(req *emailAlerts.EmailAlertsSubmitReq) (result *emailAlerts.EmailAlertsSubmitResp, err error) {
result = &emailAlerts.EmailAlertsSubmitResp{}
if req.FirstName == "" {
return nil, errors.New("FirstName is null")
}
if req.LastName == "" {
return nil, errors.New("LastName is null")
}
if req.Email == "" {
return nil, errors.New("Email is null")
}
if req.Company == "" {
return nil, errors.New("Company is null")
}
if req.Phone == "" {
return nil, errors.New("Phone is null")
}
err = dao.EmailAlertsDao.Submit(req)
if err != nil {
result.Msg = err.Error()
return nil, err
}
result.Msg = "新增邮件提醒成功"
return
}
func (emailAlertsLogic) GetEmailInformationList(req *emailAlerts.GetEmailInformationListReq) (result *emailAlerts.GetEmailInformationListResp, err error) {
result = &emailAlerts.GetEmailInformationListResp{}
data, total, err := dao.EmailAlertsDao.GetEmailInformationList(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
}

223
internel/logic/members.go Normal file
View File

@ -0,0 +1,223 @@
package logic
import (
"errors"
"micro-document/api/members"
"micro-document/internel/dao"
"micro-document/internel/model"
"github.com/google/uuid"
"github.com/samber/lo"
)
type membersLogic struct{}
var MembersLogic = new(membersLogic)
func (membersLogic) AddMember(req *members.AddMemberReq) (result *members.AddMemberResp, err error) {
result = &members.AddMemberResp{}
if req.Uuid == "" {
req.Uuid = uuid.New().String()
}
if req.Name == "" {
return nil, errors.New("姓名不能为空")
}
err = dao.MembersDao.AddMember(req)
if err != nil {
return nil, err
}
result.Msg = "新增成员成功"
return
}
func (membersLogic) EditMember(req *members.EditMemberReq) (result *members.EditMemberResp, err error) {
result = &members.EditMemberResp{}
err = dao.MembersDao.EditMember(req)
if err != nil {
return nil, err
}
result.Msg = "编辑成员成功"
return
}
func (membersLogic) DeleteMember(req *members.DeleteMemberReq) (result *members.DeleteMemberResp, err error) {
result = &members.DeleteMemberResp{}
err = dao.MembersDao.DeleteMember(req)
if err != nil {
return nil, err
}
result.Msg = "删除成员成功"
return
}
func (membersLogic) GetMemberList(req *members.GetMemberListReq) (result *members.GetMemberListResp, err error) {
result = &members.GetMemberListResp{
Page: req.Page,
PageSize: req.PageSize,
}
data, total, err := dao.MembersDao.GetMemberList(req)
if err != nil {
return nil, errors.New("查询成员列表失败")
}
//查询获取成员管理,董事会,委员会信息
result.Total = int32(total)
result.Data = make([]*members.Member, len(data))
for i, member := range data {
result.Data[i] = &members.Member{
Uuid: member.Uuid,
Name: member.Name,
Brief: member.Brief,
Introduction: member.Introduction,
Sort: member.Sort,
UpdatedAt: member.UpdatedAt.Format("2006-01-02 15:04:05"),
Operator: member.Operator,
}
}
if len(result.Data) > 0 {
// 收集所有UUID
uuids := make([]string, len(result.Data))
for i, member := range result.Data {
uuids[i] = member.Uuid
}
// 批量查询所有关联数据
managementMap, err := dao.MembersDao.GetManagementByUuids(uuids)
if err != nil {
return nil, errors.New("批量查询成员管理失败")
}
boardOfDirectorsMap, err := dao.MembersDao.GetBoardOfDirectorsByUuids(uuids)
if err != nil {
return nil, errors.New("批量查询董事会失败")
}
committeeAppointmentsMap, err := dao.MembersDao.GetCommitteeAppointmentsByUuids(uuids)
if err != nil {
return nil, errors.New("批量查询委员会失败")
}
// 批量赋值
for _, member := range result.Data {
if management, exists := managementMap[member.Uuid]; exists {
member.Management = &members.Management{
Name: management.Name,
Image: management.Image,
Brief: management.Brief,
Introduction: management.Introduction,
Status: management.Status,
IsSetting: management.IsSetting,
}
}
if boardOfDirectors, exists := boardOfDirectorsMap[member.Uuid]; exists {
member.BoardOfDirectors = &members.BoardOfDirectors{
Name: boardOfDirectors.Name,
Status: boardOfDirectors.Status,
Brief: boardOfDirectors.Brief,
Introduction: boardOfDirectors.Introduction,
IsSetting: boardOfDirectors.IsSetting,
}
}
if committeeAppointments, exists := committeeAppointmentsMap[member.Uuid]; exists {
member.CommitteeAppointments = &members.CommitteeAppointments{
Name: committeeAppointments.Name,
Status: committeeAppointments.Status,
AuditCommittee: committeeAppointments.AuditCommittee,
CompensationCommittee: committeeAppointments.CompensationCommittee,
NominatingCommittee: committeeAppointments.NominatingCommittee,
IsSetting: committeeAppointments.IsSetting,
}
}
}
}
return result, nil
}
// 编辑成员管理
func (membersLogic) EditManagement(req *members.EditManagementReq) (result *members.EditManagementResp, err error) {
result = &members.EditManagementResp{}
err = dao.MembersDao.EditManagement(req)
if err != nil {
return nil, err
}
result.Msg = "编辑成员管理成功"
return result, nil
}
// 展示成员管理列表
func (membersLogic) DisplayManagement(req *members.DisplayManagementReq) (result *members.DisplayManagementResp, err error) {
result = &members.DisplayManagementResp{}
data, err := dao.MembersDao.GetDisplayManagementList()
if err != nil {
return nil, err
}
result.Item = lo.Map(data, func(m model.Management, i int) *members.DisplayManagementItem {
return &members.DisplayManagementItem{
Name: m.Name,
Image: m.Image,
Brief: m.Brief,
Introduction: m.Introduction,
}
})
return result, nil
}
// 编辑董事会
func (membersLogic) EditBoardOfDirectors(req *members.EditBoardOfDirectorsReq) (result *members.EditBoardOfDirectorsResp, err error) {
result = &members.EditBoardOfDirectorsResp{}
err = dao.MembersDao.EditBoardOfDirectors(req)
if err != nil {
return nil, err
}
result.Msg = "编辑董事会成功"
return result, nil
}
// 展示董事会列表
func (membersLogic) DisplayBoardOfDirectors(req *members.DisplayBoardOfDirectorsReq) (result *members.DisplayBoardOfDirectorsResp, err error) {
result = &members.DisplayBoardOfDirectorsResp{}
data, err := dao.MembersDao.GetDisplayBoardOfDirectorsList()
if err != nil {
return nil, err
}
result.Item = lo.Map(data, func(m model.BoardOfDirectors, i int) *members.DisplayBoardOfDirectorItem {
return &members.DisplayBoardOfDirectorItem{
Name: m.Name,
Brief: m.Brief,
Introduction: m.Introduction,
}
})
return result, nil
}
// 编辑委员会
func (membersLogic) EditCommitteeAppointments(req *members.EditCommitteeAppointmentsReq) (result *members.EditCommitteeAppointmentsResp, err error) {
result = &members.EditCommitteeAppointmentsResp{}
err = dao.MembersDao.EditCommitteeAppointments(req)
if err != nil {
return nil, err
}
result.Msg = "编辑委员会成功"
return result, nil
}
// 展示委员会列表
func (membersLogic) DisplayCommitteeAppointments(req *members.DisplayCommitteeAppointmentsReq) (result *members.DisplayCommitteeAppointmentsResp, err error) {
result = &members.DisplayCommitteeAppointmentsResp{}
data, err := dao.MembersDao.GetDisplayCommitteeAppointmentsList()
if err != nil {
return nil, err
}
result.Item = lo.Map(data, func(m model.CommitteeAppointments, i int) *members.DisplayCommitteeAppointmentsItem {
return &members.DisplayCommitteeAppointmentsItem{
Name: m.Name,
AuditCommittee: m.AuditCommittee,
CompensationCommittee: m.CompensationCommittee,
NominatingCommittee: m.NominatingCommittee,
}
})
return result, nil
}

View File

@ -0,0 +1,88 @@
package logic
import (
"errors"
"micro-document/api/reports"
"micro-document/internel/dao"
"micro-document/internel/model"
util "micro-document/pkg/utils"
"github.com/jinzhu/copier"
"github.com/samber/lo"
)
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, err
}
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, err
}
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, err
}
result.Msg = "删除季度报告成功"
return result, nil
}
// 季度报告展示列表
func (quarterlyReportsLogic) Display(req *reports.DisplayQuarterlyReportReq) (result *reports.DisplayQuarterlyReportResp, err error) {
result = &reports.DisplayQuarterlyReportResp{
Page: req.Page,
PageSize: req.PageSize,
}
data, total, err := dao.QuarterlyReportsDao.Display(req)
if err != nil {
return nil, err
}
result.Total = int32(total)
result.Item = lo.Map(data, func(m model.QuarterlyReport, i int) *reports.DisplayQuarterlyReportItem {
return &reports.DisplayQuarterlyReportItem{
FileName: m.FileName,
FileIntroduce: m.FileIntroduce,
Attachment: m.Attachment,
AttachmentName: m.AttachmentName,
}
})
return result, nil
}

View File

@ -0,0 +1,24 @@
package model
import (
"time"
"gorm.io/gorm"
)
type BoardOfDirectors struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_board_of_directors_deleted_at;"`
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 下架"`
Brief string `gorm:"column:brief;type:varchar(256);not null;default:'';comment:简介"`
Introduction string `gorm:"column:introduction;type:varchar(1024);not null;default:'';comment:详细介绍"`
IsSetting int32 `gorm:"column:is_setting;type:int;not null;default:0;comment:是否设置:0 否 1 是"`
}
func (*BoardOfDirectors) TableName() string {
return "board_of_directors"
}

View File

@ -0,0 +1,25 @@
package model
import (
"time"
"gorm.io/gorm"
)
type CommitteeAppointments struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_committee_appointments_deleted_at;"`
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 int32 `gorm:"column:audit_committee;type:int;not null;default:0;comment:审计委员会1Member 2Chair"`
CompensationCommittee int32 `gorm:"column:compensation_committee;type:int;not null;default:0;comment:薪酬委员会1Member 2Chair"`
NominatingCommittee int32 `gorm:"column:nominating_committee;type:int;not null;default:0;comment:提名委员会1Member 2Chair"`
IsSetting int32 `gorm:"column:is_setting;type:int;not null;default:0;comment:是否设置:0 否 1 是"`
}
func (*CommitteeAppointments) TableName() string {
return "committee_appointments"
}

View File

@ -0,0 +1,24 @@
package model
import (
"time"
"gorm.io/gorm"
)
type EmailAlerts struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_email_alerts_deleted_at;"`
FirstName string `gorm:"column:first_name;type:varchar(50);not null;default:'';comment:姓"`
LastName string `gorm:"column:last_name;type:varchar(50);not null;default:'';comment:名"`
FullName string `gorm:"column:full_name;type:varchar(100);not null;default:'';comment:全名"`
Email string `gorm:"column:email;type:varchar(100);not null;default:'';comment:邮箱"`
Company string `gorm:"column:company;type:varchar(100);not null;default:'';comment:公司"`
Phone string `gorm:"column:phone;type:varchar(30);not null;default:'';comment:电话"`
}
func (*EmailAlerts) TableName() string {
return "email_alerts"
}

View File

@ -0,0 +1,25 @@
package model
import (
"time"
"gorm.io/gorm"
)
type Management struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_management_deleted_at;"`
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:姓名"`
Image string `gorm:"column:image;type:varchar(1024);not null;default:'';comment:头像"`
Brief string `gorm:"column:brief;type:varchar(256);not null;default:'';comment:简介"`
Introduction string `gorm:"column:introduction;type:varchar(1024);not null;default:'';comment:详细介绍"`
Status int32 `gorm:"column:status;type:int;not null;default:2;comment:状态:1上架 2 下架"`
IsSetting int32 `gorm:"column:is_setting;type:int;not null;default:0;comment:是否设置:0 否 1 是"`
}
func (*Management) TableName() string {
return "management"
}

25
internel/model/members.go Normal file
View File

@ -0,0 +1,25 @@
package model
import (
"time"
"gorm.io/gorm"
)
type Members struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index:idx_members_deleted_at;"`
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:姓名"`
Brief string `gorm:"column:brief;type:varchar(256);not null;default:'';comment:简介"`
Introduction string `gorm:"column:introduction;type:varchar(1024);not null;default:'';comment:详细介绍"`
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 (*Members) TableName() string {
return "members"
}

44
internel/model/reports.go Normal file
View File

@ -0,0 +1,44 @@
package model
import (
"time"
"gorm.io/gorm"
)
type AnnualReport struct {
Id int32 `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
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:bigint;not null;default:0;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:操作人"`
OperatorId int32 `gorm:"column:operator_id;comment:操作人Id"`
}
func (*AnnualReport) TableName() string {
return "annual_report"
}
type QuarterlyReport struct {
Id int32 `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(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:操作人"`
OperatorId int32 `gorm:"column:operator_id;comment:操作人Id"`
}
func (*QuarterlyReport) TableName() string {
return "quarterly_report"
}

View File

@ -35,6 +35,18 @@ func DbInit() {
}
DocDB = dbq.Debug()
DocDB.Set("gorm:table_options", "ENGINE=InnoDB default charset=utf8")
DocDB.AutoMigrate(&model.Governance{}, &model.PressReleases{}, &model.SecFilings{}, &model.FormType{})
DocDB.AutoMigrate(
&model.Governance{},
&model.PressReleases{},
&model.SecFilings{},
&model.FormType{},
&model.AnnualReport{},
&model.QuarterlyReport{},
&model.EmailAlerts{},
&model.Members{},
&model.Management{},
&model.BoardOfDirectors{},
&model.CommitteeAppointments{},
)
}
}

13
pkg/db/dto.go Normal file
View File

@ -0,0 +1,13 @@
package db
import "gorm.io/gorm"
func Pagination[T int | int32 | int64](page T, pageSize T) func(db *gorm.DB) *gorm.DB {
if page == 0 || pageSize == 0 {
page = 1
pageSize = 15
}
return func(db *gorm.DB) *gorm.DB {
return db.Limit(int(pageSize)).Offset(int((page - 1) * pageSize))
}
}

6
pkg/msg/msg.go Normal file
View File

@ -0,0 +1,6 @@
package msg
const (
StatusOnline = 1 // 上架
StatusOffline = 2 // 下架
)

View File

@ -0,0 +1,40 @@
package util
import (
"errors"
"time"
"micro-document/pkg/utils/stime"
"github.com/jinzhu/copier"
)
var CopierProtoOptions = copier.Option{
IgnoreEmpty: true,
DeepCopy: true,
Converters: []copier.TypeConverter{
{
SrcType: time.Time{},
DstType: copier.String,
Fn: func(src interface{}) (interface{}, error) {
s, ok := src.(time.Time)
if !ok {
return nil, errors.New("src type :time.Time not matching")
}
return s.Format(stime.Format_Normal_YMDhms), nil
},
},
{
SrcType: copier.String,
DstType: time.Time{},
Fn: func(src interface{}) (interface{}, error) {
s, ok := src.(string)
if !ok {
return nil, errors.New("src type :time.Time not matching")
}
tt, err := stime.StringToTimeWithFormat(s, stime.Format_Normal_YMDhms)
return *tt, err
},
},
},
}

84
pkg/utils/stime/common.go Normal file
View File

@ -0,0 +1,84 @@
package stime
import (
"time"
)
var Loc loc
type loc time.Location
func (l loc) Shanghai() *time.Location {
var shanghai, err = time.LoadLocation("Asia/Shanghai")
if err != nil {
shanghai = time.FixedZone("CST", 8*3600)
}
return shanghai
}
const (
//常规时间格式(日期带横杠)
Format_Normal_YMDhms = "2006-01-02 15:04:05"
Format_Normal_YMD = "2006-01-02"
Format_Normal_hms = "15:04:05"
Format_Normal_hm = "15:04"
Format_Normal_YM = "2006-01"
//带斜杠的时间格式
Format_Slash_YMDhms = "2006/01/02 15:04:05"
Format_Slash_YMD = "2006/01/02"
//无间隔符
Format_NoSpacer_YMDhms = "20060102150405"
Format_NoSpacer_YMD = "20060102"
Format_ChinaChar_YMD = "2006年01月02日"
Format_ChinaChar_YMDhm = "2006年01月02日 15时04分"
Format_DB_YMDhms = "2006-01-02T15:04:05+08:00"
)
var MonthStrMap = map[string]string{
"January": "01",
"February": "02",
"March": "03",
"April": "04",
"May": "05",
"June": "06",
"July": "07",
"August": "08",
"September": "09",
"October": "10",
"November": "11",
"December": "12",
}
var MonthIntMap = map[string]int{
"January": 1,
"February": 2,
"March": 3,
"April": 4,
"May": 5,
"June": 6,
"July": 7,
"August": 8,
"September": 9,
"October": 10,
"November": 11,
"December": 12,
}
var WeekIntMap = map[string]int{
"Monday": 1,
"Tuesday": 2,
"Wednesday": 3,
"Thursday": 4,
"Friday": 5,
"Saturday": 6,
"Sunday": 7,
}
var WeekStrMap = map[string]string{
"Monday": "一",
"Tuesday": "二",
"Wednesday": "三",
"Thursday": "四",
"Friday": "五",
"Saturday": "六",
"Sunday": "日",
}

150
pkg/utils/stime/getTime.go Normal file
View File

@ -0,0 +1,150 @@
package stime
import (
"fmt"
"time"
)
func StrNowDate() string {
return TimeToString(time.Now(), Format_Normal_YMD)
}
func StrNowYearMonth() string {
return TimeToString(time.Now(), Format_Normal_YM)
}
// ThisMorming 今天凌晨
func ThisMorming(format string) (strTime string) {
thisTime := time.Now()
year := thisTime.Year()
month := MonthStrMap[thisTime.Month().String()]
day := fmt.Sprintf("%02d", thisTime.Day())
strTime = fmt.Sprintf("%v-%v-%v 00:00:00", year, month, day)
if format != Format_Normal_YMDhms {
t1, _ := time.ParseInLocation(Format_Normal_YMDhms, strTime, Loc.Shanghai())
strTime = t1.Format(format)
}
return strTime
}
// ThisMorningUnix 获取当日凌晨的时间戳
func ThisMorningToUnix() int64 {
thist := time.Now()
zero_tm := time.Date(thist.Year(), thist.Month(), thist.Day(), 0, 0, 0, 0, thist.Location()).Unix()
return zero_tm
}
// TomorrowMorning 第二天凌晨
func TomorrowMorning(baseTime time.Time) *time.Time {
year := baseTime.Year()
month := MonthStrMap[baseTime.Month().String()]
day := fmt.Sprintf("%02d", baseTime.Day()+1)
strTime := fmt.Sprintf("%v-%v-%v 00:00:00", year, month, day)
res, _ := StringToTime(strTime)
return res
}
// ThisTimeUnix 获取当前时间的时间戳
func CurrentimeToUnix() int64 {
return time.Now().Unix()
}
// Currentime 获取当前时间
func Currentime(format string) (strTime string) {
strTime = time.Now().Format(format)
return
}
// HoursAgo 若干小时之前的时间
func HoursAgo(hours time.Duration, format string) (lastTimeStr string) {
lastStamp := time.Now().Unix() - int64((time.Hour * hours).Seconds())
lastTime := time.Unix(lastStamp, 0).In(Loc.Shanghai())
lastTimeStr = lastTime.Format(format)
return
}
// TimeToString 时间转字符串
func TimeToString(t time.Time, format string) string {
return t.Format(format)
}
// 计算指定月份的天数
func YearMonthToDayNumber(year int, month int) int {
// 有31天的月份
day31 := map[int]bool{
1: true,
3: true,
5: true,
7: true,
8: true,
10: true,
12: true,
}
if day31[month] == true {
return 31
}
// 有30天的月份
day30 := map[int]bool{
4: true,
6: true,
9: true,
11: true,
}
if day30[month] == true {
return 30
}
// 计算是平年还是闰年
if (year%4 == 0 && year%100 != 0) || year%400 == 0 {
// 得出2月的天数
return 29
}
// 得出2月的天数
return 28
}
// 求时间差返回一个数字该数字单位由传过来的unit决定。若unit为60则单位是分钟。
func GetDiffTime(start_time string, end_time string, unit int64) int64 {
// 转成时间戳
if len(start_time) == 10 {
start_time = fmt.Sprintf("%v 00:00:00", start_time)
}
if len(end_time) == 10 {
end_time = fmt.Sprintf("%v 00:00:00", end_time)
}
startUnix, _ := time.ParseInLocation("2006-01-02 15:04:05", start_time, Loc.Shanghai())
endUnix, _ := time.ParseInLocation("2006-01-02 15:04:05", end_time, Loc.Shanghai())
startTime := startUnix.Unix()
endTime := endUnix.Unix()
// 求相差天数
date := (endTime - startTime) / unit
return date
}
func TimeSince(pastTime string, format string) string {
t, err := time.Parse(format, pastTime)
if err != nil {
return ""
}
diff := time.Since(t)
if diff.Minutes() < 15 {
return "刚刚"
} else if diff.Minutes() >= 15 && diff.Minutes() < 30 {
return "15分钟前"
} else if diff.Minutes() >= 30 && diff.Minutes() < 60 {
return "半小时前"
} else if diff.Hours() >= 1 && diff.Hours() < 24 {
return fmt.Sprintf("%d小时前", int(diff.Hours()))
} else if diff.Hours() >= 24 && diff.Hours() < 24*15 {
return fmt.Sprintf("%d天前", int(diff.Hours()/24))
} else if diff.Hours() < 24*30 {
return "半月前"
} else if diff.Hours() < 24*30*6 { //小于半年
return fmt.Sprintf("%d月前", int(diff.Hours()/24/30))
} else if diff.Hours() < 24*365 { //小于1年
return "半年前"
} else {
return t.Format("2006-01-02 15:04:05")
}
}

View File

@ -0,0 +1,101 @@
package stime
import (
"fmt"
"strconv"
"time"
)
// 根据指定时间获取后面的若干天工作日列表
// param baseOn 指定基准时间
// param daysNum 获取工作日的数量
func GetWorkDayList(baseOn *time.Time, daysNum int) []time.Time {
var timeList []time.Time
var basCount = 1
var workDay time.Time
for {
if len(timeList) == daysNum {
break
}
workDay = baseOn.AddDate(0, 0, basCount)
switch workDay.Weekday() {
case time.Saturday:
basCount += 2
continue
case time.Sunday:
basCount++
continue
default:
timeList = append(timeList, workDay)
basCount++
}
}
return timeList
}
// 根据指定时间获取后面的若干天工作日列表
// param baseOn 指定基准时间
// param daysNum 获取工作日的数量
func GetWorkDayStrList(baseOn *time.Time, daysNum int) []string {
var timeList []string
var basCount = 1
var workDay time.Time
for {
if len(timeList) == daysNum {
break
}
workDay = baseOn.AddDate(0, 0, basCount)
switch workDay.Weekday() {
case time.Saturday:
basCount += 2
continue
case time.Sunday:
basCount++
continue
default:
timeList = append(timeList, TimeToString(workDay, Format_Normal_YMD))
basCount++
}
}
return timeList
}
// 获取时间差文字描述
func GetTimeDifferenceDesc(now *time.Time, before *time.Time) string {
if before == nil {
return ""
}
if now.After(*before) {
subTimestamp := now.Unix() - before.Unix()
day := subTimestamp / (3600 * 24)
hour := (subTimestamp - day*3600*24) / 3600
minute := (subTimestamp - day*3600*24 - hour*3600) / 60
second := subTimestamp - day*3600*24 - hour*3600 - minute*60
switch {
case day > 0:
if hour > 0 {
return fmt.Sprintf("%d天%d小时", day, hour)
} else {
return fmt.Sprintf("%d天", day)
}
case hour > 0:
if minute < 10 {
return fmt.Sprintf("%d小时", hour)
} else {
return fmt.Sprintf("%d小时%d", hour, minute)
}
case hour == 0 && minute > 0:
return fmt.Sprintf("%d分钟", minute)
case hour == 0 && minute == 0:
return fmt.Sprintf("%d秒", second)
}
}
return ""
}
// TimeStampToBytes 时间戳转字节
func TimeStampToBytes(stamp int64) []byte {
timeStr := strconv.FormatInt(stamp, 2)
return []byte(timeStr)
}

View File

@ -0,0 +1,12 @@
package stime
import (
"testing"
"time"
)
func TestGetWorkDayStrList(t *testing.T) {
now := time.Now()
result := GetWorkDayStrList(&now, 5)
t.Log(result)
}

View File

@ -0,0 +1,64 @@
package stime
import (
"fmt"
"time"
)
func GetTimestampMillisecond() int64 {
now := time.Now()
return now.UnixNano() / 1e6
}
func StringToTime(strTime string) (*time.Time, error) {
const TIME_LAYOUT = "2006-01-02 15:04:05" //此时间不可更改
timeobj, err := time.ParseInLocation(TIME_LAYOUT, strTime, Loc.Shanghai())
return &timeobj, err
}
func StringToTimeWithFormat(strTime string, timeFormat string) (*time.Time, error) {
timeobj, err := time.ParseInLocation(timeFormat, strTime, Loc.Shanghai())
return &timeobj, err
}
// 去除精确时间后面的小数点
func NowTimeToTime(layout string) *time.Time {
otime := time.Now().Format(layout) //"2006-01-02 15:04:05" and so on
tt, _ := StringToTime(otime)
return tt
}
// 时间之间的转换
func TimeStampToString(value interface{}, after_type string) {
switch value.(type) {
case string:
fmt.Println(value.(string))
case int64:
fmt.Println(value.(int64))
case int32:
fmt.Println(value.(int32))
}
}
func GetAge(birthday time.Time) int {
if birthday.IsZero() {
return 0
}
now := time.Now()
year, month, day := now.Date()
if year == 0 || month == 0 || day == 0 {
return 0
}
age := year - birthday.Year() - 1
//判断年龄
if birthday.Month() < month || birthday.Month() == month && birthday.Day() <= day {
age++
}
return age
}
func ParseTimeStamp(unix int64) (result time.Time) {
if unix == 0 {
return
}
return time.Unix(unix, 0)
}

View File

@ -0,0 +1,19 @@
package stime
import (
"fmt"
"testing"
"time"
)
func TestTime(t *testing.T) {
result := NowTimeToTime(Format_Normal_YMDhms)
fmt.Println(result)
}
func TestGetAge(t *testing.T) {
age := GetAge(time.Date(1991, 3, 6, 0, 0, 0, 0, Loc.Shanghai()))
fmt.Println(age)
if age != 31 {
t.Errorf("want 31 but get %v", age)
}
}

47
pkg/utils/stime/week.go Normal file
View File

@ -0,0 +1,47 @@
package stime
import "time"
func NowWeekDay() string {
var weekday = [7]string{"七", "一", "二", "三", "四", "五", "六"}
week := int(time.Now().Weekday())
return weekday[week]
}
// 获取按年算的周数
func GetYearWeek(t *time.Time) int {
yearDay := t.YearDay()
yearFirstDay := t.AddDate(0, 0, -yearDay+1)
firstDayInWeek := int(yearFirstDay.Weekday())
//今年第一周有几天
firstWeekDays := 1
if firstDayInWeek != 0 {
firstWeekDays = 7 - firstDayInWeek + 1
}
var week int
if yearDay <= firstWeekDays {
week = 1
} else {
week = (yearDay-firstWeekDays)/7 + 2
}
return week
}
// GetWeekDate 获取基准时间范围最最近的某个星期时间
//
// param baseOn: 基准时间
// param weekNum: 中国星期数 1~7
// return *time.Time
func GetWeekDate(baseOn time.Time, weekNum int) *time.Time {
if baseOn.IsZero() || (weekNum <= 0 || weekNum > 7) {
return nil
}
baseDate := time.Date(baseOn.Year(), baseOn.Month(), baseOn.Day(), 0, 0, 0, 0, Loc.Shanghai())
var (
w = int(baseOn.Weekday())
weekDate time.Time
)
weekDate = baseDate.AddDate(0, 0, weekNum-w)
return &weekDate
}

View File

@ -0,0 +1,14 @@
package stime
import (
"testing"
"time"
)
func TestGetYearWeek(t *testing.T) {
now := time.Now()
t.Log(GetYearWeek(&now))
var w = int(now.Weekday())
t.Log(now.AddDate(0, 0, -w+1).Weekday())
t.Log(now.AddDate(0, 0, 7-w).Weekday())
}

3
protocEmailAlerts.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
protoc -I . -I ./api/emailAlerts --proto_path=./api/emailAlerts --go_out=./api/emailAlerts --go-triple_out=./api/emailAlerts --govalidators_out=./api/emailAlerts ./api/emailAlerts/emailAlerts.proto
.\clear.sh

3
protocGovernance.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
protoc -I . -I ./api/governance --proto_path=./api/governance --go_out=./api/governance --go-triple_out=./api/governance --govalidators_out=./api/governance ./api/governance/governance.proto
.\clear.sh

3
protocMembers.bat Normal file
View File

@ -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

3
protocPressreleases.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
protoc -I . -I ./api/pressreleases --proto_path=./api/pressreleases --go_out=./api/pressreleases --go-triple_out=./api/pressreleases --govalidators_out=./api/pressreleases ./api/pressreleases/pressreleases.proto
.\clear.sh

3
protocReports.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
protoc -I . -I ./api/reports --proto_path=./api/reports --go_out=./api/reports --go-triple_out=./api/reports --govalidators_out=./api/reports ./api/reports/reports.proto
.\clear.sh

3
protocSecFilings.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
protoc -I . -I ./api/secFilings --proto_path=./api/secFilings --go_out=./api/secFilings --go-triple_out=./api/secFilings --govalidators_out=./api/secFilings ./api/secFilings/secFilings.proto
.\clear.sh