diff --git a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java index 44a6ba98..34c5319b 100644 --- a/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java +++ b/smart-switch-web/src/main/java/com/ruoyi/web/controller/app/AppDeviceController.java @@ -306,6 +306,19 @@ public class AppDeviceController extends BaseController { return toAjax(smDeviceService.updateVxs(deviceId, vxs, "小程序管理员修改设备电压系数")); } + @ApiOperation("管理员获取设备信息接口") + @GetMapping("/admin/get") + @DeviceAdminRequired + public AjaxResult adminGet(@RequestParam(required = false) String sn) { + DeviceVO device = null; + if (StringUtils.hasText(sn)) { + device = smDeviceService.selectByDeviceNo(sn); + } else { + return error("请输入SN码"); + } + return success(device); + } + @ApiOperation("获取正在使用中的设备列表") @GetMapping("/usingDevice") @JsonView(JsonViewProfile.App.class)