消息服务RPC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
835 B

package msgrpc
const DES_KEY = "msgsirpc"
type Req struct {
SiteId string
Dbname string
}
type MsgBody struct {
Req
Platform string
BusinessId string
Domainname string
Type string
Data string
OrderSn string
Memo string
}
type MsgSend struct {
Id string
}
type NoticeSend struct {
Req
Domain string
UserId string
ManagerId string
TargetType string
TargetId string
TemplateData map[string]string
}
func rpc_server_conn(url ...string) (*MsgRpcServiceClient, error) {
var wx_rpc_url string = "127.0.0.1:7954"
if len(url) > 0 && url[0] != "" {
wx_rpc_url = url[0]
}
conn, _, err := DialMsgRpcService("tcp", wx_rpc_url)
if err != nil {
return nil, err
}
return conn, nil
}