Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
墨大叔 2024-08-05 09:39:22 +08:00
commit 4854685931

View File

@ -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