v10:优化

This commit is contained in:
gaoben 2024-08-13 09:40:22 +08:00
parent c5f2ab160b
commit 88273e1a3d
4 changed files with 8753 additions and 22 deletions

8674
cell_db_v10_xy.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@ -256,7 +256,7 @@ public class TenPersonServiceImpl implements TenPersonService {
String tempIdBackImage = entity.getIdBackImage(); String tempIdBackImage = entity.getIdBackImage();
if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) { if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) {
String orgImageFileName = userFileUrl + "o_" + UUIDUtil.uuid() + ".jpg"; 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(); //MinioClient minioClient = MinioUtil.getMinioClient();
try { try {
// 调用statObject()来判断对象是否存在 // 调用statObject()来判断对象是否存在
@ -346,15 +346,15 @@ public class TenPersonServiceImpl implements TenPersonService {
// null, // null,
// null); // null);
// } // }
minioClient.copyObject( // minioClient.copyObject(
minioConfig.getBucketName(), // minioConfig.getBucketName(),
faceImageFileName, // faceImageFileName,
null, // null,
null, // null,
minioConfig.getBucketName(), // minioConfig.getBucketName(),
tempOrgImageFile, // tempOrgImageFile,
null, // null,
null); // null);
//拷贝临时文件正式文件 //拷贝临时文件正式文件
minioClient.copyObject( minioClient.copyObject(
minioConfig.getBucketName(), minioConfig.getBucketName(),
@ -367,7 +367,8 @@ public class TenPersonServiceImpl implements TenPersonService {
null); null);
entity.setOrgImage(orgImageFileName); entity.setOrgImage(orgImageFileName);
entity.setFaceImage(faceImageFileName); entity.setFaceImage(orgImageFileName);
// entity.setFaceImage(faceImageFileName);
//删除临时文件oss //删除临时文件oss
minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile); minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile);
//删除本地临时文件 //删除本地临时文件
@ -1011,7 +1012,7 @@ public class TenPersonServiceImpl implements TenPersonService {
if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) { if (tempOrgImageFile != null && !tempOrgImageFile.isEmpty()) {
String orgImageFileName = userFileUrl + "o_" + UUIDUtil.uuid() + ".jpg"; 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(); //MinioClient minioClient = MinioUtil.getMinioClient();
try { try {
// 调用statObject()来判断对象是否存在 // 调用statObject()来判断对象是否存在
@ -1104,15 +1105,15 @@ public class TenPersonServiceImpl implements TenPersonService {
// null, // null,
// null); // null);
// } // }
minioClient.copyObject( // minioClient.copyObject(
minioConfig.getBucketName(), // minioConfig.getBucketName(),
faceImageFileName, // faceImageFileName,
null, // null,
null, // null,
minioConfig.getBucketName(), // minioConfig.getBucketName(),
tempOrgImageFile, // tempOrgImageFile,
null, // null,
null); // null);
//拷贝临时文件正式文件 //拷贝临时文件正式文件
minioClient.copyObject( minioClient.copyObject(
minioConfig.getBucketName(), minioConfig.getBucketName(),
@ -1125,7 +1126,8 @@ public class TenPersonServiceImpl implements TenPersonService {
null); null);
entity.setOrgImage(orgImageFileName); entity.setOrgImage(orgImageFileName);
entity.setFaceImage(faceImageFileName); entity.setFaceImage(orgImageFileName);
// entity.setFaceImage(faceImageFileName);
//删除临时文件oss //删除临时文件oss
minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile); minioClient.removeObject(minioConfig.getBucketName(), tempOrgImageFile);
//删除本地临时文件 //删除本地临时文件

View File

@ -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("文件复制成功");
}
}

View File

@ -126,4 +126,5 @@ CREATE TABLE `sys_device_log` (
------------------------v10.0 服务器SDK版本----------------- ------------------------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协议设备注册接口允许照片和压缩包为空 蓝本cell-v9-check-face, http协议设备注册接口允许照片和压缩包为空