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