This commit is contained in:
2025-10-10 13:39:16 +08:00
parent a28d846638
commit d77ebab153
10 changed files with 420 additions and 8 deletions

View File

@@ -43,14 +43,11 @@ public class AuthController {
public JsonData saveAuth(@RequestBody Map<String, Object> data) {
String serviceName = (String) data.get("serviceName");
String authKey = (String) data.get("authKey");
if (serviceName == null || authKey == null) return JsonData.buildError("serviceName和authKey不能为空");
AuthTokenEntity entity = authTokenRepository.findByServiceName(serviceName).orElse(new AuthTokenEntity());
entity.setServiceName(serviceName);
entity.setToken(authKey);
authTokenRepository.save(entity);
return JsonData.buildSuccess("认证信息保存成功");
}
@@ -104,7 +101,7 @@ public class AuthController {
}
/**
* 删除缓存数据 - POST方式
* 删除缓存数据
*/
@PostMapping("/cache/delete")
public JsonData deleteCacheByPost(@RequestParam String key) {
@@ -133,7 +130,7 @@ public class AuthController {
}
/**
* 获取设备ID硬件UUID
* 获取设备ID
*/
@GetMapping("/device-id")
public JsonData getDeviceId() {