...
|
...
|
@@ -31,19 +31,20 @@ func (command *UpdatePartnerInfoCommand) ValidateCommand() error { |
|
|
if command.RegionInfo == nil {
|
|
|
return lib.ThrowError(lib.ARG_ERROR, "区域必填")
|
|
|
}
|
|
|
if len(command.Salesman) == 0 {
|
|
|
return lib.ThrowError(lib.ARG_ERROR, "关联业务员必填")
|
|
|
}
|
|
|
|
|
|
if command.Id == 0 {
|
|
|
return lib.ThrowError(lib.ARG_ERROR, "合伙人id错误")
|
|
|
}
|
|
|
for i := range command.Salesman {
|
|
|
if len(command.Salesman[i].Name) == 0 {
|
|
|
return lib.ThrowError(lib.ARG_ERROR, "关联业务员名称必填")
|
|
|
}
|
|
|
if len(command.Salesman[i].Telephone) == 0 {
|
|
|
return lib.ThrowError(lib.ARG_ERROR, "关联业务员电话必填")
|
|
|
}
|
|
|
}
|
|
|
// if len(command.Salesman) == 0 {
|
|
|
// return lib.ThrowError(lib.ARG_ERROR, "关联业务员必填")
|
|
|
// }
|
|
|
// for i := range command.Salesman {
|
|
|
// if len(command.Salesman[i].Name) == 0 {
|
|
|
// return lib.ThrowError(lib.ARG_ERROR, "关联业务员名称必填")
|
|
|
// }
|
|
|
// if len(command.Salesman[i].Telephone) == 0 {
|
|
|
// return lib.ThrowError(lib.ARG_ERROR, "关联业务员电话必填")
|
|
|
// }
|
|
|
// }
|
|
|
return nil
|
|
|
} |
...
|
...
|
|