...
|
...
|
@@ -18,9 +18,15 @@ func (serviceGateway *HttplibUserServiceGateway) GetUser(companyId int64, orgId |
|
|
request := serviceGateway.createRequest(url, "get")
|
|
|
options := make(map[string]interface{})
|
|
|
options["uid"] = uid
|
|
|
request.JSONBody(options)
|
|
|
_, err1 := request.JSONBody(options)
|
|
|
if err1 != nil {
|
|
|
return nil, err1
|
|
|
}
|
|
|
response := make(map[string]interface{})
|
|
|
request.ToJSON(&response)
|
|
|
err2 := request.ToJSON(&response)
|
|
|
if err2 != nil {
|
|
|
return nil, err2
|
|
|
}
|
|
|
data, err := serviceGateway.responseHandle(response)
|
|
|
return data, err
|
|
|
}
|
...
|
...
|
@@ -32,9 +38,15 @@ func (serviceGateway *HttplibUserServiceGateway) GetCompany(companyId int64) (ma |
|
|
request := serviceGateway.createRequest(url, "get")
|
|
|
options := make(map[string]interface{})
|
|
|
options["companyId"] = companyId
|
|
|
request.JSONBody(options)
|
|
|
_, err1 := request.JSONBody(options)
|
|
|
if err1 != nil {
|
|
|
return nil, err1
|
|
|
}
|
|
|
response := make(map[string]interface{})
|
|
|
request.ToJSON(&response)
|
|
|
err2 := request.ToJSON(&response)
|
|
|
if err2 != nil {
|
|
|
return nil, err2
|
|
|
}
|
|
|
data, err := serviceGateway.responseHandle(response)
|
|
|
return data, err
|
|
|
}
|
...
|
...
|
@@ -47,9 +59,15 @@ func (serviceGateway *HttplibUserServiceGateway) GetOrganization(companyId int64 |
|
|
request := serviceGateway.createRequest(url, "get")
|
|
|
options := make(map[string]interface{})
|
|
|
options["orgId"] = organizationId
|
|
|
request.JSONBody(options)
|
|
|
_, err1 := request.JSONBody(options)
|
|
|
if err1 != nil {
|
|
|
return nil, err1
|
|
|
}
|
|
|
response := make(map[string]interface{})
|
|
|
request.ToJSON(&response)
|
|
|
err2 := request.ToJSON(&response)
|
|
|
if err2 != nil {
|
|
|
return nil, err2
|
|
|
}
|
|
|
data, err := serviceGateway.responseHandle(response)
|
|
|
return data, err
|
|
|
}
|
...
|
...
|
@@ -60,9 +78,15 @@ func (serviceGateway *HttplibUserServiceGateway) UserInMenu(companyId int64, use |
|
|
request := serviceGateway.createRequest(url, "get")
|
|
|
options := make(map[string]interface{})
|
|
|
options["code"] = menuCode
|
|
|
request.JSONBody(options)
|
|
|
_, err1 := request.JSONBody(options)
|
|
|
if err1 != nil {
|
|
|
return nil, err1
|
|
|
}
|
|
|
response := make(map[string]interface{})
|
|
|
request.ToJSON(&response)
|
|
|
err2 := request.ToJSON(&response)
|
|
|
if err2 != nil {
|
|
|
return nil, err2
|
|
|
}
|
|
|
data, err := serviceGateway.responseHandle(response)
|
|
|
return data, err
|
|
|
}
|
...
|
...
|
@@ -73,9 +97,15 @@ func (serviceGateway *HttplibUserServiceGateway) UserInOrganization(companyId in |
|
|
request := serviceGateway.createRequest(url, "get")
|
|
|
options := make(map[string]interface{})
|
|
|
options["orgId"] = orgId
|
|
|
request.JSONBody(options)
|
|
|
_, err1 := request.JSONBody(options)
|
|
|
if err1 != nil {
|
|
|
return nil, err1
|
|
|
}
|
|
|
response := make(map[string]interface{})
|
|
|
request.ToJSON(&response)
|
|
|
err2 := request.ToJSON(&response)
|
|
|
if err2 != nil {
|
|
|
return nil, err2
|
|
|
}
|
|
|
data, err := serviceGateway.responseHandle(response)
|
|
|
return data, err
|
|
|
}
|
...
|
...
|
|