reghao преди 1 седмица
родител
ревизия
709076252a

+ 7 - 1
content/content-api/src/main/java/cn/reghao/tnb/content/api/dto/CamPhoto.java

@@ -5,6 +5,7 @@ import lombok.NoArgsConstructor;
 import lombok.Setter;
 
 import java.io.Serializable;
+import java.time.LocalDateTime;
 
 /**
  * @author reghao
@@ -22,7 +23,7 @@ public class CamPhoto implements Serializable {
     private String manufacturer;
     private String model;
     private String software;
-    private String shotAt;
+    private LocalDateTime shotAt;
     private Double longitude;
     private Double latitude;
 
@@ -30,5 +31,10 @@ public class CamPhoto implements Serializable {
         this.photoUrl = photoUrl;
         this.channelCode = 0;
         this.objectId = "";
+        this.manufacturer = "";
+        this.model = "";
+        this.software = "";
+        this.longitude = 0.0;
+        this.latitude = 0.0;
     }
 }

+ 2 - 5
content/content-service/src/main/java/cn/reghao/tnb/content/app/geo/service/PhotoMapService.java

@@ -62,11 +62,8 @@ public class PhotoMapService {
                 .map(camPhoto -> {
                     CameraPhoto cameraPhoto = new CameraPhoto(replyId, camPhoto);
                     try {
-                        String shotAtStr = camPhoto.getShotAt();
-                        if (shotAtStr != null) {
-                            LocalDateTime shotAt = DateTimeConverter.localDateTime2(camPhoto.getShotAt());
-                            cameraPhoto.setShotAt(shotAt);
-                        }
+                        LocalDateTime shotAt = camPhoto.getShotAt();
+                        cameraPhoto.setShotAt(shotAt);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }