You've already forked FrameTour-BE
refactor(pc): 移除日志记录并优化数据查询
- 移除了多个控制器和服务类中的冗余日志记录 - 在查询数据时,不再通过 SQL左连接直接获取景点和设备名称,而是使用 Repository 单独查询 - 更新了 FaceSampleMapper、
This commit is contained in:
@@ -92,7 +92,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ApiResponse<DeviceV2DTO> getDevice(@PathVariable Long id) {
|
||||
log.info("获取设备信息, id: {}", id);
|
||||
try {
|
||||
DeviceV2DTO device = deviceIntegrationService.getDevice(id);
|
||||
return ApiResponse.success(device);
|
||||
@@ -107,7 +106,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/{id}/with-config")
|
||||
public ApiResponse<DeviceV2WithConfigDTO> getDeviceWithConfig(@PathVariable Long id) {
|
||||
log.info("获取设备配置信息, id: {}", id);
|
||||
try {
|
||||
DeviceV2WithConfigDTO device = deviceIntegrationService.getDeviceWithConfig(id);
|
||||
return ApiResponse.success(device);
|
||||
@@ -122,7 +120,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/no/{no}")
|
||||
public ApiResponse<DeviceV2DTO> getDeviceByNo(@PathVariable String no) {
|
||||
log.info("根据设备编号获取设备信息, no: {}", no);
|
||||
try {
|
||||
DeviceV2DTO device = deviceIntegrationService.getDeviceByNo(no);
|
||||
return ApiResponse.success(device);
|
||||
@@ -137,7 +134,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/no/{no}/with-config")
|
||||
public ApiResponse<DeviceV2WithConfigDTO> getDeviceWithConfigByNo(@PathVariable String no) {
|
||||
log.info("根据设备编号获取设备配置信息, no: {}", no);
|
||||
try {
|
||||
DeviceV2WithConfigDTO device = deviceIntegrationService.getDeviceWithConfigByNo(no);
|
||||
return ApiResponse.success(device);
|
||||
@@ -296,7 +292,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/{id}/config")
|
||||
public ApiResponse<List<DeviceConfigV2DTO>> getDeviceConfigs(@PathVariable Long id) {
|
||||
log.info("获取设备配置列表, deviceId: {}", id);
|
||||
try {
|
||||
List<DeviceConfigV2DTO> configs = deviceConfigIntegrationService.getDeviceConfigs(id);
|
||||
return ApiResponse.success(configs);
|
||||
@@ -311,7 +306,6 @@ public class DeviceV2Controller {
|
||||
*/
|
||||
@GetMapping("/{id}/flat-config")
|
||||
public ApiResponse<Map<String, Object>> getDeviceFlatConfig(@PathVariable Long id) {
|
||||
log.info("获取设备扁平化配置, deviceId: {}", id);
|
||||
try {
|
||||
Map<String, Object> config = deviceConfigIntegrationService.getDeviceFlatConfig(id);
|
||||
return ApiResponse.success(config);
|
||||
@@ -327,7 +321,6 @@ public class DeviceV2Controller {
|
||||
@GetMapping("/{id}/config/{configKey}")
|
||||
public ApiResponse<DeviceConfigV2DTO> getDeviceConfigByKey(@PathVariable Long id,
|
||||
@PathVariable String configKey) {
|
||||
log.info("根据键获取设备配置, deviceId: {}, configKey: {}", id, configKey);
|
||||
try {
|
||||
DeviceConfigV2DTO config = deviceConfigIntegrationService.getDeviceConfigByKey(id, configKey);
|
||||
return ApiResponse.success(config);
|
||||
|
Reference in New Issue
Block a user