| | |
| | | import ( |
| | | "encoding/base64" |
| | | "fmt" |
| | | "gat1400Exchange/util" |
| | | "math/rand" |
| | | "net/http" |
| | | "path" |
| | |
| | | "gat1400Exchange/pkg/logger" |
| | | "gat1400Exchange/repository" |
| | | "gat1400Exchange/service" |
| | | "gat1400Exchange/util" |
| | | "gat1400Exchange/vo" |
| | | |
| | | "github.com/gin-gonic/gin" |
| | |
| | | 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" |
| | | } |
| | |
| | | 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, |