移动端退出时同步库里的设备状态

This commit is contained in:
fenghp
2026-05-12 18:58:11 +08:00
parent e78e4dd336
commit f4fce5a363
5 changed files with 73 additions and 0 deletions
@@ -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));
}
/**
* 移动端更新设备工作状态。
*