You've already forked FrameTour-BE
设备支持自定义标定区域
This commit is contained in:
@ -61,4 +61,5 @@ public class DeviceConfigEntity {
|
|||||||
private Integer imageFree;
|
private Integer imageFree;
|
||||||
private Integer videoFree;
|
private Integer videoFree;
|
||||||
private Long pairDevice;
|
private Long pairDevice;
|
||||||
|
private String videoCrop;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import com.ycwl.basic.utils.SnowFlakeUtil;
|
|||||||
import com.ycwl.basic.utils.VideoReUploader;
|
import com.ycwl.basic.utils.VideoReUploader;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
@ -288,6 +289,9 @@ public class VideoPieceGetter {
|
|||||||
sourceEntity.setUrl(imgSource.getUrl());
|
sourceEntity.setUrl(imgSource.getUrl());
|
||||||
sourceEntity.setPosJson(imgSource.getPosJson());
|
sourceEntity.setPosJson(imgSource.getPosJson());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(config.getVideoCrop())) {
|
||||||
|
sourceEntity.setPosJson(config.getVideoCrop());
|
||||||
|
}
|
||||||
sourceEntity.setVideoUrl(url);
|
sourceEntity.setVideoUrl(url);
|
||||||
sourceEntity.setFaceSampleId(faceSampleId);
|
sourceEntity.setFaceSampleId(faceSampleId);
|
||||||
sourceEntity.setScenicId(device.getScenicId());
|
sourceEntity.setScenicId(device.getScenicId());
|
||||||
@ -314,6 +318,9 @@ public class VideoPieceGetter {
|
|||||||
videoReUploader.addTask(sourceEntity.getId());
|
videoReUploader.addTask(sourceEntity.getId());
|
||||||
} else {
|
} else {
|
||||||
source.setVideoUrl(url);
|
source.setVideoUrl(url);
|
||||||
|
if (StringUtils.isNotBlank(config.getVideoCrop())) {
|
||||||
|
source.setPosJson(config.getVideoCrop());
|
||||||
|
}
|
||||||
sourceMapper.update(source);
|
sourceMapper.update(source);
|
||||||
videoReUploader.addTask(source.getId());
|
videoReUploader.addTask(source.getId());
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,8 @@
|
|||||||
enable_pre_book = #{enablePreBook},
|
enable_pre_book = #{enablePreBook},
|
||||||
image_free = #{imageFree},
|
image_free = #{imageFree},
|
||||||
video_free = #{videoFree},
|
video_free = #{videoFree},
|
||||||
pair_device = #{pairDevice}
|
pair_device = #{pairDevice},
|
||||||
|
video_crop = #{videoCrop}
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateEntity">
|
<update id="updateEntity">
|
||||||
|
Reference in New Issue
Block a user