You've already forked FrameTour-BE
refactor(device): 移除设备与景区的冗余配置接口
Some checks failed
ZhenTu-BE/pipeline/head There was a failure building this commit
Some checks failed
ZhenTu-BE/pipeline/head There was a failure building this commit
- 删除 DeviceV2Controller 中的设备配置相关接口 - 删除 ScenicV2Controller 中的景区配置相关接口 - 移除 DeviceConfigV2Client 中的扁平化配置接口 - 移除 DeviceV2Client 中的设备详情配置接口 - 更新 DeviceIntegrationExample 示例代码 - 移除 DeviceIntegrationFallbackExample 中的配置缓存示例 - 删除 DeviceConfigIntegrationService 中的配置获取方法 - 删除 DeviceIntegrationService 中的设备配置服务方法- 移除 RenderWorkerV2Client 中的工作器配置接口- 删除 RenderWorkerConfigIntegrationService 中的配置键名- 移除 RenderWorkerIntegrationService 中的工作器配置方法 - 删除 ScenicConfigV2Client 中的扁平化配置接口 - 移除 ScenicV2Client 中的景区配置接口 - 更新 ScenicIntegrationExample 示例代码 - 删除 ScenicConfigIntegrationService 中的配置获取方法 - 删除 ScenicIntegrationService 中的景区配置服务方法 - 修改 ScenicRepository 中景区实体获取逻辑
This commit is contained in:
@@ -71,30 +71,6 @@ public class ScenicV2Controller {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 景区V2带配置信息分页列表
|
||||
*/
|
||||
@GetMapping("/with-config")
|
||||
public ApiResponse<PageResponse<ScenicV2WithConfigDTO>> listScenicsWithConfig(@RequestParam(defaultValue = "1") Integer page,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(required = false) Integer status,
|
||||
@RequestParam(required = false) String name) {
|
||||
log.info("分页查询景区带配置信息列表, page: {}, pageSize: {}, status: {}, name: {}", page, pageSize, status, name);
|
||||
|
||||
// 参数验证:限制pageSize最大值为100
|
||||
if (pageSize > 100) {
|
||||
pageSize = 100;
|
||||
}
|
||||
|
||||
try {
|
||||
PageResponse<ScenicV2WithConfigDTO> response = scenicIntegrationService.listScenicsWithConfig(page, pageSize, status, name);
|
||||
return ApiResponse.success(response);
|
||||
} catch (Exception e) {
|
||||
log.error("分页查询景区带配置信息列表失败", e);
|
||||
return ApiResponse.fail("分页查询景区带配置信息列表失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单个景区详情
|
||||
*/
|
||||
@@ -192,36 +168,6 @@ public class ScenicV2Controller {
|
||||
|
||||
// ========== 景区配置管理 ==========
|
||||
|
||||
/**
|
||||
* 获取景区及其配置信息
|
||||
*/
|
||||
@GetMapping("/{scenicId}/with-config")
|
||||
public ApiResponse<ScenicV2WithConfigDTO> getScenicWithConfig(@PathVariable Long scenicId) {
|
||||
log.info("获取景区配置信息, scenicId: {}", scenicId);
|
||||
try {
|
||||
ScenicV2WithConfigDTO scenic = scenicIntegrationService.getScenicWithConfig(scenicId);
|
||||
return ApiResponse.success(scenic);
|
||||
} catch (Exception e) {
|
||||
log.error("获取景区配置信息失败, scenicId: {}", scenicId, e);
|
||||
return ApiResponse.fail("获取景区配置信息失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取景区扁平化配置
|
||||
*/
|
||||
@GetMapping("/{scenicId}/flat-config")
|
||||
public ApiResponse<Map<String, Object>> getScenicFlatConfig(@PathVariable Long scenicId) {
|
||||
log.info("获取景区扁平化配置, scenicId: {}", scenicId);
|
||||
try {
|
||||
Map<String, Object> config = scenicIntegrationService.getScenicFlatConfig(scenicId);
|
||||
return ApiResponse.success(config);
|
||||
} catch (Exception e) {
|
||||
log.error("获取景区扁平化配置失败, scenicId: {}", scenicId, e);
|
||||
return ApiResponse.fail("获取景区扁平化配置失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取景区配置列表
|
||||
*/
|
||||
@@ -316,20 +262,4 @@ public class ScenicV2Controller {
|
||||
return ApiResponse.fail("批量更新配置失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 扁平化批量更新景区配置
|
||||
*/
|
||||
@PutMapping("/{scenicId}/flat-config")
|
||||
public ApiResponse<BatchUpdateResponse> batchFlatUpdateConfigs(@PathVariable Long scenicId,
|
||||
@RequestBody Map<String, Object> configs) {
|
||||
log.info("扁平化批量更新景区配置, scenicId: {}, configs count: {}", scenicId, configs.size());
|
||||
try {
|
||||
BatchUpdateResponse response = scenicConfigIntegrationService.batchFlatUpdateConfigs(scenicId, configs);
|
||||
return ApiResponse.success(response);
|
||||
} catch (Exception e) {
|
||||
log.error("扁平化批量更新景区配置失败, scenicId: {}", scenicId, e);
|
||||
return ApiResponse.fail("扁平化批量更新配置失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user