forked from dyf/fys-Multi-tenant
Compare commits
7 Commits
82b1494bc7
...
1eb2502a21
Author | SHA1 | Date | |
---|---|---|---|
1eb2502a21 | |||
2815e27240 | |||
f119dd158b | |||
a109f187b9 | |||
b5ebc8855d | |||
99aef4b353 | |||
a423ac0f8b |
@ -29,16 +29,16 @@ public class AppOperationVideoController extends BaseController {
|
||||
* 查询操作视频列表
|
||||
*/
|
||||
@GetMapping("/listOperationVideos")
|
||||
public List<AppOperationVideoVo> listOperationVideos(AppOperationVideoBo bo) {
|
||||
return appOperationVideoService.queryList(bo);
|
||||
public R<List<AppOperationVideoVo>> listOperationVideos(AppOperationVideoBo bo) {
|
||||
return R.ok(appOperationVideoService.queryList(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询操作视频详情信息
|
||||
*/
|
||||
@GetMapping("/getOperationVideoInfo")
|
||||
public AppOperationVideoVo getOperationVideoInfo(AppOperationVideoBo bo) {
|
||||
return appOperationVideoService.queryById(bo.getId());
|
||||
public R<AppOperationVideoVo> getOperationVideoInfo(AppOperationVideoBo bo) {
|
||||
return R.ok(appOperationVideoService.queryById(bo.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -78,11 +78,23 @@ public class APPDeviceController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/unbind")
|
||||
// @PostMapping(value = "/unbind")
|
||||
// @Operation(summary = "设备解绑")
|
||||
// public ResponseVO<String> unbindAPPDevice(@Validated @ModelAttribute APPUnbindDTO deviceForm) {
|
||||
// appDeviceService.unbindAPPDevice(deviceForm);
|
||||
// return ResponseVO.success("解绑成功!!!");
|
||||
// }
|
||||
|
||||
/**
|
||||
* app设备解绑
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "设备解绑")
|
||||
public ResponseVO<String> unbindAPPDevice(@Validated @ModelAttribute APPUnbindDTO deviceForm) {
|
||||
appDeviceService.unbindAPPDevice(deviceForm);
|
||||
return ResponseVO.success("解绑成功!!!");
|
||||
@DeleteMapping("/unBind")
|
||||
public R<Void> unBind(Long id) {
|
||||
return toAjax(deviceService.unBindDevice(id));
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,4 +42,11 @@ public class AppDeviceVo {
|
||||
* 蓝牙名称
|
||||
*/
|
||||
private String bluetoothName;
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
* 0 失效
|
||||
* 1 正常
|
||||
*/
|
||||
private Integer deviceStatus;
|
||||
}
|
||||
|
@ -40,6 +40,15 @@ public interface DeviceMapper extends BaseMapper<Device> {
|
||||
*/
|
||||
List<Device> findDevices(@Param("criteria") DeviceQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 查询APP绑定设备列表
|
||||
*
|
||||
* @param criteria
|
||||
* @return
|
||||
*/
|
||||
Page<AppDeviceVo> queryAppBindDeviceList(Page<AppDeviceVo> page, @Param("criteria") DeviceQueryCriteria criteria);
|
||||
|
||||
|
||||
Page<AppDeviceVo> queryAppDeviceList(Page<AppDeviceVo> page, @Param("criteria") DeviceQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
|
@ -503,7 +503,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
Long userId = AppLoginHelper.getUserId();
|
||||
bo.setBindingUserId(userId);
|
||||
}
|
||||
Page<AppDeviceVo> result = baseMapper.queryAppDeviceList(pageQuery.build(), bo);
|
||||
Page<AppDeviceVo> result = baseMapper.queryAppBindDeviceList(pageQuery.build(), bo);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
@ -164,6 +164,34 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询APP绑定设备列表 -->
|
||||
<select id="queryAppBindDeviceList" resultType="com.fuyuanshen.equipment.domain.vo.AppDeviceVo">
|
||||
select d.id, d.device_name, d.device_name,
|
||||
d.device_name,
|
||||
d.device_mac,
|
||||
d.device_sn,
|
||||
d.device_imei,
|
||||
d.device_pic,
|
||||
dt.type_name,
|
||||
dt.communication_mode,
|
||||
d.bluetooth_name
|
||||
from device d
|
||||
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>
|
||||
|
||||
|
||||
<select id="queryAppDeviceList" resultType="com.fuyuanshen.equipment.domain.vo.AppDeviceVo">
|
||||
select d.id,
|
||||
|
Reference in New Issue
Block a user