Compare commits

...

2 Commits

Author SHA1 Message Date
1fa862b85d 解决冲突 2025-06-10 16:17:09 +08:00
8f4dd8aee0 修改 2025-06-10 16:15:57 +08:00
5 changed files with 1602 additions and 945 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
@ -92,6 +92,16 @@ func (this *BundleDetailResponseV2) Validate() error {
return nil
}
func (this *OrderRecord) Validate() error {
for _, item := range this.PriceOptionsInfo {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PriceOptionsInfo", err)
}
}
}
return nil
}
func (this *PriceOptionsInfo) Validate() error {
return nil
}
func (this *OrderRecordsRequest) Validate() error {

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v5.29.2
// - protoc v4.24.0--rc1
// source: pb/bundle.proto
package bundle

View File

@ -33,7 +33,10 @@ func CreateBundleOrderSignature(c *gin.Context) {
service.Error(c, errors.New(common.MissBundleUUID))
return
}
if req.Language == "" {
service.Error(c, errors.New(common.MissLanguageTypes))
return
}
// 不去校验 签名
/*if req.Signature == "" {
service.Error(c, errors.New(common.MissOrderSignature))

View File

@ -9,8 +9,9 @@ const (
// 订单
const (
MissOrderNo = "缺少订单号"
MissOrderUUID = "缺少订单信息"
MissOrderNo = "缺少订单号"
MissOrderUUID = "缺少订单信息"
MissLanguageTypes = "缺少语言类型"
NotMatchOrderInfo = "非当前用户订单信息不可操作"
InvalidOrderAmount = "订单金额错误"