装置模板表新增字段

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

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

View File

@@ -40,4 +40,11 @@ public class CsDevModelRelationPO extends BaseEntity {
@TableField(value = "status")
@ApiModelProperty(value="状态(0删除 1正常)")
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);
if(csDevModelRelationVOS.size ()>0){
throw new BusinessException (AlgorithmResponseEnum.DATA_ERROR);
}
CsDevModelRelationPO csDevModelRelationPO = new CsDevModelRelationPO();
BeanUtils.copyProperties (addParm, csDevModelRelationPO);

View File

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