Merge branch 'dev' of http://172.16.100.91:3000/fiee/fonchain-fiee into dev
This commit is contained in:
commit
7ff98e4fe8
1849
api/reports/reports.pb.go
Normal file
1849
api/reports/reports.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
98
api/reports/reports.validator.pb.go
Normal file
98
api/reports/reports.validator.pb.go
Normal file
@ -0,0 +1,98 @@
|
||||
// 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 *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 *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
|
||||
}
|
466
api/reports/reports_triple.pb.go
Normal file
466
api/reports/reports_triple.pb.go
Normal file
@ -0,0 +1,466 @@
|
||||
// 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)
|
||||
// ==================================季度报告======================================
|
||||
GetQuarterlyReportList(ctx context.Context, in *GetQuarterlyReportListReq, opts ...grpc_go.CallOption) (*GetQuarterlyReportListResp, common.ErrorWithAttachment)
|
||||
AddQuarterlyReport(ctx context.Context, in *AddQuarterlyReportReq, opts ...grpc_go.CallOption) (*AddQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
EditQuarterlyReport(ctx context.Context, in *EditQuarterlyReportReq, opts ...grpc_go.CallOption) (*EditQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
DeleteQuarterlyReport(ctx context.Context, in *DeleteQuarterlyReportReq, opts ...grpc_go.CallOption) (*DeleteQuarterlyReportResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type reportsClient struct {
|
||||
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)
|
||||
GetQuarterlyReportList func(ctx context.Context, in *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
||||
AddQuarterlyReport func(ctx context.Context, in *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||
EditQuarterlyReport func(ctx context.Context, in *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
||||
DeleteQuarterlyReport func(ctx context.Context, in *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
||||
}
|
||||
|
||||
func (c *ReportsClientImpl) GetDubboStub(cc *triple.TripleConn) ReportsClient {
|
||||
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) 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)
|
||||
}
|
||||
|
||||
// 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)
|
||||
// ==================================季度报告======================================
|
||||
GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error)
|
||||
AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error)
|
||||
EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error)
|
||||
DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error)
|
||||
mustEmbedUnimplementedReportsServer()
|
||||
}
|
||||
|
||||
// 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) GetQuarterlyReportList(context.Context, *GetQuarterlyReportListReq) (*GetQuarterlyReportListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetQuarterlyReportList not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) AddQuarterlyReport(context.Context, *AddQuarterlyReportReq) (*AddQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) EditQuarterlyReport(context.Context, *EditQuarterlyReportReq) (*EditQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method EditQuarterlyReport not implemented")
|
||||
}
|
||||
func (UnimplementedReportsServer) DeleteQuarterlyReport(context.Context, *DeleteQuarterlyReportReq) (*DeleteQuarterlyReportResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteQuarterlyReport not implemented")
|
||||
}
|
||||
func (s *UnimplementedReportsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
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_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)
|
||||
}
|
||||
|
||||
// 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: "GetQuarterlyReportList",
|
||||
Handler: _Reports_GetQuarterlyReportList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddQuarterlyReport",
|
||||
Handler: _Reports_AddQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "EditQuarterlyReport",
|
||||
Handler: _Reports_EditQuarterlyReport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteQuarterlyReport",
|
||||
Handler: _Reports_DeleteQuarterlyReport_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "api/reports/reports.proto",
|
||||
}
|
@ -14,6 +14,7 @@ import (
|
||||
"fonchain-fiee/pkg/service/pressreleases"
|
||||
"fonchain-fiee/pkg/service/qr"
|
||||
"fonchain-fiee/pkg/service/redirect"
|
||||
"fonchain-fiee/pkg/service/reports"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"fonchain-fiee/pkg/service/version"
|
||||
"net/http"
|
||||
@ -188,6 +189,21 @@ func NewRouter() *gin.Engine {
|
||||
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
||||
|
||||
}
|
||||
{
|
||||
// 官网报告
|
||||
reportsRoute := v1.Group("/reports")
|
||||
reportsRouteLogin := reportsRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
// 年度报告
|
||||
reportsRouteLogin.POST("/annual/create", reports.AnnualReportCreate)
|
||||
reportsRouteLogin.POST("/annual/list", reports.AnnualReportList)
|
||||
reportsRouteLogin.POST("/annual/delete", reports.AnnualReportDelete)
|
||||
reportsRouteLogin.POST("/annual/edit", reports.AnnualReportEdit)
|
||||
// 季度报告
|
||||
reportsRouteLogin.POST("/quarterly/create", reports.QuarterlyReportCreate)
|
||||
reportsRouteLogin.POST("/quarterly/list", reports.QuarterlyReportList)
|
||||
reportsRouteLogin.POST("/quarterly/delete", reports.QuarterlyReportDelete)
|
||||
reportsRouteLogin.POST("/quarterly/edit", reports.QuarterlyReportEdit)
|
||||
}
|
||||
{
|
||||
importRoute := v1.Group("/import")
|
||||
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
@ -92,7 +92,7 @@ func GetReconciliationListDownload(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
titleList := []string{
|
||||
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||
"关联套餐订单号", "关联增值服务订单号", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||
}
|
||||
var dataList []interface{}
|
||||
|
||||
@ -106,7 +106,7 @@ func GetReconciliationListDownload(c *gin.Context) {
|
||||
data := []any{
|
||||
i.BundleOrderOn,
|
||||
i.BundleAddOrderOn,
|
||||
i.CreationTime,
|
||||
//i.CreationTime,
|
||||
i.SubNum,
|
||||
i.UserName,
|
||||
i.UserTel,
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
"fonchain-fiee/api/pressreleases"
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/api/secFilings"
|
||||
pkConfig "fonchain-fiee/pkg/config"
|
||||
"os"
|
||||
@ -30,6 +31,7 @@ var CastProvider = new(cast.CastClientImpl)
|
||||
var GovernanceProvider = new(governance.GovernanceClientImpl)
|
||||
var PressReleasesProvider = new(pressreleases.PressReleasesClientImpl)
|
||||
var SecFilingProvider = new(secFilings.SecFilingsClientImpl)
|
||||
var ReportsProvider = new(reports.ReportsClientImpl)
|
||||
|
||||
func init() {
|
||||
config.SetConsumerService(BundleProvider)
|
||||
@ -42,6 +44,7 @@ func init() {
|
||||
config.SetConsumerService(GovernanceProvider)
|
||||
config.SetConsumerService(PressReleasesProvider)
|
||||
config.SetConsumerService(SecFilingProvider)
|
||||
config.SetConsumerService(ReportsProvider)
|
||||
|
||||
if err := config.Load(); err != nil {
|
||||
panic(err)
|
||||
|
71
pkg/service/reports/annualReports.go
Normal file
71
pkg/service/reports/annualReports.go
Normal file
@ -0,0 +1,71 @@
|
||||
package reports
|
||||
|
||||
import (
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func AnnualReportCreate(ctx *gin.Context) {
|
||||
var req reports.AddAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.AddAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportList(ctx *gin.Context) {
|
||||
var req reports.GetAnnualReportListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetAnnualReportList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportDelete(ctx *gin.Context) {
|
||||
var req reports.DeleteAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DeleteAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func AnnualReportEdit(ctx *gin.Context) {
|
||||
var req reports.EditAnnualReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.EditAnnualReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
71
pkg/service/reports/quarterlyReports.go
Normal file
71
pkg/service/reports/quarterlyReports.go
Normal file
@ -0,0 +1,71 @@
|
||||
package reports
|
||||
|
||||
import (
|
||||
"fonchain-fiee/api/reports"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func QuarterlyReportCreate(ctx *gin.Context) {
|
||||
var req reports.AddQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.AddQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportList(ctx *gin.Context) {
|
||||
var req reports.GetQuarterlyReportListReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.GetQuarterlyReportList(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportDelete(ctx *gin.Context) {
|
||||
var req reports.DeleteQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.ReportsProvider.DeleteQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
||||
|
||||
func QuarterlyReportEdit(ctx *gin.Context) {
|
||||
var req reports.EditQuarterlyReportReq
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
user := login.GetUserInfoFromC(ctx)
|
||||
req.Operator = user.Name
|
||||
req.OperatorId = int32(user.ID)
|
||||
resp, err := service.ReportsProvider.EditQuarterlyReport(ctx, &req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
}
|
Loading…
Reference in New Issue
Block a user