作者 tangxuhui

代码清理

... ... @@ -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
// }
... ...
... ... @@ -10,21 +10,3 @@ type RemoveDividendsOrderCommand struct {
// 分红订单ID
DividendsOrderId []string `json:"dividendsOrderId"`
}
// func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) {
// }
// func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error {
// valid := validation.Validation{}
// b, err := valid.Valid(removeDividendsOrderCommand)
// if err != nil {
// return err
// }
// if !b {
// for _, validErr := range valid.Errors {
// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
// }
// }
// return nil
// }
... ...
... ... @@ -33,26 +33,3 @@ type UpdateDividendsOrderCommand struct {
OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
} `json:"orderGoods"`
}
// func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) Valid(validation *validation.Validation) {
// // 162 92522 89000
// orderTimeStr := strconv.Itoa(int(updateDividendsOrderCommand.OrderTime))
// orderTimeStrRune := []rune(orderTimeStr)
// if len(orderTimeStrRune) != 13 {
// validation.AddError("订单产生时间", "格式错误")
// }
// }
// func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) ValidateCommand() error {
// valid := validation.Validation{}
// b, err := valid.Valid(updateDividendsOrderCommand)
// if err != nil {
// return err
// }
// if !b {
// for _, validErr := range valid.Errors {
// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
// }
// }
// return nil
// }
... ...