Merge remote-tracking branch 'origin/master' into dev
This commit is contained in:
commit
4854685931
|
@ -1,11 +1,14 @@
|
||||||
package com.ruoyi.web.controller.app;
|
package com.ruoyi.web.controller.app;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonView;
|
import com.fasterxml.jackson.annotation.JsonView;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.JsonViewProfile;
|
import com.ruoyi.common.core.domain.JsonViewProfile;
|
||||||
import com.ruoyi.common.core.domain.ValidGroup;
|
import com.ruoyi.common.core.domain.ValidGroup;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
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.ServiceUtil;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.ss.device.domain.DeviceView;
|
import com.ruoyi.ss.device.domain.DeviceView;
|
||||||
|
@ -53,6 +56,7 @@ public class AppDeviceController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeviceValidator deviceValidator;
|
private DeviceValidator deviceValidator;
|
||||||
|
|
||||||
|
@Log(title = "商户修改设备信息", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("商户修改设备信息")
|
@ApiOperation("商户修改设备信息")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) DeviceBO data) {
|
public AjaxResult edit(@RequestBody @Validated({ValidGroup.FrontUpdate.class}) DeviceBO data) {
|
||||||
|
@ -94,6 +98,7 @@ public class AppDeviceController extends BaseController {
|
||||||
return success(device);
|
return success(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "设备通断电", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("设备通断电")
|
@ApiOperation("设备通断电")
|
||||||
@PutMapping("/{deviceId}/changePower")
|
@PutMapping("/{deviceId}/changePower")
|
||||||
public AjaxResult close(@PathVariable @ApiParam("设备id") Long deviceId, String status) {
|
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 ));
|
return success(smDeviceService.changePowerStatus(deviceId, powerStatus ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "绑定设备", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("绑定设备")
|
@ApiOperation("绑定设备")
|
||||||
@PutMapping("/bind")
|
@PutMapping("/bind")
|
||||||
public AjaxResult bind(@RequestBody Device device) {
|
public AjaxResult bind(@RequestBody Device device) {
|
||||||
|
@ -114,6 +120,7 @@ public class AppDeviceController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "解除设备绑定", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("解除设备绑定")
|
@ApiOperation("解除设备绑定")
|
||||||
@DeleteMapping("/mch/unbind/{deviceId}")
|
@DeleteMapping("/mch/unbind/{deviceId}")
|
||||||
public AjaxResult mchUnbind(@PathVariable @ApiParam("设备id") Long deviceId) {
|
public AjaxResult mchUnbind(@PathVariable @ApiParam("设备id") Long deviceId) {
|
||||||
|
@ -121,6 +128,7 @@ public class AppDeviceController extends BaseController {
|
||||||
return toAjax(smDeviceService.unbind(deviceId));
|
return toAjax(smDeviceService.unbind(deviceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "设备电量归零", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("设备电量归零")
|
@ApiOperation("设备电量归零")
|
||||||
@PutMapping("{deviceId}/reset")
|
@PutMapping("{deviceId}/reset")
|
||||||
public AjaxResult reset(@PathVariable @ApiParam("设备id") Long deviceId) {
|
public AjaxResult reset(@PathVariable @ApiParam("设备id") Long deviceId) {
|
||||||
|
@ -134,6 +142,7 @@ public class AppDeviceController extends BaseController {
|
||||||
return success(smMeterReadingRecordService.selectCount(dto));
|
return success(smMeterReadingRecordService.selectCount(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "设备充值时长", businessType = BusinessType.OTHER, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("设备充值时长")
|
@ApiOperation("设备充值时长")
|
||||||
@PutMapping("/addTime/{deviceId}")
|
@PutMapping("/addTime/{deviceId}")
|
||||||
public AjaxResult addTime(@PathVariable @ApiParam("设备id") Long deviceId, @ApiParam("时长(分钟)") Long amount)
|
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));
|
return success(smDeviceService.selectByDeviceNo(deviceNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = "管理员设备录入", businessType = BusinessType.INSERT, operatorType = OperatorType.MOBILE)
|
||||||
@ApiOperation("管理员设备录入")
|
@ApiOperation("管理员设备录入")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@DeviceAdminRequired
|
@DeviceAdminRequired
|
||||||
|
|
Loading…
Reference in New Issue
Block a user