| | |
| | | "basic.com/valib/deliver.git" |
| | | "bytes" |
| | | "encoding/base64" |
| | | "encoding/json" |
| | | "errors" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | |
| | | "webserver/extend/util" |
| | | "webserver/models" |
| | | "webserver/service" |
| | | esApi "basic.com/pubsub/esutil.git" |
| | | ) |
| | | |
| | | type FileController struct { |
| | |
| | | util.ResponseFormat(c, code.ComError, "比对服务请求失败") |
| | | return |
| | | } |
| | | msg, err := reqClient.Recv() |
| | | resultB, err := reqClient.Recv() |
| | | if err !=nil{ |
| | | util.ResponseFormat(c, code.ComError, "比对服务响应失败") |
| | | return |
| | | } |
| | | fmt.Println("compareReuslt:",msg) |
| | | m :=make(map[string]float32,0) |
| | | err = json.Unmarshal(resultB, &m) |
| | | if err !=nil{ |
| | | util.ResponseFormat(c, code.ComError, "result Unmarshal err") |
| | | return |
| | | } |
| | | personIds := make([]string,len(m)) |
| | | for k,_ :=range m{ |
| | | personIds = append(personIds,k) |
| | | } |
| | | dbpeople, e := esApi.Dbpersoninfosbyid(personIds, "dbtablepersons", "192.168.1.182", "9200") |
| | | if e !=nil{ |
| | | util.ResponseFormat(c, code.ComError, "result es query err") |
| | | } else { |
| | | util.ResponseFormat(c,code.Success,dbpeople) |
| | | } |
| | | } |
| | | } |
| | | |