21 lines
319 B
Go
21 lines
319 B
Go
|
|
package serialize
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"fmt"
|
||
|
|
|
||
|
|
"github.com/gogf/gf/v2/util/gvalid"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Request struct {
|
||
|
|
OrderId int64 `v:"order-exist"`
|
||
|
|
ProductName string `v:"order-exist"`
|
||
|
|
Amount int64
|
||
|
|
// ...
|
||
|
|
}
|
||
|
|
|
||
|
|
func RuleOrderExist(ctx context.Context, in gvalid.RuleFuncInput) error {
|
||
|
|
fmt.Println(in)
|
||
|
|
return nil
|
||
|
|
}
|