Commit 096c9769 by YG8429

定时修改设备密码排除卫生间、设备间,增加人工修改密码接口

parent 34209c26
...@@ -96,12 +96,25 @@ public class DeviceController extends BaseController ...@@ -96,12 +96,25 @@ public class DeviceController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:device:edit')") @PreAuthorize("@ss.hasPermi('system:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE) @Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PostMapping(value = "/updateDevicePassword")
public AjaxResult updateDevicePassword(@RequestBody Device device)
{
device.setDevPsw(device.getNewDevPsw());
return toAjax(deviceService.updateDevice(device));
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('system:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody Device device) public AjaxResult edit(@RequestBody Device device)
{ {
return toAjax(deviceService.updateDevice(device)); return toAjax(deviceService.updateDevice(device));
} }
/** /**
* 删除设备信息 * 删除设备信息
*/ */
......
...@@ -83,6 +83,9 @@ public class Device extends BaseEntity ...@@ -83,6 +83,9 @@ public class Device extends BaseEntity
/** 门店房间ID */ /** 门店房间ID */
private Long roomId; private Long roomId;
/** 设备新密码*/
private String newDevPsw;
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
...@@ -202,6 +202,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme ...@@ -202,6 +202,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(Device::getDevType, DeviceType.DEVICE_CCEE.getCode()); queryWrapper.eq(Device::getDevType, DeviceType.DEVICE_CCEE.getCode());
queryWrapper.isNotNull(Device::getRoomId); queryWrapper.isNotNull(Device::getRoomId);
queryWrapper.inSql(Device::getRoomId, "select id from s_room where room_type not in ('4', '5')");
List<Device> list = deviceMapper.selectList(queryWrapper); List<Device> list = deviceMapper.selectList(queryWrapper);
if (list.size() > 0) { if (list.size() > 0) {
// 默认15天 // 默认15天
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment