Merge branch 'feature-h5-daiyb' into dev

This commit is contained in:
戴育兵 2026-01-13 15:57:45 +08:00
commit edebd161a1
4 changed files with 1012 additions and 1736 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2749,245 +2749,6 @@ var _ interface {
ErrorName() string
} = WorkListRespValidationError{}
// Validate checks the field values on WorkList2Req with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *WorkList2Req) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on WorkList2Req with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in WorkList2ReqMultiError, or
// nil if none found.
func (m *WorkList2Req) ValidateAll() error {
return m.validate(true)
}
func (m *WorkList2Req) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for Page
// no validation rules for PageSize
if len(errors) > 0 {
return WorkList2ReqMultiError(errors)
}
return nil
}
// WorkList2ReqMultiError is an error wrapping multiple validation errors
// returned by WorkList2Req.ValidateAll() if the designated constraints aren't met.
type WorkList2ReqMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m WorkList2ReqMultiError) Error() string {
msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m WorkList2ReqMultiError) AllErrors() []error { return m }
// WorkList2ReqValidationError is the validation error returned by
// WorkList2Req.Validate if the designated constraints aren't met.
type WorkList2ReqValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e WorkList2ReqValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e WorkList2ReqValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e WorkList2ReqValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e WorkList2ReqValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e WorkList2ReqValidationError) ErrorName() string { return "WorkList2ReqValidationError" }
// Error satisfies the builtin error interface
func (e WorkList2ReqValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sWorkList2Req.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = WorkList2ReqValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = WorkList2ReqValidationError{}
// Validate checks the field values on WorkList2Resp with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *WorkList2Resp) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on WorkList2Resp with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in WorkList2RespMultiError, or
// nil if none found.
func (m *WorkList2Resp) ValidateAll() error {
return m.validate(true)
}
func (m *WorkList2Resp) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
for idx, item := range m.GetData() {
_, _ = idx, item
if all {
switch v := interface{}(item).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, WorkList2RespValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, WorkList2RespValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return WorkList2RespValidationError{
field: fmt.Sprintf("Data[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
// no validation rules for Count
if len(errors) > 0 {
return WorkList2RespMultiError(errors)
}
return nil
}
// WorkList2RespMultiError is an error wrapping multiple validation errors
// returned by WorkList2Resp.ValidateAll() if the designated constraints
// aren't met.
type WorkList2RespMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m WorkList2RespMultiError) Error() string {
msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m WorkList2RespMultiError) AllErrors() []error { return m }
// WorkList2RespValidationError is the validation error returned by
// WorkList2Resp.Validate if the designated constraints aren't met.
type WorkList2RespValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e WorkList2RespValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e WorkList2RespValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e WorkList2RespValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e WorkList2RespValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e WorkList2RespValidationError) ErrorName() string { return "WorkList2RespValidationError" }
// Error satisfies the builtin error interface
func (e WorkList2RespValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sWorkList2Resp.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = WorkList2RespValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = WorkList2RespValidationError{}
// Validate checks the field values on WorkDetailReq with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
@ -4825,40 +4586,6 @@ func (m *WorkInfoResp) validate(all bool) error {
// no validation rules for WorkCategory
for idx, item := range m.GetPlatformInfoData() {
_, _ = idx, item
if all {
switch v := interface{}(item).(type) {
case interface{ ValidateAll() error }:
if err := v.ValidateAll(); err != nil {
errors = append(errors, WorkInfoRespValidationError{
field: fmt.Sprintf("PlatformInfoData[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
case interface{ Validate() error }:
if err := v.Validate(); err != nil {
errors = append(errors, WorkInfoRespValidationError{
field: fmt.Sprintf("PlatformInfoData[%v]", idx),
reason: "embedded message failed validation",
cause: err,
})
}
}
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
if err := v.Validate(); err != nil {
return WorkInfoRespValidationError{
field: fmt.Sprintf("PlatformInfoData[%v]", idx),
reason: "embedded message failed validation",
cause: err,
}
}
}
}
if len(errors) > 0 {
return WorkInfoRespMultiError(errors)
}
@ -24614,124 +24341,6 @@ var _ interface {
ErrorName() string
} = WorkListResp_InfoValidationError{}
// Validate checks the field values on WorkList2Resp_Info with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *WorkList2Resp_Info) Validate() error {
return m.validate(false)
}
// ValidateAll checks the field values on WorkList2Resp_Info with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// WorkList2Resp_InfoMultiError, or nil if none found.
func (m *WorkList2Resp_Info) ValidateAll() error {
return m.validate(true)
}
func (m *WorkList2Resp_Info) validate(all bool) error {
if m == nil {
return nil
}
var errors []error
// no validation rules for WorkUuid
// no validation rules for ArtistName
// no validation rules for ArtistPhone
// no validation rules for Title
// no validation rules for WorkCategory
// no validation rules for WorkStatus
// no validation rules for SubmitTime
// no validation rules for StatusUpdateTime
if len(errors) > 0 {
return WorkList2Resp_InfoMultiError(errors)
}
return nil
}
// WorkList2Resp_InfoMultiError is an error wrapping multiple validation errors
// returned by WorkList2Resp_Info.ValidateAll() if the designated constraints
// aren't met.
type WorkList2Resp_InfoMultiError []error
// Error returns a concatenation of all the error messages it wraps.
func (m WorkList2Resp_InfoMultiError) Error() string {
msgs := make([]string, 0, len(m))
for _, err := range m {
msgs = append(msgs, err.Error())
}
return strings.Join(msgs, "; ")
}
// AllErrors returns a list of validation violation errors.
func (m WorkList2Resp_InfoMultiError) AllErrors() []error { return m }
// WorkList2Resp_InfoValidationError is the validation error returned by
// WorkList2Resp_Info.Validate if the designated constraints aren't met.
type WorkList2Resp_InfoValidationError struct {
field string
reason string
cause error
key bool
}
// Field function returns field value.
func (e WorkList2Resp_InfoValidationError) Field() string { return e.field }
// Reason function returns reason value.
func (e WorkList2Resp_InfoValidationError) Reason() string { return e.reason }
// Cause function returns cause value.
func (e WorkList2Resp_InfoValidationError) Cause() error { return e.cause }
// Key function returns key value.
func (e WorkList2Resp_InfoValidationError) Key() bool { return e.key }
// ErrorName returns error name.
func (e WorkList2Resp_InfoValidationError) ErrorName() string {
return "WorkList2Resp_InfoValidationError"
}
// Error satisfies the builtin error interface
func (e WorkList2Resp_InfoValidationError) Error() string {
cause := ""
if e.cause != nil {
cause = fmt.Sprintf(" | caused by: %v", e.cause)
}
key := ""
if e.key {
key = "key for "
}
return fmt.Sprintf(
"invalid %sWorkList2Resp_Info.%s: %s%s",
key,
e.field,
e.reason,
cause)
}
var _ error = WorkList2Resp_InfoValidationError{}
var _ interface {
Field() string
Reason() string
Key() bool
Cause() error
ErrorName() string
} = WorkList2Resp_InfoValidationError{}
// Validate checks the field values on MediaAccountsResp_Info with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.

View File

@ -39,7 +39,6 @@ type CastClient interface {
MediaInfoByPlatform(ctx context.Context, in *MediaInfoByPlatformReq, opts ...grpc_go.CallOption) (*MediaInfoByPlatformResp, common.ErrorWithAttachment)
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
WorkListPublished(ctx context.Context, in *WorkListPublishedReq, opts ...grpc_go.CallOption) (*WorkListPublishedResp, common.ErrorWithAttachment)
WorkList2(ctx context.Context, in *WorkList2Req, opts ...grpc_go.CallOption) (*WorkList2Resp, common.ErrorWithAttachment)
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
@ -148,7 +147,6 @@ type CastClientImpl struct {
MediaInfoByPlatform func(ctx context.Context, in *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
WorkListPublished func(ctx context.Context, in *WorkListPublishedReq) (*WorkListPublishedResp, error)
WorkList2 func(ctx context.Context, in *WorkList2Req) (*WorkList2Resp, error)
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
@ -299,12 +297,6 @@ func (c *castClient) WorkListPublished(ctx context.Context, in *WorkListPublishe
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkListPublished", in, out)
}
func (c *castClient) WorkList2(ctx context.Context, in *WorkList2Req, opts ...grpc_go.CallOption) (*WorkList2Resp, common.ErrorWithAttachment) {
out := new(WorkList2Resp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList2", in, out)
}
func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) {
out := new(WorkDetailResp)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -775,7 +767,6 @@ type CastServer interface {
MediaInfoByPlatform(context.Context, *MediaInfoByPlatformReq) (*MediaInfoByPlatformResp, error)
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error)
WorkList2(context.Context, *WorkList2Req) (*WorkList2Resp, error)
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
@ -905,9 +896,6 @@ func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkLis
func (UnimplementedCastServer) WorkListPublished(context.Context, *WorkListPublishedReq) (*WorkListPublishedResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkListPublished not implemented")
}
func (UnimplementedCastServer) WorkList2(context.Context, *WorkList2Req) (*WorkList2Resp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkList2 not implemented")
}
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
}
@ -1454,35 +1442,6 @@ func _Cast_WorkListPublished_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _Cast_WorkList2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(WorkList2Req)
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("WorkList2", 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 _Cast_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(WorkDetailReq)
if err := dec(in); err != nil {
@ -3734,10 +3693,6 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "WorkListPublished",
Handler: _Cast_WorkListPublished_Handler,
},
{
MethodName: "WorkList2",
Handler: _Cast_WorkList2_Handler,
},
{
MethodName: "WorkDetail",
Handler: _Cast_WorkDetail_Handler,

View File

@ -71,10 +71,10 @@ func Test(ctx *gin.Context) {
}
if action == "" {
profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
ProfileKey: profileKey,
InstagramDetails: true,
resp, err := service.CastProvider.WorkList(context.Background(), &cast.WorkListReq{
Page: 1,
PageSize: 1000,
SubmitTimeMonths: []string{"2026-01", "2025-12"},
})
if err != nil {
service.Error(ctx, err)