WEB端查看APP客户设备绑定
This commit is contained in:
@ -29,7 +29,14 @@ public class AppDeviceVo {
|
||||
private Integer communicationMode;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
* 设备图片
|
||||
*/
|
||||
private String devicePic;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
|
||||
}
|
||||
|
@ -499,8 +499,10 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
|
||||
@Override
|
||||
public TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
||||
Long userId = AppLoginHelper.getUserId();
|
||||
bo.setBindingUserId(userId);
|
||||
if (bo.getBindingUserId() == null) {
|
||||
Long userId = AppLoginHelper.getUserId();
|
||||
bo.setBindingUserId(userId);
|
||||
}
|
||||
Page<AppDeviceVo> result = baseMapper.queryAppDeviceList(pageQuery.build(), bo);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
@ -167,18 +167,28 @@
|
||||
|
||||
<select id="queryAppDeviceList" resultType="com.fuyuanshen.equipment.domain.vo.AppDeviceVo">
|
||||
select d.id,
|
||||
d.device_name,
|
||||
d.device_mac,
|
||||
d.device_sn,
|
||||
d.device_imei,
|
||||
d.device_mac,
|
||||
dt.communication_mode
|
||||
d.device_name,
|
||||
d.device_mac,
|
||||
d.device_sn,
|
||||
d.device_imei,
|
||||
d.device_pic,
|
||||
dt.type_name,
|
||||
dt.communication_mode
|
||||
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}
|
||||
<if test="criteria.deviceType != null">
|
||||
and d.device_type = #{criteria.deviceType}
|
||||
</if>
|
||||
<if test="criteria.deviceName != null">
|
||||
and d.device_name = #{criteria.deviceName}
|
||||
</if>
|
||||
<if test="criteria.deviceMac != null">
|
||||
and d.device_mac = #{criteria.deviceMac}
|
||||
</if>
|
||||
<if test="criteria.deviceImei != null">
|
||||
and d.device_imei = #{criteria.deviceImei}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 获取分配设备的客户 -->
|
||||
|
Reference in New Issue
Block a user