From d5769136a6e78b1a825fa390fb2c8b710b1e064b Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期五, 29 三月 2024 09:57:00 +0800 Subject: [PATCH] 调整日志打印 --- repository/captureRepo.go | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 deletions(-) diff --git a/repository/captureRepo.go b/repository/captureRepo.go index 027172f..76a963d 100644 --- a/repository/captureRepo.go +++ b/repository/captureRepo.go @@ -70,7 +70,7 @@ var device models.Device if err := device.FindById(deviceId); err != nil { - logger.Debug("Can't find device in database, device:%s, %s", deviceId, err.Error()) + logger.Warn("Can't find device in database, device:%s, %s", deviceId, err.Error()) return pd } @@ -83,20 +83,16 @@ pd.PicMaxImages = append(pd.PicMaxImages, imageBytes) tr := vo.TaskResultInfo{ - Id: uuid.NewV4().String(), - CameraId: deviceId, - OrgName: "", - CameraAddr: device.Addr + device.Pos, - CameraName: device.Name, - PicMaxUrl: []string{""}, - PicDate: time.Now().Format("2006-01-02 15:04:05"), - LikeDate: time.Now().Format("2006-01-02 15:04:05"), - TaskId: "", - AnalyServerId: deviceId, - AnalyServerName: "", - AnalyServerIp: "", - DataSource: "camera", - TargetInfo: []vo.TargetInfo{{TargetId: faceId}}, + Id: uuid.NewV4().String(), + CameraId: deviceId, + CameraAddr: device.Addr + device.Pos, + CameraName: device.Name, + PicMaxUrl: []string{""}, + PicDate: time.Now().Format("2006-01-02 15:04:05"), + LikeDate: time.Now().Format("2006-01-02 15:04:05"), + AnalyServerId: deviceId, + DataSource: "camera", + TargetInfo: []vo.TargetInfo{{TargetId: faceId}}, } pd.SourceData = vo.ESInfo{ -- Gitblit v1.8.0