tcp server 用于给andriod 客户端定时发送消息
liuxiaolong
2019-05-29 4e30b339ac10cdbce8a6aa1078a8ebcdafc37350
esutil/EsClient.go
@@ -99,12 +99,12 @@
         if exist {
            source["race"] = prace
         }
         fmt.Println("race: ", source["race"])
         source["ageDescription"] = getAgeDesc(source["Age"])
         source["videoNum"] = getVideoUrl(source)
         timeFormat := "2019-05-28 15:04:05"
         picDateStr, err := time.Parse(timeFormat, source["picDate"].(string))
         picDateStr, err := time.Parse("2006-01-02 15:04:05", source["picDate"].(string))
         fmt.Println("picDate: ", picDateStr)
         if err == nil {
            source["picDate"] = picDateStr
@@ -123,8 +123,9 @@
}
func getAgeDesc(age interface{})(ageDesc string) {
   fmt.Println("ageInterface: ", age)
   if age !=nil {
      ageInt := age.(int32)
      ageInt := age.(int)
      if ageInt >0 && ageInt<7 {
         ageDesc = "童年"
      } else if ageInt >=7 && ageInt<18 {