WEB端查看APP客户设备绑定
This commit is contained in:
@ -19,6 +19,7 @@ import com.fuyuanshen.equipment.domain.bo.UserAppBo;
|
|||||||
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
||||||
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
||||||
import com.fuyuanshen.equipment.service.AppUserService;
|
import com.fuyuanshen.equipment.service.AppUserService;
|
||||||
|
import com.fuyuanshen.equipment.service.DeviceService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -42,6 +43,7 @@ public class APPDeviceController extends BaseController {
|
|||||||
|
|
||||||
private final APPDeviceService appDeviceService;
|
private final APPDeviceService appDeviceService;
|
||||||
private final AppUserService appUserService;
|
private final AppUserService appUserService;
|
||||||
|
private final DeviceService deviceService;
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/list")
|
@PostMapping(value = "/list")
|
||||||
@ -71,13 +73,11 @@ public class APPDeviceController extends BaseController {
|
|||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Operation(summary = "WEB端查看APP客户设备绑定")
|
@Operation(summary = "WEB端查看APP客户设备绑定")
|
||||||
public TableDataInfo<APPDevice> queryAPPDevice(DeviceQueryCriteria criteria) {
|
public TableDataInfo<AppDeviceVo> queryAPPDevice(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
||||||
return appDeviceService.queryAppDeviceList(criteria);
|
return deviceService.queryAppDeviceList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(value = "/unbind")
|
@PostMapping(value = "/unbind")
|
||||||
@Operation(summary = "设备解绑")
|
@Operation(summary = "设备解绑")
|
||||||
public ResponseVO<String> unbindAPPDevice(@Validated @ModelAttribute APPUnbindDTO deviceForm) {
|
public ResponseVO<String> unbindAPPDevice(@Validated @ModelAttribute APPUnbindDTO deviceForm) {
|
||||||
@ -86,7 +86,6 @@ public class APPDeviceController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改APP用户信息
|
* 修改APP用户信息
|
||||||
*/
|
*/
|
||||||
|
@ -32,4 +32,11 @@ public class AppDeviceVo {
|
|||||||
* 设备图片
|
* 设备图片
|
||||||
*/
|
*/
|
||||||
private String devicePic;
|
private String devicePic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备类型
|
||||||
|
*/
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -499,8 +499,10 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
public TableDataInfo<AppDeviceVo> queryAppDeviceList(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
||||||
|
if (bo.getBindingUserId() == null) {
|
||||||
Long userId = AppLoginHelper.getUserId();
|
Long userId = AppLoginHelper.getUserId();
|
||||||
bo.setBindingUserId(userId);
|
bo.setBindingUserId(userId);
|
||||||
|
}
|
||||||
Page<AppDeviceVo> result = baseMapper.queryAppDeviceList(pageQuery.build(), bo);
|
Page<AppDeviceVo> result = baseMapper.queryAppDeviceList(pageQuery.build(), bo);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,8 @@
|
|||||||
d.device_mac,
|
d.device_mac,
|
||||||
d.device_sn,
|
d.device_sn,
|
||||||
d.device_imei,
|
d.device_imei,
|
||||||
d.device_mac,
|
d.device_pic,
|
||||||
|
dt.type_name,
|
||||||
dt.communication_mode
|
dt.communication_mode
|
||||||
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
|
||||||
@ -179,6 +180,15 @@
|
|||||||
<if test="criteria.deviceType != null">
|
<if test="criteria.deviceType != null">
|
||||||
and d.device_type = #{criteria.deviceType}
|
and d.device_type = #{criteria.deviceType}
|
||||||
</if>
|
</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>
|
</select>
|
||||||
|
|
||||||
<!-- 获取分配设备的客户 -->
|
<!-- 获取分配设备的客户 -->
|
||||||
|
Reference in New Issue
Block a user