装置模板表新增字段

This commit is contained in:
2023-08-07 20:08:59 +08:00
parent e4116eaff0
commit 4f954e9469
4 changed files with 10 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ public class CsDevModelRelationAddParm {
@ApiModelProperty(value="模板 id") @ApiModelProperty(value="模板 id")
@NotNull(message="模板 id不能为空") @NotNull(message="模板 id不能为空")
private String modelId; private String modelId;
@ApiModelProperty(value="逻辑设备id")
private Integer did;
} }

View File

@@ -40,4 +40,11 @@ public class CsDevModelRelationPO extends BaseEntity {
@TableField(value = "status") @TableField(value = "status")
@ApiModelProperty(value="状态(0删除 1正常)") @ApiModelProperty(value="状态(0删除 1正常)")
private String status; private String status;
/**
* 逻辑设备id
*/
@TableField(value = "did")
@ApiModelProperty(value="逻辑设备id")
private Integer did;
} }

View File

@@ -41,7 +41,6 @@ public class CsDevModelRelationServiceImpl extends ServiceImpl<CsDevModelRelatio
List<CsDevModelRelationVO> csDevModelRelationVOS = this.queryDevModelRelation (queryParm); List<CsDevModelRelationVO> csDevModelRelationVOS = this.queryDevModelRelation (queryParm);
if(csDevModelRelationVOS.size ()>0){ if(csDevModelRelationVOS.size ()>0){
throw new BusinessException (AlgorithmResponseEnum.DATA_ERROR); throw new BusinessException (AlgorithmResponseEnum.DATA_ERROR);
} }
CsDevModelRelationPO csDevModelRelationPO = new CsDevModelRelationPO(); CsDevModelRelationPO csDevModelRelationPO = new CsDevModelRelationPO();
BeanUtils.copyProperties (addParm, csDevModelRelationPO); BeanUtils.copyProperties (addParm, csDevModelRelationPO);

View File

@@ -30,7 +30,7 @@ public class MqttUserServiceImpl extends ServiceImpl<MqttUserMapper, MqttUser> i
mqttUser.setUsername(password); mqttUser.setUsername(password);
mqttUser.setSalt("mqtt"); mqttUser.setSalt("mqtt");
mqttUser.setIsSuperuser(1); mqttUser.setIsSuperuser(1);
mqttUser.setPassword(DigestUtil.sha256Hex(password + "mqtt")); mqttUser.setPassword(DigestUtil.sha256Hex(password + mqttUser.getSalt()));
this.save(mqttUser); this.save(mqttUser);
} }
} }