zhangzengfei
2024-08-25 5f31d07ff92d87dd1016e9279df84d8f3641feb5
controller/captureCtl.go
@@ -3,7 +3,6 @@
import (
   "encoding/base64"
   "fmt"
   "gat1400Exchange/util"
   "math/rand"
   "net/http"
   "path"
@@ -15,6 +14,7 @@
   "gat1400Exchange/pkg/logger"
   "gat1400Exchange/repository"
   "gat1400Exchange/service"
   "gat1400Exchange/util"
   "gat1400Exchange/vo"
   "github.com/gin-gonic/gin"
@@ -64,7 +64,7 @@
         today := time.Now().Format("2006-01-02")
         imagePath := path.Join(config.LogConf.Path, "gat1400_face_images", today, img.ImageID+".jpeg")
         err = util.WriteToFile(imagePath, imageBytes)
         if err != nil {
         if err == nil {
            face.SubImageList.SubImageInfoObject[idx].Data = ""
            face.SubImageList.SubImageInfoObject[idx].StoragePath = config.ImageConf.ImageUriPrefix + "/" + today + "/" + img.ImageID + ".jpeg"
         }
@@ -82,6 +82,10 @@
      go a.Repository.FaceForward(req.FaceListObject.FaceObject)
   }
   if config.ForwardConf.RecordServer != "" {
      go a.Repository.PubRecordMessage(face.DeviceID, face.FaceID)
   }
   rspMsg := vo.ResponseStatus{
      RequestURL:   c.FullPath(),
      StatusCode:   vo.StatusSuccess,