...
|
...
|
@@ -30,26 +30,3 @@ type CreateDividendsOrderCommand struct { |
|
|
OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
|
|
|
} `json:"orderGoods"`
|
|
|
} |
|
|
|
|
|
// func (createDividendsOrderCommand *CreateDividendsOrderCommand) Valid(validation *validation.Validation) {
|
|
|
// // 162 92522 89000
|
|
|
// orderTimeStr := strconv.Itoa(int(createDividendsOrderCommand.OrderTime))
|
|
|
// orderTimeStrRune := []rune(orderTimeStr)
|
|
|
// if len(orderTimeStrRune) != 13 {
|
|
|
// validation.AddError("订单产生时间", "格式错误")
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// func (createDividendsOrderCommand *CreateDividendsOrderCommand) ValidateCommand() error {
|
|
|
// valid := validation.Validation{}
|
|
|
// b, err := valid.Valid(createDividendsOrderCommand)
|
|
|
// if err != nil {
|
|
|
// return err
|
|
|
// }
|
|
|
// if !b {
|
|
|
// for _, validErr := range valid.Errors {
|
|
|
// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
|
|
|
// }
|
|
|
// }
|
|
|
// return nil
|
|
|
// } |
...
|
...
|
|