Commit 096c9769 by YG8429

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

parent 34209c26
......@@ -96,12 +96,25 @@ public class DeviceController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('system:device:edit')")
@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
public AjaxResult edit(@RequestBody Device device)
{
return toAjax(deviceService.updateDevice(device));
}
/**
* 删除设备信息
*/
......
......@@ -83,6 +83,9 @@ public class Device extends BaseEntity
/** 门店房间ID */
private Long roomId;
/** 设备新密码*/
private String newDevPsw;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -202,6 +202,7 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
LambdaQueryWrapper<Device> queryWrapper = new LambdaQueryWrapper();
queryWrapper.eq(Device::getDevType, DeviceType.DEVICE_CCEE.getCode());
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);
if (list.size() > 0) {
// 默认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