Commit 8991045f authored by 赵啸非's avatar 赵啸非

修改redis 过期事件通知

parent a811cbd4
......@@ -129,7 +129,7 @@ public class DeviceApiController {
authInfo.setDownTopicFilter(Constant.DOWN_TOPIC + deviceEntity.getDeviceCode());
authInfo.setHomeUrl(platformEntity.getHomeUrl());
// String content = AESUtil.encryptForApp(JSON.toJSONString(authInfo), secret);
// String content = AESUtil.encryptForApp(JSON.toJSONString(authInfo), secret);
String content = EncryptUtil.myEnscrt(JSON.toJSONString(authInfo), 9, DES_STR, ENCRYPT_STR);
......@@ -483,6 +483,7 @@ public class DeviceApiController {
deviceEntity.setCreateTime(new Date());
deviceEntity.setCreateUserId(1L);
deviceService.getDeviceDao().insert(deviceEntity);
deviceService.putCache(deviceEntity.getDeviceCode(), deviceEntity);
}
return deviceEntity;
......
......@@ -45,6 +45,8 @@ public interface DeviceService extends ICRUDCacheService<DeviceEntity,Long>{
void sendThirdParty(DeviceEntity entity, ProductEntity productEntity, PlatformEntity platformEntity, DeviceStatusEnum update);
void putCache(String key,DeviceEntity deviceEntity);
DeviceDao getDeviceDao();
......
......@@ -51,6 +51,8 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
return data.getDeviceCode();
}
@Autowired
private MessageService messageService;
@Autowired
......@@ -197,6 +199,12 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
}
}
@Override
public void putCache(String key, DeviceEntity data) {
super.putCache(key, data);
}
@Override
public DeviceDao getDeviceDao() {
return this.getDao();
......
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