Browse Source
Merge pull request 'master' (#5) from master into V3
Merge pull request 'master' (#5) from master into V3
Reviewed-on: http://git.lrdaiot.cn:9000/thing/thing_api/pulls/5qingyuan_dev_new
6 changed files with 98 additions and 31 deletions
-
51common/transport/src/main/java/com/thing/transport/modules/dto/ThingModelInfo.java
-
5common/transport/src/main/java/com/thing/transport/modules/mapper/MqttBrokerMsgMapper.java
-
6common/transport/src/main/java/com/thing/transport/mqtt/broker/MqttTransportContext.java
-
52common/transport/src/main/java/com/thing/transport/mqtt/broker/MqttTransportHandler.java
-
12common/transport/src/main/resources/MqttBrokerMsgMapper.xml
-
3modules/thing/src/main/java/com/thing/thing/model/service/impl/IotThingModelServiceImpl.java
@ -0,0 +1,51 @@ |
|||||
|
package com.thing.transport.modules.dto; |
||||
|
|
||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 物模型表 |
||||
|
* |
||||
|
* @author mark |
||||
|
* @since 3.0 2024-03-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@Schema(description = "物模型表") |
||||
|
public class ThingModelInfo implements Serializable { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@Schema(description = "id") |
||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||
|
private Long id; |
||||
|
@Schema(description = "物编码") |
||||
|
private String code; |
||||
|
@Schema(description = "TB: token") |
||||
|
private String token; |
||||
|
@Schema(description = "是否网关: 0否1是") |
||||
|
private String gateway; |
||||
|
@Schema(description = "在线离线状态,0离线 1在线 2错误 3未接入") |
||||
|
private String status; |
||||
|
@Schema(description = "最新状态改变时间") |
||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||
|
private Long statusTs; |
||||
|
@Schema(description = "被分配到几个租户") |
||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||
|
private Long authNum; |
||||
|
@Schema(description = "数据来源") |
||||
|
private String origin; |
||||
|
@Schema(description = "备注说明") |
||||
|
private String remark; |
||||
|
@Schema(description = "创建时间") |
||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||
|
private Long createDate; |
||||
|
@Schema(description = "租户内物存在类型,0虚拟 1真实") |
||||
|
private String realType; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.thing.transport.modules.mapper.MqttBrokerMsgMapper"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<select id="findModelByToken" resultType=" com.thing.transport.modules.dto.ThingModelInfo"> |
||||
|
select * from iot_thing_model where token = #{token} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue