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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
功能:{{.description}}
作者:{{.authorName}}
时间:{{.currenttime}}
*/
func {{.interfaceName}}({{.Parameters}}) (*{{.tableName}}Proto.Reply, error) {
//1、准备动作: 连接服务器
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
conn := GRpcUtil.GetConnection()
if conn == nil {
return nil, errors.New("RPC服务未启动! ")
}
//2、业务传参
c := {{.tableName}}Proto.New{{.tableName}}ManageClient(conn)
Reply, err := c.{{.interfaceName}}(ctx, &{{.tableName}}Proto.{{.argPrefix}}{{.RpcServiceParameters}})
if err != nil {
LogUtil.Error("{{.description}}错误: ", err.Error())
}
return Reply, err
}