zhangzengfei
2024-10-19 1ca4879df9cc3c22181b2a200aa4b793116d3d35
service/server.go
@@ -65,7 +65,7 @@
   return totals, nil
}
func GetData() (interface{}, error) {
func GetData() (*model.PushDataInfoV2, error) {
   //fmt.Println(config.Options.EsUrl)
   //fmt.Println(config.Options.ServerUrl)
   url := "http://" + config.Options.EsUrl + "/ai_face_ocean/_search"
@@ -137,10 +137,10 @@
      return nil, errors.New("获取小图数据失败, id:" + esInfoV2.Id)
   }
   var pushData = model.PushDataInfoV2
   var pushData = new(model.PushDataInfoV2)
   pushData.CameraId = esInfoV2.CameraId
   pushData.PicDate = esInfoV2.PicDate
   pushData.PicId = esInfoV2.PicId
   pushData.PicId = esInfoV2.Id
   pushData.CameraFloor = esInfoV2.CameraLocation.Floor
   pushData.Direction = esInfoV2.CameraLocation.Direction
   pushData.PicMaxImages = append(pushData.PicMaxImages, picMaxImages)
@@ -193,7 +193,7 @@
}
func DeleteData(id string) bool {
   url := "http://" + config.Options.EsUrl + "/ai_ocean/_delete_by_query?refresh=true"
   url := "http://" + config.Options.EsUrl + "/ai_face_ocean/_delete_by_query?refresh=true"
   deleteDSL := `{
               "query":{
                  "bool":{
@@ -220,7 +220,7 @@
}
func MarkData(id string) bool {
   url := "http://" + config.Options.EsUrl + "/ai_ocean/_update_by_query?refresh=true"
   url := "http://" + config.Options.EsUrl + "/ai_face_ocean/_update_by_query?refresh=true"
   markDSL := `{
    "script": {
        "source": "ctx._source.isDelete=true"