注解优化

This commit is contained in:
2025-07-30 15:33:56 +08:00
parent 05412b2abf
commit 9ed254c920

View File

@@ -72,9 +72,9 @@ public class AppScenicAccountController {
if (account == null || account.getScenicId().isEmpty()) { if (account == null || account.getScenicId().isEmpty()) {
return ApiResponse.fail("景区账号未绑定景区"); return ApiResponse.fail("景区账号未绑定景区");
} }
list = account.getScenicId().stream().map(id -> { list = account.getScenicId().stream()
return scenicService.getDetails(id).getData(); .map(id -> scenicService.getDetails(id).getData())
}).toList(); .toList();
} else { } else {
list = adminScenicService.list(new ScenicReqQuery()).getData(); list = adminScenicService.list(new ScenicReqQuery()).getData();
} }
@@ -105,6 +105,7 @@ public class AppScenicAccountController {
} }
@GetMapping("/devices") @GetMapping("/devices")
@Deprecated
public ApiResponse<List<DeviceRespVO>> getDeviceList() { public ApiResponse<List<DeviceRespVO>> getDeviceList() {
String userId = BaseContextHandler.getUserId(); String userId = BaseContextHandler.getUserId();
ScenicAccountEntity account = accountService.getScenicAccountById(Long.valueOf(userId)); ScenicAccountEntity account = accountService.getScenicAccountById(Long.valueOf(userId));