forked from dyf/fys-Multi-tenant
Compare commits
1 Commits
main
...
dyf-device
Author | SHA1 | Date | |
---|---|---|---|
a7340c744e |
@ -121,5 +121,8 @@ public class Device extends TenantEntity {
|
|||||||
|
|
||||||
private Long bindingUserId;
|
private Long bindingUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定时间
|
||||||
|
*/
|
||||||
private Date bindingTime;
|
private Date bindingTime;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.fuyuanshen.equipment.domain.vo;
|
package com.fuyuanshen.equipment.domain.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class AppDeviceVo {
|
public class AppDeviceVo implements Serializable {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ -49,4 +51,10 @@ public class AppDeviceVo {
|
|||||||
* 1 正常
|
* 1 正常
|
||||||
*/
|
*/
|
||||||
private Integer deviceStatus;
|
private Integer deviceStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定时间
|
||||||
|
*/
|
||||||
|
private Date bindingTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,14 @@ public interface DeviceService extends IService<Device> {
|
|||||||
*/
|
*/
|
||||||
void unbindDevice(DeviceForm deviceForm);
|
void unbindDevice(DeviceForm deviceForm);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WEB端查看APP客户设备绑定
|
||||||
|
*
|
||||||
|
* @param bo
|
||||||
|
* @param pageQuery
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery);
|
TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery);
|
||||||
|
|
||||||
int bindDevice(AppDeviceBo bo);
|
int bindDevice(AppDeviceBo bo);
|
||||||
|
@ -470,7 +470,13 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WEB端查看APP客户设备绑定
|
||||||
|
*
|
||||||
|
* @param bo
|
||||||
|
* @param pageQuery
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
public TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
||||||
if (bo.getBindingUserId() == null) {
|
if (bo.getBindingUserId() == null) {
|
||||||
|
@ -179,7 +179,7 @@ public class DeviceTypeServiceImpl extends ServiceImpl<DeviceTypeMapper, DeviceT
|
|||||||
List<Device> devices = deviceMapper.selectList(new QueryWrapper<Device>()
|
List<Device> devices = deviceMapper.selectList(new QueryWrapper<Device>()
|
||||||
.eq("device_type", deviceTypeGrant.getDeviceTypeId()));
|
.eq("device_type", deviceTypeGrant.getDeviceTypeId()));
|
||||||
if (CollectionUtil.isNotEmpty(devices)) {
|
if (CollectionUtil.isNotEmpty(devices)) {
|
||||||
throw new RuntimeException("该设备类型已绑定设备,无法删除");
|
throw new RuntimeException("该设备类型已绑定设备,无法删除!!!");
|
||||||
}
|
}
|
||||||
deviceTypeId.add(deviceTypeGrant.getDeviceTypeId());
|
deviceTypeId.add(deviceTypeGrant.getDeviceTypeId());
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,8 @@
|
|||||||
d.device_pic,
|
d.device_pic,
|
||||||
dt.type_name,
|
dt.type_name,
|
||||||
dt.communication_mode,
|
dt.communication_mode,
|
||||||
d.bluetooth_name
|
d.bluetooth_name,
|
||||||
|
d.binding_time
|
||||||
from device d
|
from device d
|
||||||
inner join device_type dt on d.device_type = dt.id
|
inner join device_type dt on d.device_type = dt.id
|
||||||
where d.binding_user_id = #{criteria.bindingUserId}
|
where d.binding_user_id = #{criteria.bindingUserId}
|
||||||
|
Reference in New Issue
Block a user