From bcf84c887954e7508cf6ba774f8458314dda2802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 5 Aug 2024 09:39:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/app/AppDeviceController.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 9078457e..ff4d0146 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 @@ -1,11 +1,14 @@ package com.ruoyi.web.controller.app; import com.fasterxml.jackson.annotation.JsonView; +import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.JsonViewProfile; import com.ruoyi.common.core.domain.ValidGroup; import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.enums.OperatorType; import com.ruoyi.common.utils.ServiceUtil; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.ss.device.domain.DeviceView; @@ -53,6 +56,7 @@ public class AppDeviceController extends BaseController { @Autowired private DeviceValidator deviceValidator; + @Log(title = "商户修改设备信息", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE) @ApiOperation("商户修改设备信息") @PutMapping public AjaxResult edit(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) DeviceBO data) { @@ -94,6 +98,7 @@ public class AppDeviceController extends BaseController { return success(device); } + @Log(title = "设备通断电", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE) @ApiOperation("设备通断电") @PutMapping("/{deviceId}/changePower") public AjaxResult close(@PathVariable @ApiParam("设备id") Long deviceId, String status) { @@ -101,6 +106,7 @@ public class AppDeviceController extends BaseController { return success(smDeviceService.changePowerStatus(deviceId, powerStatus )); } + @Log(title = "绑定设备", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE) @ApiOperation("绑定设备") @PutMapping("/bind") public AjaxResult bind(@RequestBody Device device) { @@ -114,6 +120,7 @@ public class AppDeviceController extends BaseController { } } + @Log(title = "解除设备绑定", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE) @ApiOperation("解除设备绑定") @DeleteMapping("/mch/unbind/{deviceId}") public AjaxResult mchUnbind(@PathVariable @ApiParam("设备id") Long deviceId) { @@ -121,6 +128,7 @@ public class AppDeviceController extends BaseController { return toAjax(smDeviceService.unbind(deviceId)); } + @Log(title = "设备电量归零", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE) @ApiOperation("设备电量归零") @PutMapping("{deviceId}/reset") public AjaxResult reset(@PathVariable @ApiParam("设备id") Long deviceId) { @@ -134,6 +142,7 @@ public class AppDeviceController extends BaseController { return success(smMeterReadingRecordService.selectCount(dto)); } + @Log(title = "设备充值时长", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE) @ApiOperation("设备充值时长") @PutMapping("/addTime/{deviceId}") public AjaxResult addTime(@PathVariable @ApiParam("设备id") Long deviceId, @ApiParam("时长(分钟)") Long amount) @@ -179,6 +188,7 @@ public class AppDeviceController extends BaseController { return success(smDeviceService.selectByDeviceNo(deviceNo)); } + @Log(title = "管理员设备录入", businessType = BusinessType.INSERT, operatorType = OperatorType.MOBILE) @ApiOperation("管理员设备录入") @PostMapping @DeviceAdminRequired