From e472a3207f9f25098c82fc289c0471470756fba2 Mon Sep 17 00:00:00 2001 From: MichaelWin Date: Fri, 6 Mar 2026 14:58:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=94=B9=E8=BF=9B=E3=80=91=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=9B=BA=E4=BB=B6=E7=89=88=E6=9C=AC=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=89=88=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../corewing/app/modules/app/AppFirmwareController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/corewing/app/modules/app/AppFirmwareController.java b/src/main/java/com/corewing/app/modules/app/AppFirmwareController.java index 4aad458..4bbb9ec 100644 --- a/src/main/java/com/corewing/app/modules/app/AppFirmwareController.java +++ b/src/main/java/com/corewing/app/modules/app/AppFirmwareController.java @@ -126,10 +126,10 @@ public class AppFirmwareController { * * @param firmwareType 固件类型 */ - @CommonLog("根据类型,型号查询固件版本") - @ApiOperation("根据类型,型号查询固件版本") - @GetMapping("/type/{firmwareType}/{modelId}") - public Result> listByType(@PathVariable Integer firmwareType, @PathVariable Integer modelId) { + @CommonLog("根据类型,型号,当前版本查询固件版本") + @ApiOperation("根据类型,当前版本查询固件版本") + @GetMapping("/type/{firmwareType}/{modelId}/{softwareVersion}") + public Result> listByType(@PathVariable Integer firmwareType, @PathVariable Integer modelId, @PathVariable Integer softwareVersion) { if (firmwareType == null && modelId == null) { return Result.error(I18nUtil.getMessage("firmware.type.or.model.required")); } @@ -144,6 +144,7 @@ public class AppFirmwareController { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(Firmware::getFirmwareType, firmwareType); wrapper.eq(Firmware::getModelId, bizDeviceCategory.getId()); + wrapper.ge(Firmware::getVersionId, softwareVersion); // 按版本号或创建时间倒序排列,最新版本在前 wrapper.orderByDesc(Firmware::getCreateTime);