上报图片直接进行裁切

This commit is contained in:
2025-07-17 17:59:14 +08:00
parent 78079b242a
commit 1ca7182979
5 changed files with 97 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
package com.ycwl.basic.model.pc.device.entity;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -62,4 +63,13 @@ public class DeviceConfigEntity {
private Integer videoFree;
private Long pairDevice;
private String videoCrop;
private String cropConfig;
public void setCropConfig(DeviceCropConfig cropConfig) {
this.cropConfig = JSON.toJSONString(cropConfig);
}
public DeviceCropConfig getCropConfig() {
return JSON.parseObject(cropConfig, DeviceCropConfig.class);
}
}

View File

@@ -0,0 +1,13 @@
package com.ycwl.basic.model.pc.device.entity;
import lombok.Data;
@Data
public class DeviceCropConfig {
// 截图类型 0:无截图 1:固定截图 2:按人脸位置截图
private Integer cropType;
private Integer targetWidth;
private Integer targetHeight;
private Integer targetX;
private Integer targetY;
}