Commit 26ab045c authored by 赵啸非's avatar 赵啸非

修改redis 过期事件通知

parent 8991045f
...@@ -107,7 +107,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D ...@@ -107,7 +107,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Override @Override
public void active(String deviceCode, Context context) { public void active(String deviceCode, Context context) {
DeviceEntity deviceEntity = this.selectOne(new DeviceQuery().deviceCode(deviceCode)); DeviceEntity deviceEntity = this.selectOne(new DeviceQuery().deviceCode(deviceCode));
if (!ObjectUtils.isEmpty(deviceEntity)) throw new AppException("当前设备不存在!"); if (ObjectUtils.isEmpty(deviceEntity)) throw new AppException("当前设备不存在!");
if (deviceEntity.getActive() == ActiveEnum.已激活.getValue()) throw new AppException("当前设备已激活!"); if (deviceEntity.getActive() == ActiveEnum.已激活.getValue()) throw new AppException("当前设备已激活!");
deviceEntity.setActive(ActiveEnum.已激活.getValue()); deviceEntity.setActive(ActiveEnum.已激活.getValue());
this.update(deviceEntity, context); this.update(deviceEntity, context);
......
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