tcp server 用于给andriod 客户端定时发送消息
liuxiaolong
2019-05-28 ea36295be108433cc3d377cb04205d43960bc95e
esutil/EsClient.go
@@ -133,20 +133,42 @@
func getSourceBaseInfo(source map[string]interface{}) (baseInfoJson string) {
   sdkType := source["sdkType"].(string)
   if sdkType == "人脸" {
      likePer,baseName,personId,idCard,personPicUrl,gender,content :="","","","","","",""
      if source["likePer"] !=nil {
         likePer = source["likePer"].(string)
      }
      if source["BaseName"] !=nil {
         baseName = source["BaseName"].(string)
      }
      if source["personId"] !=nil {
         personId = source["personId"].(string)
      }
      if source["idcard"] !=nil {
         idCard = source["idcard"].(string)
      }
      if source["personPicUrl"] !=nil {
         personPicUrl = source["personPicUrl"].(string)
      }
      if source["Gender"] !=nil {
         gender = source["Gender"].(string)
      }
      if source["content"] !=nil {
         content = source["content"].(string)
      }
      var baseInfo = BaseInfo{
         TaskId:"",//2.0新字段
         TaskName:"",//2.0新字段
         LikePer:source["likePer"].(string),
         LikePer:likePer,
         TableId:"",//2.0新字段
         TableName:source["BaseName"].(string),
         PersonId:source["personId"].(string),
         PersonName:source["idcard"].(string),//人员姓名,从管理平台获取
         PersonPicUrl:source["personPicUrl"].(string),
         Gender:source["Gender"].(string),
         TableName:baseName,
         PersonId:personId,
         PersonName:idCard,//人员姓名,从管理平台获取
         PersonPicUrl:personPicUrl,
         Gender:gender,
         PhoneNum:"",//手机号,从管理平台获取
         IDCard:source["idcard"].(string),
         IDCard:idCard,
         MonitorLevel:"",//2.0新字段
         Content:source["content"].(string),
         Content:content,
      }
      bytes, err := json.Marshal(baseInfo)
      if err !=nil {