|
@@ -3,6 +3,7 @@ package main
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/date"
|
|
|
"encoding/json"
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
"net/rpc"
|
|
|
"testing"
|
|
|
)
|
|
@@ -11,19 +12,20 @@ func Test_Main(t *testing.T) {
|
|
|
var repl string
|
|
|
client, err := rpc.DialHTTP("tcp", "127.0.0.1:932")
|
|
|
if err != nil {
|
|
|
- logx.Println(err.Error())
|
|
|
+ logx.Info(err.Error())
|
|
|
return
|
|
|
}
|
|
|
defer client.Close()
|
|
|
b, _ := json.Marshal(map[string]interface{}{
|
|
|
"id": "01",
|
|
|
- "phones": "1503787076",
|
|
|
+ "phones": "1573710152",
|
|
|
"params": []string{date.NowFormat("150405")},
|
|
|
+ "ip": "123.3.3.2",
|
|
|
})
|
|
|
err = client.Call("Sms.Execute", b, &repl)
|
|
|
if err != nil {
|
|
|
- logx.Println(err.Error())
|
|
|
+ logx.Info(err.Error())
|
|
|
return
|
|
|
}
|
|
|
- logx.Println(repl)
|
|
|
+ logx.Info(repl)
|
|
|
}
|