Browse Source

完善rpc

master v0.1.0
lijianbin 2 years ago
parent
commit
a667caccae
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      client.createorder_test.go
  2. +1
    -1
      common.go

+ 1
- 1
client.createorder_test.go View File

@ -7,7 +7,7 @@ import (
func Test_CreateOrder(t *testing.T) { func Test_CreateOrder(t *testing.T) {
dbname := "shop" dbname := "shop"
siteid := "1198881" siteid := "1198881"
order_sn := "864351351351"
order_sn := "1638859609193467246"
list, err := CreateOrder(dbname,siteid,order_sn) list, err := CreateOrder(dbname,siteid,order_sn)


+ 1
- 1
common.go View File

@ -22,7 +22,7 @@ func rpc_server_conn(url ...string) (*OrderServiceClient, error) {
} else if conf.YYT_RPC_URL != "" { } else if conf.YYT_RPC_URL != "" {
rpc_url = conf.YYT_RPC_URL rpc_url = conf.YYT_RPC_URL
} else { } else {
rpc_url = "127.0.0.1:" + conf.YYT_RPC_URL
rpc_url = "127.0.0.1:" + conf.YYT_RPC_PORT
} }
conn, _, err := DialOrderService("tcp", rpc_url) conn, _, err := DialOrderService("tcp", rpc_url)


Loading…
Cancel
Save