移动端退出时同步库里的设备状态
This commit is contained in:
@@ -59,6 +59,20 @@ public class AfMobileController extends BaseController
|
||||
return success(deviceService.heartbeat(userName, deviceCode, taskStatus, currentTaskId, userName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动端主动下线当前设备。
|
||||
*
|
||||
* @param body 请求体
|
||||
* @return 下线结果
|
||||
*/
|
||||
@PostMapping("/device/offline")
|
||||
public AjaxResult offlineDevice(@RequestBody Map<String, Object> body)
|
||||
{
|
||||
String userName = resolveUserName(body);
|
||||
String deviceCode = Convert.toStr(body.get("deviceCode"));
|
||||
return success(deviceService.offlineDevice(userName, deviceCode, userName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动端更新设备工作状态。
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user