v10:优化
This commit is contained in:
parent
c5f2ab160b
commit
88273e1a3d
File diff suppressed because it is too large
Load Diff
|
@ -256,7 +256,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
String tempIdBackImage = entity.getIdBackImage();
|
||||
if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) {
|
||||
String orgImageFileName = userFileUrl + "o_" + UUIDUtil.uuid() + ".jpg";
|
||||
String faceImageFileName = userFileUrl + "s_" + UUIDUtil.uuid() + ".jpg";
|
||||
// String faceImageFileName = userFileUrl + "s_" + UUIDUtil.uuid() + ".jpg";
|
||||
//MinioClient minioClient = MinioUtil.getMinioClient();
|
||||
try {
|
||||
// 调用statObject()来判断对象是否存在。
|
||||
|
@ -346,15 +346,15 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
// null,
|
||||
// null);
|
||||
// }
|
||||
minioClient.copyObject(
|
||||
minioConfig.getBucketName(),
|
||||
faceImageFileName,
|
||||
null,
|
||||
null,
|
||||
minioConfig.getBucketName(),
|
||||
tempOrgImageFile,
|
||||
null,
|
||||
null);
|
||||
// minioClient.copyObject(
|
||||
// minioConfig.getBucketName(),
|
||||
// faceImageFileName,
|
||||
// null,
|
||||
// null,
|
||||
// minioConfig.getBucketName(),
|
||||
// tempOrgImageFile,
|
||||
// null,
|
||||
// null);
|
||||
//拷贝临时文件正式文件
|
||||
minioClient.copyObject(
|
||||
minioConfig.getBucketName(),
|
||||
|
@ -367,7 +367,8 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
null);
|
||||
|
||||
entity.setOrgImage(orgImageFileName);
|
||||
entity.setFaceImage(faceImageFileName);
|
||||
entity.setFaceImage(orgImageFileName);
|
||||
// entity.setFaceImage(faceImageFileName);
|
||||
//删除临时文件oss
|
||||
minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile);
|
||||
//删除本地临时文件
|
||||
|
@ -1011,7 +1012,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
|
||||
if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) {
|
||||
String orgImageFileName = userFileUrl + "o_" + UUIDUtil.uuid() + ".jpg";
|
||||
String faceImageFileName = userFileUrl + "s_" + UUIDUtil.uuid() + ".jpg";
|
||||
// String faceImageFileName = userFileUrl + "s_" + UUIDUtil.uuid() + ".jpg";
|
||||
//MinioClient minioClient = MinioUtil.getMinioClient();
|
||||
try {
|
||||
// 调用statObject()来判断对象是否存在。
|
||||
|
@ -1104,15 +1105,15 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
// null,
|
||||
// null);
|
||||
// }
|
||||
minioClient.copyObject(
|
||||
minioConfig.getBucketName(),
|
||||
faceImageFileName,
|
||||
null,
|
||||
null,
|
||||
minioConfig.getBucketName(),
|
||||
tempOrgImageFile,
|
||||
null,
|
||||
null);
|
||||
// minioClient.copyObject(
|
||||
// minioConfig.getBucketName(),
|
||||
// faceImageFileName,
|
||||
// null,
|
||||
// null,
|
||||
// minioConfig.getBucketName(),
|
||||
// tempOrgImageFile,
|
||||
// null,
|
||||
// null);
|
||||
//拷贝临时文件正式文件
|
||||
minioClient.copyObject(
|
||||
minioConfig.getBucketName(),
|
||||
|
@ -1125,7 +1126,8 @@ public class TenPersonServiceImpl implements TenPersonService {
|
|||
null);
|
||||
|
||||
entity.setOrgImage(orgImageFileName);
|
||||
entity.setFaceImage(faceImageFileName);
|
||||
entity.setFaceImage(orgImageFileName);
|
||||
// entity.setFaceImage(faceImageFileName);
|
||||
//删除临时文件oss
|
||||
minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile);
|
||||
//删除本地临时文件
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
package gb;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class CopyFile {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// long indexEnd = 352456199302120000l;
|
||||
// for(long index = 352456199302110000l; index<indexEnd; index++){
|
||||
// String src="E:\\公司\\咸阳师范\\test\\352456199302100001.jpg";//否则可能会报拒绝访问或者无权限
|
||||
// String target="E:\\公司\\咸阳师范\\test\\"+(index+1)+".jpg";
|
||||
// copyFile(src,target);
|
||||
// System.out.println(index);
|
||||
// }
|
||||
|
||||
//-----------------------------------------------------------
|
||||
String baseDir = "E:\\公司\\3d数据测试\\新建文件夹";
|
||||
|
||||
File faceDir = new File(baseDir);
|
||||
File[] iamges = faceDir.listFiles();
|
||||
for(File file: iamges){
|
||||
String fileName = file.getName();
|
||||
System.out.println("batch0722/"+fileName);
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
}
|
||||
|
||||
public static void copyFile(String src,String target)
|
||||
{
|
||||
//首先需要确定两个源
|
||||
File srcFile = new File(src);
|
||||
File targetFile = new File(target);
|
||||
try {
|
||||
//选择两个流
|
||||
InputStream in = new FileInputStream(srcFile);
|
||||
OutputStream out = new FileOutputStream(targetFile);
|
||||
//操作流
|
||||
byte[] bytes = new byte[1024];
|
||||
int len = -1;
|
||||
while((len=in.read(bytes))!=-1)
|
||||
{
|
||||
out.write(bytes, 0, len);
|
||||
}
|
||||
//关闭流
|
||||
in.close();
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// System.out.println("文件复制成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -126,4 +126,5 @@ CREATE TABLE `sys_device_log` (
|
|||
|
||||
|
||||
------------------------v10.0 服务器SDK版本-----------------
|
||||
mvn install:install-file "-DgroupId=com.arcsoft.face" "-DartifactId=arcsoft-sdk-face" "-Dversion=4.1.1.0" "-Dpackaging=jar" "-Dfile=libs/arcsoft-sdk-face-4.1.1.0.jar"
|
||||
蓝本:cell-v9-check-face, http协议设备注册接口允许照片和压缩包为空
|
||||
|
|
Loading…
Reference in New Issue