Commit 7949c25800ab092b363f09481dc8443203f11c61

Authored by xp.Huang
2 parents c3b95976 bdb73294

Merge branch '20220512' into 'master'

fix: 组态节点保存数据交互问题修复

See merge request huang/thingsboard3.3.2!99
@@ -135,8 +135,12 @@ public class YtUserController extends AbstractUserAccount { @@ -135,8 +135,12 @@ public class YtUserController extends AbstractUserAccount {
135 135
136 @PutMapping("/center") 136 @PutMapping("/center")
137 @ApiOperation(value = "修改个人中心") 137 @ApiOperation(value = "修改个人中心")
138 - public UserDTO updatePersonalCenter(@Validated(UpdateGroup.class) @RequestBody UserDTO userDTO) {  
139 - return userService.updatePersonalCenter(userDTO); 138 + public UserInfoDTO updatePersonalCenter(@Validated(UpdateGroup.class) @RequestBody UserDTO userDTO) throws ThingsboardException {
  139 + userService.updatePersonalCenter(userDTO);
  140 + return userService.me(
  141 + getCurrentUser().getCurrentUserId(),
  142 + getCurrentUser().getCurrentTenantId(),
  143 + getCurrentUser().getRoles());
140 } 144 }
141 145
142 @PostMapping 146 @PostMapping
@@ -32,9 +32,6 @@ public class ConfigurationActDTO extends TenantDTO { @@ -32,9 +32,6 @@ public class ConfigurationActDTO extends TenantDTO {
32 private String contentId; 32 private String contentId;
33 33
34 @ApiModelProperty(value = "动画类型", required = true) 34 @ApiModelProperty(value = "动画类型", required = true)
35 - @NotEmpty(  
36 - message = "tbDeviceId不能未空或空字符串",  
37 - groups = {UpdateGroup.class, AddGroup.class})  
38 private ActTypeEnum type; 35 private ActTypeEnum type;
39 @ApiModelProperty(value = "orgId", required = true) 36 @ApiModelProperty(value = "orgId", required = true)
40 @NotEmpty( 37 @NotEmpty(
@@ -52,7 +49,7 @@ public class ConfigurationActDTO extends TenantDTO { @@ -52,7 +49,7 @@ public class ConfigurationActDTO extends TenantDTO {
52 @ApiModelProperty(value = "组件关注的指标") 49 @ApiModelProperty(value = "组件关注的指标")
53 private String attr; 50 private String attr;
54 @ApiModelProperty(value = "触发条件") 51 @ApiModelProperty(value = "触发条件")
55 - private JsonNode content; 52 + private JsonNode condition;
56 53
57 @ApiModelProperty(value = "组态描述") 54 @ApiModelProperty(value = "组态描述")
58 private String remark; 55 private String remark;
@@ -30,9 +30,6 @@ public class ConfigurationEventDTO extends TenantDTO { @@ -30,9 +30,6 @@ public class ConfigurationEventDTO extends TenantDTO {
30 private String contentId; 30 private String contentId;
31 31
32 @ApiModelProperty(value = "事件类型", required = true) 32 @ApiModelProperty(value = "事件类型", required = true)
33 - @NotEmpty(  
34 - message = "tbDeviceId不能未空或空字符串",  
35 - groups = {UpdateGroup.class, AddGroup.class})  
36 private EventTypeEnum type; 33 private EventTypeEnum type;
37 34
38 @ApiModelProperty(value = "事件内容") 35 @ApiModelProperty(value = "事件内容")
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.enums.ActTypeEnum; @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.enums.ActTypeEnum;
14 * @author Administrator 14 * @author Administrator
15 */ 15 */
16 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
17 -@TableName(ModelConstants.Table.IOTFS_CONFIGURATION_ACT) 17 +@TableName(value = ModelConstants.Table.IOTFS_CONFIGURATION_ACT, autoResultMap = true)
18 @Data 18 @Data
19 public class ConfigurationAct extends TenantBaseEntity { 19 public class ConfigurationAct extends TenantBaseEntity {
20 private static final long serialVersionUID = -4125982858197381343L; 20 private static final long serialVersionUID = -4125982858197381343L;
@@ -28,5 +28,5 @@ public class ConfigurationAct extends TenantBaseEntity { @@ -28,5 +28,5 @@ public class ConfigurationAct extends TenantBaseEntity {
28 private String slaveDeviceId; 28 private String slaveDeviceId;
29 private String attr; 29 private String attr;
30 @TableField(typeHandler = JacksonTypeHandler.class) 30 @TableField(typeHandler = JacksonTypeHandler.class)
31 - private JsonNode content; 31 + private JsonNode condition;
32 } 32 }
@@ -15,7 +15,7 @@ import java.util.List; @@ -15,7 +15,7 @@ import java.util.List;
15 * @author Administrator 15 * @author Administrator
16 */ 16 */
17 @EqualsAndHashCode(callSuper = true) 17 @EqualsAndHashCode(callSuper = true)
18 -@TableName(ModelConstants.Table.IOTFS_CONFIGURATION_DATASOURCE) 18 +@TableName(value = ModelConstants.Table.IOTFS_CONFIGURATION_DATASOURCE, autoResultMap = true)
19 @Data 19 @Data
20 public class ConfigurationDatasource extends TenantBaseEntity { 20 public class ConfigurationDatasource extends TenantBaseEntity {
21 private static final long serialVersionUID = 2830393872646826226L; 21 private static final long serialVersionUID = 2830393872646826226L;
@@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.enums.EventTypeEnum; @@ -14,7 +14,7 @@ import org.thingsboard.server.common.data.yunteng.enums.EventTypeEnum;
14 * @author Administrator 14 * @author Administrator
15 */ 15 */
16 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
17 -@TableName(ModelConstants.Table.IOTFS_CONFIGURATION_EVENT) 17 +@TableName(value = ModelConstants.Table.IOTFS_CONFIGURATION_EVENT, autoResultMap = true)
18 @Data 18 @Data
19 public class ConfigurationEvent extends TenantBaseEntity { 19 public class ConfigurationEvent extends TenantBaseEntity {
20 private static final long serialVersionUID = 4613503997176066996L; 20 private static final long serialVersionUID = 4613503997176066996L;