get_exchange_cash_activity.go 580 字节
package query

import (
	"fmt"
	"github.com/astaxie/beego/validation"
)

// 获取兑换现金活动
type GetExchangeCashActivityQuery struct {
	ExchangeCashActivityId int64   `json:"exchangeCashActivityId"`  // 兑换现金活动id
}

func (getExchangeCashActivityQuery *GetExchangeCashActivityQuery) ValidateQuery() error {
	valid := validation.Validation{}
	b, err := valid.Valid(getExchangeCashActivityQuery)
	if err != nil {
		return err
	}
	if !b {
		for _, validErr := range valid.Errors {
			return fmt.Errorf("%s  %s", validErr.Key, validErr.Message)
		}
	}
	return nil
}