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)
|
accountType := int64(0)
|
||||||
if in.Order.Account == "" {
|
if in.Order.Account == "" {
|
||||||
accountType = 0
|
accountType = 0
|
||||||
} else if helper.IsPhoneNumber(in.Order.Account) {
|
} else {
|
||||||
accountType = 1
|
if helper.IsPhoneNumber(in.Order.Account) {
|
||||||
} else if helper.IsEmail(in.Order.Account) {
|
accountType = 1
|
||||||
accountType = 2
|
} else {
|
||||||
|
accountType = 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return &api.OrderCreateReq{
|
return &api.OrderCreateReq{
|
||||||
OutTradeNo: in.Order.OrderNo, // 商户侧订单号长度只能是1-64位
|
OutTradeNo: in.Order.OrderNo, // 商户侧订单号长度只能是1-64位
|
||||||
|
|
Loading…
Reference in New Issue