Compare commits
2 Commits
8629decdc0
...
1fa862b85d
Author | SHA1 | Date | |
---|---|---|---|
1fa862b85d | |||
8f4dd8aee0 |
File diff suppressed because it is too large
Load Diff
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
@ -9,8 +9,9 @@ const (
|
||||
|
||||
// 订单
|
||||
const (
|
||||
MissOrderNo = "缺少订单号"
|
||||
MissOrderUUID = "缺少订单信息"
|
||||
MissOrderNo = "缺少订单号"
|
||||
MissOrderUUID = "缺少订单信息"
|
||||
MissLanguageTypes = "缺少语言类型"
|
||||
|
||||
NotMatchOrderInfo = "非当前用户订单信息不可操作"
|
||||
InvalidOrderAmount = "订单金额错误"
|
||||
|
Loading…
Reference in New Issue
Block a user