mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 01:15:54 +08:00
+f;新增授权码功能
1、产品表添加 is_authorize 是否启用授权码字段; 2、产品授权码功能:基础增删改查、批量生成授权码、绑定设备。
This commit is contained in:
@@ -42,6 +42,10 @@ public class Product extends BaseEntity
|
||||
@Excel(name = "是否系统通用", readConverterExp = "0=-否,1-是")
|
||||
private Integer isSys;
|
||||
|
||||
/** 是否启用授权码(0-否,1-是) */
|
||||
@Excel(name = "是否启用授权码", readConverterExp = "0=-否,1-是")
|
||||
private Integer isAuthorize;
|
||||
|
||||
/** mqtt账号 */
|
||||
private String mqttAccount;
|
||||
|
||||
@@ -164,6 +168,9 @@ public class Product extends BaseEntity
|
||||
return isSys;
|
||||
}
|
||||
|
||||
public void setIsAuthorize(Integer isAuthorize) {this.isAuthorize = isAuthorize;}
|
||||
public Integer getIsAuthorize() {return isAuthorize;}
|
||||
|
||||
public void setMqttAccount(String mqttAccount)
|
||||
{
|
||||
this.mqttAccount = mqttAccount;
|
||||
@@ -238,6 +245,7 @@ public class Product extends BaseEntity
|
||||
.append("tenantId", getTenantId())
|
||||
.append("tenantName", getTenantName())
|
||||
.append("isSys", getIsSys())
|
||||
.append("isAuthorize", getIsAuthorize())
|
||||
.append("status", getStatus())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("networkMethod", getNetworkMethod())
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.ruoyi.iot.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 产品授权码对象 iot_product_authorize
|
||||
*
|
||||
* @author kami
|
||||
* @date 2022-04-11
|
||||
*/
|
||||
public class ProductAuthorize extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 授权码ID */
|
||||
private Long authorizeId;
|
||||
|
||||
/** 授权码 */
|
||||
@Excel(name = "授权码")
|
||||
private String authorizeCode;
|
||||
|
||||
/** 产品ID */
|
||||
@Excel(name = "产品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long deviceId;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String serialNumber;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 用户名称 */
|
||||
@Excel(name = "用户名称")
|
||||
private String userName;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public ProductAuthorize() {
|
||||
}
|
||||
|
||||
public ProductAuthorize(String authorizeCode, Long productId, Long deviceId, String serialNumber, Long userId, String userName) {
|
||||
this.authorizeCode = authorizeCode;
|
||||
this.productId = productId;
|
||||
this.deviceId = deviceId;
|
||||
this.serialNumber = serialNumber;
|
||||
this.userId = userId;
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public void setAuthorizeId(Long authorizeId)
|
||||
{
|
||||
this.authorizeId = authorizeId;
|
||||
}
|
||||
|
||||
public Long getAuthorizeId()
|
||||
{
|
||||
return authorizeId;
|
||||
}
|
||||
public void setAuthorizeCode(String authorizeCode)
|
||||
{
|
||||
this.authorizeCode = authorizeCode;
|
||||
}
|
||||
|
||||
public String getAuthorizeCode()
|
||||
{
|
||||
return authorizeCode;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setDeviceId(Long deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Long getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
public void setSerialNumber(String serialNumber)
|
||||
{
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public String getSerialNumber()
|
||||
{
|
||||
return serialNumber;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("authorizeId", getAuthorizeId())
|
||||
.append("authorizeCode", getAuthorizeCode())
|
||||
.append("productId", getProductId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("serialNumber", getSerialNumber())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user