accountType
This commit is contained in:
parent
a9595344b1
commit
f160500c78
|
@ -49,10 +49,12 @@ func (c *Config) orderReq(in *proto.OrderRequest) *api.OrderCreateReq {
|
|||
accountType := int64(0)
|
||||
if in.Order.Account == "" {
|
||||
accountType = 0
|
||||
} else if helper.IsPhoneNumber(in.Order.Account) {
|
||||
accountType = 1
|
||||
} else if helper.IsEmail(in.Order.Account) {
|
||||
accountType = 2
|
||||
} else {
|
||||
if helper.IsPhoneNumber(in.Order.Account) {
|
||||
accountType = 1
|
||||
} else {
|
||||
accountType = 2
|
||||
}
|
||||
}
|
||||
return &api.OrderCreateReq{
|
||||
OutTradeNo: in.Order.OrderNo, // 商户侧订单号长度只能是1-64位
|
||||
|
|
Loading…
Reference in New Issue