fixed
package
This commit is contained in:
parent
8a85b63562
commit
05400007b2
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -58,4 +58,5 @@ fabric.properties
|
|||
|
||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
||||
.glide/
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package proxy
|
||||
package member
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.loafle.net/overflow/encryption_go"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy"
|
||||
"log"
|
||||
)
|
||||
|
||||
|
@ -69,7 +70,7 @@ func (m *MemberService) Regist() string {
|
|||
m.Digest = digest
|
||||
memMap := m.getMemberMap()
|
||||
|
||||
re := invokeDB(TARGET_DAO, "create", memMap)
|
||||
re := proxy.InvokeDB(TARGET_DAO, "create", memMap)
|
||||
|
||||
return re
|
||||
}
|
||||
|
@ -77,7 +78,7 @@ func (m *MemberService) Regist() string {
|
|||
func (m *MemberService) ReadByEmail() string {
|
||||
log.Println("Call ReadByEmail", m.Email)
|
||||
memMap := m.getMemberMap()
|
||||
re := invokeDB(TARGET_DAO, "findByEmail", memMap)
|
||||
re := proxy.InvokeDB(TARGET_DAO, "findByEmail", memMap)
|
||||
return re
|
||||
}
|
||||
|
||||
|
@ -89,7 +90,7 @@ func (m *MemberService) Read() string {
|
|||
mm := make(map[string]string)
|
||||
mm["id"] = string(m.Id)
|
||||
log.Println("Read Member", m)
|
||||
re := invokeDB(TARGET_DAO, "find", mm)
|
||||
re := proxy.InvokeDB(TARGET_DAO, "find", mm)
|
||||
|
||||
return re
|
||||
}
|
||||
|
@ -100,7 +101,7 @@ func (m *MemberService) Modify() string {
|
|||
m.Digest = "read"
|
||||
memMap := m.getMemberMap()
|
||||
|
||||
re := invokeDB(TARGET_DAO, "update", memMap)
|
||||
re := proxy.InvokeDB(TARGET_DAO, "update", memMap)
|
||||
|
||||
return re
|
||||
}
|
||||
|
@ -111,7 +112,7 @@ func (m *MemberService) Remove() string {
|
|||
m.Digest = "read"
|
||||
memMap := m.getMemberMap()
|
||||
|
||||
re := invokeDB(TARGET_DAO, "delete", memMap)
|
||||
re := proxy.InvokeDB(TARGET_DAO, "delete", memMap)
|
||||
|
||||
return re
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
package proxy
|
||||
package member
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"log"
|
||||
"git.loafle.net/overflow/overflow_proxy_service/proxy"
|
||||
)
|
||||
|
||||
func TestMemberService_Login(t *testing.T) {
|
||||
|
@ -34,7 +35,7 @@ func TestMemberLogin(t *testing.T) {
|
|||
func TestMemberService_Read(t *testing.T) {
|
||||
mm := make(map[string] string)
|
||||
mm["id"] = "12"
|
||||
rr := invokeDB(TARGET_DAO, "find", mm)
|
||||
rr := proxy.InvokeDB(TARGET_DAO, "find", mm)
|
||||
|
||||
log.Println(rr)
|
||||
}
|
||||
|
@ -45,7 +46,7 @@ func TestMemberService_ReadByEmail(t *testing.T) {
|
|||
}
|
||||
|
||||
mm := m.getMemberMap()
|
||||
rr := invokeDB(TARGET_DAO, "findByEmail", mm)
|
||||
rr := proxy.InvokeDB(TARGET_DAO, "findByEmail", mm)
|
||||
log.Println(rr)
|
||||
}
|
||||
|
||||
|
@ -56,6 +57,6 @@ func TestMemberUpdate(t *testing.T) {
|
|||
}
|
||||
|
||||
mm := m.getMemberMap()
|
||||
rr := invokeDB(TARGET_DAO, "update", mm)
|
||||
rr := proxy.InvokeDB(TARGET_DAO, "update", mm)
|
||||
log.Println(rr)
|
||||
}
|
|
@ -7,7 +7,7 @@ import (
|
|||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func invokeDB(targetDb, methodName string, param map[string]string) (string) {
|
||||
func InvokeDB(targetDb, methodName string, param map[string]string) (string) {
|
||||
|
||||
in := &pb.DBInput{}
|
||||
in.TargetDao = targetDb
|
||||
|
|
Loading…
Reference in New Issue
Block a user