Compare commits
7 Commits
main
...
feat-hjj-C
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fea74b9e9 | ||
|
|
85daee28e7 | ||
|
|
e3b4dd4b85 | ||
|
|
7fe45642a7 | ||
|
|
caef081ab6 | ||
|
|
834eb4db1e | ||
|
|
a2aebf7cc6 |
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,29 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
|
func (this *QueryTheOrderSnapshotInformationReq) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *QueryTheOrderSnapshotInformationResp) Validate() error {
|
||||||
|
for _, item := range this.BundleOrder {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("BundleOrder", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, item := range this.AddBundleOrder {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleOrder", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *ServiceInformation) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *DeleteValueAddServiceRequest) Validate() error {
|
func (this *DeleteValueAddServiceRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -530,10 +553,23 @@ func (this *TaskAssignRequest) Validate() error {
|
|||||||
func (this *UpdatePendingCountRequest) Validate() error {
|
func (this *UpdatePendingCountRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *AddHiddenTaskAssigneeRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *RecentAssignRecordsRequest) Validate() error {
|
func (this *RecentAssignRecordsRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *RecentAssigneeItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *RecentAssignRecordsResponse) Validate() error {
|
func (this *RecentAssignRecordsResponse) Validate() error {
|
||||||
|
for _, item := range this.OperatorList {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("OperatorList", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (this *EmployeeTaskQueryRequest) Validate() error {
|
func (this *EmployeeTaskQueryRequest) Validate() error {
|
||||||
@ -574,6 +610,9 @@ func (this *TerminateTaskByUUIDRequest) Validate() error {
|
|||||||
func (this *BatchTerminateTaskRequest) Validate() error {
|
func (this *BatchTerminateTaskRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *RevertTaskCompletionByUUIDItemRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *GetTaskActualStatusByUUIDRequest) Validate() error {
|
func (this *GetTaskActualStatusByUUIDRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -636,6 +675,22 @@ func (this *PendingUploadBreakdownResponse) Validate() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (this *PendingAssignRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PendingAssignItem) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (this *PendingAssignResponse) Validate() error {
|
||||||
|
for _, item := range this.Items {
|
||||||
|
if item != nil {
|
||||||
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||||
|
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *ArtistBundleBalanceRequest) Validate() error {
|
func (this *ArtistBundleBalanceRequest) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.8
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v3.21.1
|
// - protoc v5.26.0
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -102,6 +102,7 @@ type BundleClient interface {
|
|||||||
BatchAssignTask(ctx context.Context, in *BatchAssignTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
BatchAssignTask(ctx context.Context, in *BatchAssignTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||||
BatchTerminateTask(ctx context.Context, in *BatchTerminateTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
BatchTerminateTask(ctx context.Context, in *BatchTerminateTaskRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||||
GetArtistUploadStatsList(ctx context.Context, in *TaskQueryRequest, opts ...grpc_go.CallOption) (*ArtistUploadStatsResponse, common.ErrorWithAttachment)
|
GetArtistUploadStatsList(ctx context.Context, in *TaskQueryRequest, opts ...grpc_go.CallOption) (*ArtistUploadStatsResponse, common.ErrorWithAttachment)
|
||||||
|
// 数据指标
|
||||||
MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment)
|
MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment)
|
||||||
MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment)
|
MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment)
|
||||||
MetricsOperatingStatus(ctx context.Context, in *MetricsOperatingStatusReq, opts ...grpc_go.CallOption) (*MetricsOperatingStatusResp, common.ErrorWithAttachment)
|
MetricsOperatingStatus(ctx context.Context, in *MetricsOperatingStatusReq, opts ...grpc_go.CallOption) (*MetricsOperatingStatusResp, common.ErrorWithAttachment)
|
||||||
@ -111,6 +112,10 @@ type BundleClient interface {
|
|||||||
GetPendingTaskLayout(ctx context.Context, in *GetPendingTaskLayoutReq, opts ...grpc_go.CallOption) (*GetPendingTaskLayoutResp, common.ErrorWithAttachment)
|
GetPendingTaskLayout(ctx context.Context, in *GetPendingTaskLayoutReq, opts ...grpc_go.CallOption) (*GetPendingTaskLayoutResp, common.ErrorWithAttachment)
|
||||||
SetPendingTaskLayout(ctx context.Context, in *SetPendingTaskLayoutReq, opts ...grpc_go.CallOption) (*SetPendingTaskLayoutResp, common.ErrorWithAttachment)
|
SetPendingTaskLayout(ctx context.Context, in *SetPendingTaskLayoutReq, opts ...grpc_go.CallOption) (*SetPendingTaskLayoutResp, common.ErrorWithAttachment)
|
||||||
GetPendingUploadBreakdown(ctx context.Context, in *PendingUploadBreakdownRequest, opts ...grpc_go.CallOption) (*PendingUploadBreakdownResponse, common.ErrorWithAttachment)
|
GetPendingUploadBreakdown(ctx context.Context, in *PendingUploadBreakdownRequest, opts ...grpc_go.CallOption) (*PendingUploadBreakdownResponse, common.ErrorWithAttachment)
|
||||||
|
GetPendingAssign(ctx context.Context, in *PendingAssignRequest, opts ...grpc_go.CallOption) (*PendingAssignResponse, common.ErrorWithAttachment)
|
||||||
|
RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||||
|
AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||||
|
QueryTheOrderSnapshotInformation(ctx context.Context, in *QueryTheOrderSnapshotInformationReq, opts ...grpc_go.CallOption) (*QueryTheOrderSnapshotInformationResp, common.ErrorWithAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
type bundleClient struct {
|
type bundleClient struct {
|
||||||
@ -194,6 +199,10 @@ type BundleClientImpl struct {
|
|||||||
GetPendingTaskLayout func(ctx context.Context, in *GetPendingTaskLayoutReq) (*GetPendingTaskLayoutResp, error)
|
GetPendingTaskLayout func(ctx context.Context, in *GetPendingTaskLayoutReq) (*GetPendingTaskLayoutResp, error)
|
||||||
SetPendingTaskLayout func(ctx context.Context, in *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
|
SetPendingTaskLayout func(ctx context.Context, in *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
|
||||||
GetPendingUploadBreakdown func(ctx context.Context, in *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
|
GetPendingUploadBreakdown func(ctx context.Context, in *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
|
||||||
|
GetPendingAssign func(ctx context.Context, in *PendingAssignRequest) (*PendingAssignResponse, error)
|
||||||
|
RevertTaskCompletionByUUIDItem func(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
|
||||||
|
AddHiddenTaskAssignee func(ctx context.Context, in *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
|
||||||
|
QueryTheOrderSnapshotInformation func(ctx context.Context, in *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||||
@ -664,6 +673,30 @@ func (c *bundleClient) GetPendingUploadBreakdown(ctx context.Context, in *Pendin
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPendingUploadBreakdown", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPendingUploadBreakdown", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) GetPendingAssign(ctx context.Context, in *PendingAssignRequest, opts ...grpc_go.CallOption) (*PendingAssignResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(PendingAssignResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPendingAssign", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(ComResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RevertTaskCompletionByUUIDItem", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(ComResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddHiddenTaskAssignee", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) QueryTheOrderSnapshotInformation(ctx context.Context, in *QueryTheOrderSnapshotInformationReq, opts ...grpc_go.CallOption) (*QueryTheOrderSnapshotInformationResp, common.ErrorWithAttachment) {
|
||||||
|
out := new(QueryTheOrderSnapshotInformationResp)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/QueryTheOrderSnapshotInformation", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
// BundleServer is the server API for Bundle service.
|
// BundleServer is the server API for Bundle service.
|
||||||
// All implementations must embed UnimplementedBundleServer
|
// All implementations must embed UnimplementedBundleServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -742,6 +775,7 @@ type BundleServer interface {
|
|||||||
BatchAssignTask(context.Context, *BatchAssignTaskRequest) (*ComResponse, error)
|
BatchAssignTask(context.Context, *BatchAssignTaskRequest) (*ComResponse, error)
|
||||||
BatchTerminateTask(context.Context, *BatchTerminateTaskRequest) (*ComResponse, error)
|
BatchTerminateTask(context.Context, *BatchTerminateTaskRequest) (*ComResponse, error)
|
||||||
GetArtistUploadStatsList(context.Context, *TaskQueryRequest) (*ArtistUploadStatsResponse, error)
|
GetArtistUploadStatsList(context.Context, *TaskQueryRequest) (*ArtistUploadStatsResponse, error)
|
||||||
|
// 数据指标
|
||||||
MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error)
|
MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error)
|
||||||
MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
|
MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
|
||||||
MetricsOperatingStatus(context.Context, *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error)
|
MetricsOperatingStatus(context.Context, *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error)
|
||||||
@ -751,6 +785,10 @@ type BundleServer interface {
|
|||||||
GetPendingTaskLayout(context.Context, *GetPendingTaskLayoutReq) (*GetPendingTaskLayoutResp, error)
|
GetPendingTaskLayout(context.Context, *GetPendingTaskLayoutReq) (*GetPendingTaskLayoutResp, error)
|
||||||
SetPendingTaskLayout(context.Context, *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
|
SetPendingTaskLayout(context.Context, *SetPendingTaskLayoutReq) (*SetPendingTaskLayoutResp, error)
|
||||||
GetPendingUploadBreakdown(context.Context, *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
|
GetPendingUploadBreakdown(context.Context, *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error)
|
||||||
|
GetPendingAssign(context.Context, *PendingAssignRequest) (*PendingAssignResponse, error)
|
||||||
|
RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
|
||||||
|
AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
|
||||||
|
QueryTheOrderSnapshotInformation(context.Context, *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error)
|
||||||
mustEmbedUnimplementedBundleServer()
|
mustEmbedUnimplementedBundleServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,6 +1025,18 @@ func (UnimplementedBundleServer) SetPendingTaskLayout(context.Context, *SetPendi
|
|||||||
func (UnimplementedBundleServer) GetPendingUploadBreakdown(context.Context, *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error) {
|
func (UnimplementedBundleServer) GetPendingUploadBreakdown(context.Context, *PendingUploadBreakdownRequest) (*PendingUploadBreakdownResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetPendingUploadBreakdown not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetPendingUploadBreakdown not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) GetPendingAssign(context.Context, *PendingAssignRequest) (*PendingAssignResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetPendingAssign not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method RevertTaskCompletionByUUIDItem not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method AddHiddenTaskAssignee not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedBundleServer) QueryTheOrderSnapshotInformation(context.Context, *QueryTheOrderSnapshotInformationReq) (*QueryTheOrderSnapshotInformationResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method QueryTheOrderSnapshotInformation not implemented")
|
||||||
|
}
|
||||||
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
func (s *UnimplementedBundleServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||||
s.proxyImpl = impl
|
s.proxyImpl = impl
|
||||||
}
|
}
|
||||||
@ -3219,6 +3269,122 @@ func _Bundle_GetPendingUploadBreakdown_Handler(srv interface{}, ctx context.Cont
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_GetPendingAssign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PendingAssignRequest)
|
||||||
|
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("GetPendingAssign", 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 _Bundle_RevertTaskCompletionByUUIDItem_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RevertTaskCompletionByUUIDItemRequest)
|
||||||
|
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("RevertTaskCompletionByUUIDItem", 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 _Bundle_AddHiddenTaskAssignee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AddHiddenTaskAssigneeRequest)
|
||||||
|
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("AddHiddenTaskAssignee", 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 _Bundle_QueryTheOrderSnapshotInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryTheOrderSnapshotInformationReq)
|
||||||
|
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("QueryTheOrderSnapshotInformation", 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)
|
||||||
|
}
|
||||||
|
|
||||||
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
// Bundle_ServiceDesc is the grpc_go.ServiceDesc for Bundle service.
|
||||||
// It's only intended for direct use with grpc_go.RegisterService,
|
// It's only intended for direct use with grpc_go.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -3530,6 +3696,22 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "GetPendingUploadBreakdown",
|
MethodName: "GetPendingUploadBreakdown",
|
||||||
Handler: _Bundle_GetPendingUploadBreakdown_Handler,
|
Handler: _Bundle_GetPendingUploadBreakdown_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetPendingAssign",
|
||||||
|
Handler: _Bundle_GetPendingAssign_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RevertTaskCompletionByUUIDItem",
|
||||||
|
Handler: _Bundle_RevertTaskCompletionByUUIDItem_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AddHiddenTaskAssignee",
|
||||||
|
Handler: _Bundle_AddHiddenTaskAssignee_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "QueryTheOrderSnapshotInformation",
|
||||||
|
Handler: _Bundle_QueryTheOrderSnapshotInformation_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc_go.StreamDesc{},
|
Streams: []grpc_go.StreamDesc{},
|
||||||
Metadata: "pb/bundle.proto",
|
Metadata: "pb/bundle.proto",
|
||||||
|
|||||||
@ -155,6 +155,11 @@ const (
|
|||||||
ErrorBalanceInsufficient = "余额不足"
|
ErrorBalanceInsufficient = "余额不足"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
BundlePurchaseExport = 1
|
||||||
|
BundleDetailExport = 2
|
||||||
|
)
|
||||||
|
|
||||||
// GetMsg 获取状态码对应信息
|
// GetMsg 获取状态码对应信息
|
||||||
func GetMsg(code int) string {
|
func GetMsg(code int) string {
|
||||||
msg, ok := MsgFlags[code]
|
msg, ok := MsgFlags[code]
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"fonchain-fiee/api/bundle"
|
"fonchain-fiee/api/bundle"
|
||||||
"fonchain-fiee/api/cast"
|
"fonchain-fiee/api/cast"
|
||||||
|
"fonchain-fiee/pkg/e"
|
||||||
logicCast "fonchain-fiee/pkg/logic/cast"
|
logicCast "fonchain-fiee/pkg/logic/cast"
|
||||||
"fonchain-fiee/pkg/model/login"
|
"fonchain-fiee/pkg/model/login"
|
||||||
"fonchain-fiee/pkg/service"
|
"fonchain-fiee/pkg/service"
|
||||||
@ -32,7 +33,7 @@ func MetricsBusiness(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
resp, err := service.BundleProvider.MetricsBusiness(ctx, &req)
|
resp, err := service.BundleProvider.MetricsBusiness(ctx, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, errors.New(common.MetricsBusinessFailed))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
service.Success(ctx, resp)
|
service.Success(ctx, resp)
|
||||||
@ -97,13 +98,13 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
|
|||||||
sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
|
sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
|
||||||
}
|
}
|
||||||
|
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow), "合计支付金额(美元)")
|
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "合计支付金额(美元)")
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow), "合计结算金额(美元)")
|
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), "合计结算金额(美元)")
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow), "合计手续费金额(美元)")
|
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), "合计手续费金额(美元)")
|
||||||
|
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "$"+sumPayment.StringFixed(2))
|
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+2), "$"+sumPayment.StringFixed(2))
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), "$"+sumFinal.StringFixed(2))
|
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+2), "$"+sumFinal.StringFixed(2))
|
||||||
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), "$"+sumFee.StringFixed(2))
|
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+2), "$"+sumFee.StringFixed(2))
|
||||||
|
|
||||||
// 创建黑色边框样式
|
// 创建黑色边框样式
|
||||||
borderStyle, err := f.NewStyle(&excelize.Style{
|
borderStyle, err := f.NewStyle(&excelize.Style{
|
||||||
@ -124,8 +125,8 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 应用样式到合计区域(包括标题行和数值行)
|
// 应用样式到合计区域(包括标题行和数值行)
|
||||||
startCell := fmt.Sprintf("A%d", endRow)
|
startCell := fmt.Sprintf("A%d", endRow+1)
|
||||||
endCell := fmt.Sprintf("C%d", endRow+1)
|
endCell := fmt.Sprintf("C%d", endRow+2)
|
||||||
if err := f.SetCellStyle(sheet, startCell, endCell, borderStyle); err != nil {
|
if err := f.SetCellStyle(sheet, startCell, endCell, borderStyle); err != nil {
|
||||||
fmt.Println("设置边框样式失败:", err)
|
fmt.Println("设置边框样式失败:", err)
|
||||||
}
|
}
|
||||||
@ -133,8 +134,8 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := exportStructToExcel(resp.Data, []string{
|
if err := exportStructToExcel(resp.Data, []string{
|
||||||
"订单编号", "套餐", "用户编号", "客户姓名", "手机号", "支付时间", "套餐视频数", "增值视频数", "套餐金额", "增值金额", "支付金额", "结算金额", "手续费", "汇率(%)",
|
"订单编号", "套餐", "用户编号", "客户姓名", "手机号", "支付时间", "增值视频数", "套餐金额", "增值金额", "支付金额", "结算金额", "手续费", "汇率(%)",
|
||||||
}, filePath, statistic); err != nil {
|
}, filePath, e.BundlePurchaseExport, req.EndTime, statistic); err != nil {
|
||||||
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
|
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -441,7 +442,7 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
|
|||||||
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "套餐金额", "增值金额", "支付金额", "币种", "手续费", "套餐视频总数",
|
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "套餐金额", "增值金额", "支付金额", "币种", "手续费", "套餐视频总数",
|
||||||
"增值视频总数", "套餐视频单价", "增值视频单价", "当前需要上传套餐视频数", "当前需要上传增值视频数",
|
"增值视频总数", "套餐视频单价", "增值视频单价", "当前需要上传套餐视频数", "当前需要上传增值视频数",
|
||||||
"当前已上传套餐视频数", "当前已上传增值视频数", "当前套餐视频已消费总金额", "当前增值视频已消费总金额",
|
"当前已上传套餐视频数", "当前已上传增值视频数", "当前套餐视频已消费总金额", "当前增值视频已消费总金额",
|
||||||
}, filePath, yelloStyle, statistic); err != nil {
|
}, filePath, e.BundleDetailExport, "", statistic); err != nil {
|
||||||
service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed))
|
service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -518,11 +519,28 @@ func BalanceMetricsExport(ctx *gin.Context) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func exportStructToExcel[T any](data []T, headers []string, filename string, fns ...func(data []T, headers []string, f *excelize.File)) error {
|
func exportStructToExcel[T any](data []T, headers []string, filename string, exportType int, endTime string, fns ...func(data []T, headers []string, f *excelize.File)) error {
|
||||||
|
|
||||||
f := excelize.NewFile()
|
f := excelize.NewFile()
|
||||||
sheet := f.GetSheetName(f.GetActiveSheetIndex())
|
sheet := f.GetSheetName(f.GetActiveSheetIndex())
|
||||||
|
|
||||||
|
// 创建黄色背景样式(用于截止行)
|
||||||
|
yellowStyle, err := f.NewStyle(&excelize.Style{
|
||||||
|
Fill: excelize.Fill{
|
||||||
|
Type: "pattern",
|
||||||
|
Color: []string{"#FFFF00"}, // 黄色
|
||||||
|
Pattern: 1, // 实心填充
|
||||||
|
},
|
||||||
|
Alignment: &excelize.Alignment{
|
||||||
|
Horizontal: "left",
|
||||||
|
Vertical: "center",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
// 如果创建样式失败,继续执行但不应用样式
|
||||||
|
yellowStyle = 0
|
||||||
|
}
|
||||||
|
|
||||||
// 写入表头
|
// 写入表头
|
||||||
for i, h := range headers {
|
for i, h := range headers {
|
||||||
cell, _ := excelize.CoordinatesToCellName(i+1, 1)
|
cell, _ := excelize.CoordinatesToCellName(i+1, 1)
|
||||||
@ -546,12 +564,52 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, fns
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 写入数据
|
// 写入数据
|
||||||
for rowIdx, item := range data {
|
actualRowIdx := 0
|
||||||
|
flag := 0
|
||||||
|
for _, item := range data {
|
||||||
val := reflect.ValueOf(item)
|
val := reflect.ValueOf(item)
|
||||||
if val.Kind() == reflect.Ptr {
|
if val.Kind() == reflect.Ptr {
|
||||||
val = val.Elem()
|
val = val.Elem()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if exportType == e.BundlePurchaseExport {
|
||||||
|
if endTime != "" {
|
||||||
|
// 通过反射获取 PayTime 字段
|
||||||
|
payTimeField := val.FieldByName("PayTime")
|
||||||
|
if payTimeField.IsValid() && payTimeField.Kind() == reflect.String {
|
||||||
|
payTimeStr := payTimeField.String()
|
||||||
|
if payTimeStr != "" {
|
||||||
|
// 解析时间
|
||||||
|
endTimeParsed, err1 := time.Parse(time.DateTime, endTime)
|
||||||
|
payTimeParsed, err2 := time.Parse(time.DateTime, payTimeStr)
|
||||||
|
|
||||||
|
if err1 == nil && err2 == nil {
|
||||||
|
// 如果 endTime <= PayTime,需要插入截止行
|
||||||
|
if !endTimeParsed.After(payTimeParsed) && flag == 0 {
|
||||||
|
flag = 1
|
||||||
|
// 格式化截止时间显示
|
||||||
|
endTimeFormatted := endTimeParsed.Format("2006年01月02日15点04分")
|
||||||
|
// 在当前行写入"截止xxxx年xx月xx点"
|
||||||
|
cell, _ := excelize.CoordinatesToCellName(1, actualRowIdx+2)
|
||||||
|
f.SetCellValue(sheet, cell, fmt.Sprintf("截止%s", endTimeFormatted))
|
||||||
|
// 应用黄色背景样式
|
||||||
|
if yellowStyle > 0 {
|
||||||
|
// 合并整行的单元格以显示截止信息
|
||||||
|
lastCol, _ := excelize.ColumnNumberToName(len(headers))
|
||||||
|
startCell := cell
|
||||||
|
endCell := fmt.Sprintf("%s%d", lastCol, actualRowIdx+2)
|
||||||
|
f.MergeCell(sheet, startCell, endCell)
|
||||||
|
f.SetCellStyle(sheet, startCell, endCell, yellowStyle)
|
||||||
|
}
|
||||||
|
// 移动到下一行
|
||||||
|
actualRowIdx++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for colIdx, fieldIdx := range exportedFields {
|
for colIdx, fieldIdx := range exportedFields {
|
||||||
field := val.Field(fieldIdx)
|
field := val.Field(fieldIdx)
|
||||||
|
|
||||||
@ -563,9 +621,10 @@ func exportStructToExcel[T any](data []T, headers []string, filename string, fns
|
|||||||
cellValue = field.Interface()
|
cellValue = field.Interface()
|
||||||
}
|
}
|
||||||
|
|
||||||
cell, _ := excelize.CoordinatesToCellName(colIdx+1, rowIdx+2)
|
cell, _ := excelize.CoordinatesToCellName(colIdx+1, actualRowIdx+2)
|
||||||
f.SetCellValue(sheet, cell, cellValue)
|
f.SetCellValue(sheet, cell, cellValue)
|
||||||
}
|
}
|
||||||
|
actualRowIdx++
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user