...
|
...
|
@@ -27,29 +27,6 @@ type CreateDividendsOrderCommand struct { |
|
|
OrderGoodExpense float64 `json:"orderGoodExpense"` //订单产品费用
|
|
|
OrderGoodName string `json:"orderGoodName"` //订单产品名称
|
|
|
OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
|
|
|
OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
|
|
|
OrderGoodQuantity float64 `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
|
|
|
// } |
...
|
...
|
|