forked from dyf/fys-Multi-tenant
设备主题
This commit is contained in:
@ -107,6 +107,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改客户
|
* 修改客户
|
||||||
|
* 不是因为寂寞才想你,只是因为想你才寂寞。
|
||||||
*
|
*
|
||||||
* @param customer /
|
* @param customer /
|
||||||
*/
|
*/
|
||||||
|
@ -105,7 +105,6 @@ public class Device extends TenantEntity {
|
|||||||
@Schema(name = "设备状态")
|
@Schema(name = "设备状态")
|
||||||
private Integer deviceStatus;
|
private Integer deviceStatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定状态
|
* 绑定状态
|
||||||
* 0 未绑定
|
* 0 未绑定
|
||||||
@ -127,4 +126,17 @@ public class Device extends TenantEntity {
|
|||||||
private Date bindingTime;
|
private Date bindingTime;
|
||||||
|
|
||||||
private String sendMsg;
|
private String sendMsg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布主题(格式:A/{device_id})
|
||||||
|
* pub_topic
|
||||||
|
*/
|
||||||
|
private String pubTopic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订阅主题(格式:B/{device_id})
|
||||||
|
* sub_topic
|
||||||
|
*/
|
||||||
|
private String subTopic;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -186,6 +186,10 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
|||||||
device.setCreateByName(loginUser.getNickname());
|
device.setCreateByName(loginUser.getNickname());
|
||||||
device.setTypeName(deviceTypes.getTypeName());
|
device.setTypeName(deviceTypes.getTypeName());
|
||||||
device.setDeviceType(deviceTypes.getId());
|
device.setDeviceType(deviceTypes.getId());
|
||||||
|
if (device.getDeviceImei() != null) {
|
||||||
|
device.setPubTopic("A/" + device.getDeviceImei());
|
||||||
|
device.setSubTopic("B/" + device.getDeviceImei());
|
||||||
|
}
|
||||||
|
|
||||||
deviceMapper.insert(device);
|
deviceMapper.insert(device);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<!-- 分页查询设备 -->
|
<!-- 分页查询设备 -->
|
||||||
<select id="findAll" resultType="com.fuyuanshen.equipment.domain.Device">
|
<select id="findAll" resultType="com.fuyuanshen.equipment.domain.Device">
|
||||||
select
|
select
|
||||||
da.id AS id,d.device_name,d.bluetooth_name,
|
da.id AS id,d.device_name,d.bluetooth_name,d.pub_topic,d.sub_topic,
|
||||||
d.device_pic, d.device_mac, d.device_sn, d.update_by,d.device_imei,
|
d.device_pic, d.device_mac, d.device_sn, d.update_by,d.device_imei,
|
||||||
d.update_time, dg.id AS device_type, d.remark, d.binding_status,t.type_name AS typeName,
|
d.update_time, dg.id AS device_type, d.remark, d.binding_status,t.type_name AS typeName,
|
||||||
da.assignee_id AS customerId, da.assignee_name AS customerName, da.active AS deviceStatus,
|
da.assignee_id AS customerId, da.assignee_name AS customerName, da.active AS deviceStatus,
|
||||||
|
Reference in New Issue
Block a user