entityId重入一致性
This commit is contained in:
parent
59978b6be5
commit
f17e2364b6
@ -372,18 +372,13 @@ public class TaskFaceServiceImpl implements TaskFaceService {
|
|||||||
|
|
||||||
|
|
||||||
private static final String DATE_FORMAT="yyyyMMddHHmmss";
|
private static final String DATE_FORMAT="yyyyMMddHHmmss";
|
||||||
|
private static final SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);;
|
||||||
|
|
||||||
public static String generateEntityId(FaceSampleEntity entity) {
|
public static String generateEntityId(FaceSampleEntity entity) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
|
return entity.getId().toString() + "_" + sdf.format(entity.getCreateAt());
|
||||||
Random random = new Random();
|
|
||||||
int randomNumber = random.nextInt(900) + 100;
|
|
||||||
return entity.getDeviceId().toString() + "_" + sdf.format(entity.getCreateAt()) + randomNumber;
|
|
||||||
}
|
}
|
||||||
public static String generateEntityId(FaceSampleRespVO entity) {
|
public static String generateEntityId(FaceSampleRespVO entity) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
|
return entity.getId().toString() + "_" + sdf.format(entity.getCreateAt());
|
||||||
Random random = new Random();
|
|
||||||
int randomNumber = random.nextInt(900) + 100;
|
|
||||||
return entity.getDeviceId().toString() + "_" + sdf.format(entity.getCreateAt()) + randomNumber;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFaceUrl(Long faceId) {
|
public String getFaceUrl(Long faceId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user