accountType

This commit is contained in:
李子铭 2024-11-11 16:37:00 +08:00
parent a9595344b1
commit f160500c78
1 changed files with 6 additions and 4 deletions

View File

@ -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位