get_dividends_order.go
766 字节
package query
import (
"fmt"
"github.com/beego/beego/v2/core/validation"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
)
type GetDividendsOrderQuery struct {
//操作人
Operator domain.Operator `json:"-"`
// 分红订单ID
DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"`
}
func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) {
}
func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {
valid := validation.Validation{}
b, err := valid.Valid(getDividendsOrderQuery)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}