diff --git a/proxy/target/target_service.go b/proxy/target/target_service.go index 8410892..164d3c9 100644 --- a/proxy/target/target_service.go +++ b/proxy/target/target_service.go @@ -5,7 +5,7 @@ import ( "git.loafle.net/overflow/commons_go/model/timestamp" "git.loafle.net/overflow/overflow_proxy_service/proxy/member" "git.loafle.net/overflow/overflow_proxy_service/proxy" - "fmt" + ) type Target struct { @@ -17,7 +17,9 @@ type Target struct { Kinds string `json:"kinds,omitempty"` Version string `json:"version,omitempty"` CreateDate timestamp.Timestamp `json:"createDate,omitempty"` + PortType string `json:"portType,omitempty"` Member *member.Member `json:"member,omitempty"` + } type TargetService struct { @@ -35,6 +37,7 @@ func (t *TargetService)GetModel() interface{} { func (t *TargetService)List(tm *Target) string { + //FIXME:: Test hard code tm.Member.Id = "1" bytes, err := json.Marshal(tm) @@ -71,10 +74,17 @@ func (t *TargetService)Create(tm *Target) string { func (t *TargetService)CreateList(tmlist *[]*Target) string { + bytes, err := json.Marshal(tmlist) + + if err != nil { + return "" + } + + m := make(map[string]string) + m["java.util.List"] = string(bytes) + + out := proxy.InvokeDB("target", "createAll", m) - fmt.Println(len(*tmlist)) - - - return "" + return out; } \ No newline at end of file