|
@@ -5,7 +5,6 @@ import cn.reghao.jutil.jdk.serializer.JsonConverter;
|
|
|
import cn.reghao.jutil.tool.http.DefaultWebRequest;
|
|
import cn.reghao.jutil.tool.http.DefaultWebRequest;
|
|
|
import cn.reghao.oss.api.dto.ObjectMeta;
|
|
import cn.reghao.oss.api.dto.ObjectMeta;
|
|
|
import cn.reghao.oss.store.db.mapper.FileMetaMapper;
|
|
import cn.reghao.oss.store.db.mapper.FileMetaMapper;
|
|
|
-import cn.reghao.tnb.content.api.dto.geo.MallReplyPhotoDto;
|
|
|
|
|
import com.drew.imaging.ImageMetadataReader;
|
|
import com.drew.imaging.ImageMetadataReader;
|
|
|
import com.drew.lang.GeoLocation;
|
|
import com.drew.lang.GeoLocation;
|
|
|
import com.drew.metadata.Metadata;
|
|
import com.drew.metadata.Metadata;
|
|
@@ -37,10 +36,10 @@ public class FileProcessor {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void process() {
|
|
public void process() {
|
|
|
- start();
|
|
|
|
|
|
|
+ //start();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void start() {
|
|
|
|
|
|
|
+ /*private void start() {
|
|
|
int pageSize = 10000;
|
|
int pageSize = 10000;
|
|
|
int nextId = 0;
|
|
int nextId = 0;
|
|
|
String prefix = "image/p/%";
|
|
String prefix = "image/p/%";
|
|
@@ -74,13 +73,13 @@ public class FileProcessor {
|
|
|
MallReplyPhotoDto mallReplyPhotoDto = new MallReplyPhotoDto("1", objectId, 105, photoUrl);
|
|
MallReplyPhotoDto mallReplyPhotoDto = new MallReplyPhotoDto("1", objectId, 105, photoUrl);
|
|
|
try {
|
|
try {
|
|
|
Metadata metadata = ImageMetadataReader.readMetadata(file);
|
|
Metadata metadata = ImageMetadataReader.readMetadata(file);
|
|
|
- /*for (Directory directory : metadata.getDirectories()) {
|
|
|
|
|
|
|
+ *//*for (Directory directory : metadata.getDirectories()) {
|
|
|
for (Tag tag : directory.getTags()) {
|
|
for (Tag tag : directory.getTags()) {
|
|
|
String tagName = tag.getTagName();
|
|
String tagName = tag.getTagName();
|
|
|
String desc = tag.getDescription();
|
|
String desc = tag.getDescription();
|
|
|
System.out.printf("%s -> %s\n", tagName, desc);
|
|
System.out.printf("%s -> %s\n", tagName, desc);
|
|
|
}
|
|
}
|
|
|
- }*/
|
|
|
|
|
|
|
+ }*//*
|
|
|
|
|
|
|
|
Collection<ExifIFD0Directory> exifDirectories = metadata.getDirectoriesOfType(ExifIFD0Directory.class);
|
|
Collection<ExifIFD0Directory> exifDirectories = metadata.getDirectoriesOfType(ExifIFD0Directory.class);
|
|
|
for (ExifIFD0Directory exif : exifDirectories) {
|
|
for (ExifIFD0Directory exif : exifDirectories) {
|
|
@@ -122,5 +121,5 @@ public class FileProcessor {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return mallReplyPhotoDto;
|
|
return mallReplyPhotoDto;
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
}
|
|
}
|