get_cash_pool.go 500 字节
package query

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

// 获取现金池
type GetCashPoolQuery struct {
	CompanyId int64 `json:"companyId" valid:"Required"`  // 公司id
}

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