Skip to content
Snippets Groups Projects
Commit 05b68925 authored by fangyincheng's avatar fangyincheng
Browse files

Fix:fix bug

parent 2468348c
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,6 @@ type Gender hessian.JavaEnum
func init() {
config.SetProviderService(new(UserProvider))
config.SetProviderService(new(UsersProvider))
}
const (
......@@ -209,20 +208,6 @@ func (u *UserProvider) Version() string {
return ""
}
type UsersProvider struct {
}
func (s *UsersProvider) GetXxx() error {
return nil
}
func (u *UsersProvider) Service() string {
return "com.ikurento.user.UsersProvider"
}
func (u *UsersProvider) Version() string {
return ""
}
func println(format string, args ...interface{}) {
fmt.Printf("\033[32;40m"+format+"\033[0m\n", args...)
}
......@@ -34,7 +34,7 @@
<!-- 声明需要使用的服务接口 -->
<!--<dubbo:reference id="userProvider" protocol="jsonrpc" interface="com.ikurento.user.UserProvider">-->
<dubbo:reference registry="ikurento" check="false" id="userProvider" protocol="dubbo" interface="com.ikurento.user.UserProvider" version="2.0" group="as">
<dubbo:reference registry="ikurento" check="false" id="userProvider" protocol="dubbo" interface="com.ikurento.user.UserProvider">
<!--<dubbo:parameter key="heartbeat" value="10000"/ -->
</dubbo:reference>
......
......@@ -208,8 +208,12 @@ func (h *RpcServerHandler) OnMessage(session getty.Session, pkg interface{}) {
twoway = false
}
group := p.Body.(map[string]interface{})["attachments"].(map[interface{}]interface{})[constant.GROUP_KEY]
if group == nil {
group = ""
}
u := common.NewURLWithOptions(common.WithPath(p.Service.Path), common.WithParams(url.Values{}),
common.WithParamsValue(constant.GROUP_KEY, ""),
common.WithParamsValue(constant.GROUP_KEY, group.(string)),
common.WithParamsValue(constant.INTERFACE_KEY, p.Service.Interface),
common.WithParamsValue(constant.VERSION_KEY, p.Service.Version))
exporter, _ := dubboProtocol.ExporterMap().Load(u.ServiceKey())
......@@ -225,7 +229,7 @@ func (h *RpcServerHandler) OnMessage(session getty.Session, pkg interface{}) {
if invoker != nil {
result := invoker.Invoke(invocation.NewRPCInvocationForProvider(p.Service.Method, p.Body.(map[string]interface{})["args"].([]interface{}), map[string]string{
constant.PATH_KEY: p.Service.Path,
constant.GROUP_KEY: "",
constant.GROUP_KEY: group.(string),
constant.INTERFACE_KEY: p.Service.Interface,
constant.VERSION_KEY: p.Service.Version,
}))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment