Commit 209132ff9a1c8ef6e443599e242aa28ab67613fb
1 parent
6c095b29
feat: add device script column saveOriginalData
Showing
2 changed files
with
7 additions
and
1 deletions
... | ... | @@ -39,5 +39,9 @@ public class TkDeviceScriptDTO extends BaseDTO { |
39 | 39 | @ApiModelProperty(value = "脚本编数据编码类型:HEX ASCII") |
40 | 40 | private TcpDataTypeEnum dataType; |
41 | 41 | |
42 | + @ApiModelProperty(value = "保存原始数据:默认false") | |
43 | + @NotNull(message = "保存原始数据不能为空",groups = {AddGroup.class}) | |
44 | + private boolean saveOriginalData; | |
45 | + | |
42 | 46 | public TkDeviceScriptDTO() {} |
43 | 47 | } | ... | ... |
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; |
4 | 4 | import com.baomidou.mybatisplus.annotation.TableName; |
5 | 5 | import lombok.Data; |
6 | 6 | import lombok.EqualsAndHashCode; |
7 | +import org.apache.ibatis.type.BooleanTypeHandler; | |
7 | 8 | import org.apache.ibatis.type.EnumTypeHandler; |
8 | 9 | import org.thingsboard.server.common.data.yunteng.constant.ModelConstants; |
9 | 10 | import org.thingsboard.server.common.data.yunteng.enums.TcpDataTypeEnum; |
... | ... | @@ -18,7 +19,8 @@ public class TkDeviceScriptEntity extends TenantBaseEntity { |
18 | 19 | private Integer status; |
19 | 20 | |
20 | 21 | private String description; |
21 | - | |
22 | + @TableField(typeHandler = BooleanTypeHandler.class) | |
23 | + private boolean saveOriginalData; | |
22 | 24 | /** 脚本编数据编码类型 */ |
23 | 25 | @TableField(typeHandler = EnumTypeHandler.class) |
24 | 26 | private TcpDataTypeEnum dataType; | ... | ... |