From cfcde9db80647b05df13de10d068363a7e6f13a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Fri, 14 Nov 2025 10:46:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20bug-905=20=E4=BC=98=E5=8C=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/DeviceController.java | 17 ----------------- .../src/main/resources/mapper/DeviceMapper.xml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/DeviceController.java b/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/DeviceController.java index 5a01f29e..50d8cb40 100644 --- a/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/DeviceController.java +++ b/nflg-mobilebroken-admin/src/main/java/com/nflg/mobilebroken/admin/controller/DeviceController.java @@ -41,7 +41,6 @@ import org.ttzero.excel.entity.Workbook; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -771,20 +770,4 @@ public class DeviceController extends ControllerBase { } return ResponseEntity.ok().build(); } - - /** - * 获取设备机型 - * @param deviceNo 设备编号 - * @return 设备机型 - */ - @GetMapping("/getModelNo") - public ApiResult getModelNo(@RequestParam @NotBlank String deviceNo) { - Device device = deviceService.lambdaQuery() - .eq(Device::getDeviceNo, deviceNo) - .orderByDesc(Device::getDeviceState) - .last("limit 1") - .one(); - VUtils.trueThrowBusinessError(Objects.isNull(device)).throwMessage("设备编号无效"); - return ApiResult.success(device.getModelNo()); - } } diff --git a/nflg-mobilebroken-repository/src/main/resources/mapper/DeviceMapper.xml b/nflg-mobilebroken-repository/src/main/resources/mapper/DeviceMapper.xml index ad4d57c2..de39d3d0 100644 --- a/nflg-mobilebroken-repository/src/main/resources/mapper/DeviceMapper.xml +++ b/nflg-mobilebroken-repository/src/main/resources/mapper/DeviceMapper.xml @@ -19,7 +19,7 @@ LEFT JOIN device_component dc ON d.model_no = dc.model_no AND dc.`enable` = 1 LEFT JOIN t_base_customer c ON c.agency_company_code=d.agent_code WHERE d.device_no = #{deviceNo} - ORDER BY d.data_valid_state DESC,d.device_state + ORDER BY d.data_valid_state DESC,d.device_state DESC LIMIT 1;