1.修复bug
2.设备更新时间作为最后在线时间
This commit is contained in:
gaoben 2021-05-13 09:51:56 +08:00
parent 9a77ef6e77
commit 997f024cdb
4 changed files with 25 additions and 24 deletions

View File

@ -595,9 +595,9 @@ public class XaImageTask implements ITask {
String enJson = XaUtils.encryptStr(json.trim(), appSecret);
List<XaTCCTCSBZPXX> syncRecordsUpdates = jsonData.getDatas();
for(XaTCCTCSBZPXX xx: syncRecordsUpdates){
xx.setLV_ZPZP("");
List<XaRYRKPHOTO> syncRecordsUpdates = jsonData.getDatas();
for(XaRYRKPHOTO xx: syncRecordsUpdates){
xx.setLV_ZP("");
}

View File

@ -385,6 +385,7 @@ public class DeviceApiServiceImpl implements DeviceApiService {
//保存人脸个数
deviceEntity.setFaceCount(faceCount);
deviceEntity.setLastUpdateTime(new Date());
tenDeviceService.evictupdateById(deviceEntity);
TenCellEntity cellEntity = tenCellService.getById(deviceEntity.getCellId());

View File

@ -108,26 +108,26 @@ public class VideoOpenApi {
}
}
if(backgroundPicture!=null && !backgroundPicture.isEmpty()){
try {
byte[] b = Base64.getDecoder().decode(backgroundPicture.replace("\n", ""));
InputStream inputStream = new ByteArrayInputStream(b);
String userFileUrl = "video/" +
recordEntity.getCellId().toString() + "/" +
DateUtils.format(new Date(),DateUtils.DATE_YEAR_MONTH) + "/";
String fileName = userFileUrl + UUIDUtil.uuid() + ".jpg";
// String fileName = "t_"+UUIDUtil.uuid()+ "." +extension;
PutObjectOptions putObjectOptions = new PutObjectOptions(b.length, -1);
putObjectOptions.setContentType("image/jpeg");
minioClient.putObject(
minioConfig.getBucketName(), fileName, inputStream, putObjectOptions);
inputStream.close();
recordEntity.setBackgroudPicture(fileName);
} catch (Exception e) {
e.printStackTrace();
}
}
// if(backgroundPicture!=null && !backgroundPicture.isEmpty()){
// try {
// byte[] b = Base64.getDecoder().decode(backgroundPicture.replace("\n", ""));
// InputStream inputStream = new ByteArrayInputStream(b);
// String userFileUrl = "video/" +
// recordEntity.getCellId().toString() + "/" +
// DateUtils.format(new Date(),DateUtils.DATE_YEAR_MONTH) + "/";
// String fileName = userFileUrl + UUIDUtil.uuid() + ".jpg";
//// String fileName = "t_"+UUIDUtil.uuid()+ "." +extension;
// PutObjectOptions putObjectOptions = new PutObjectOptions(b.length, -1);
// putObjectOptions.setContentType("image/jpeg");
// minioClient.putObject(
// minioConfig.getBucketName(), fileName, inputStream, putObjectOptions);
// inputStream.close();
// recordEntity.setBackgroudPicture(fileName);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
tenVideoRecordService.save(recordEntity);
}

View File

@ -17,7 +17,7 @@ public class XaTCCTCSBZPXXEXIT {
@JSONField(name="LV_ZPSJ")
private String LV_ZPSJ;
@JSONField(name="LV_JKBM")
@JSONField(name="LV_CKBM")
private String LV_CKBM;