| | |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | @Component |
| | |
| | | // 持久化消息 |
| | | Ping ping = new Ping(); |
| | | BeanUtils.copyProperties(pingMessage,ping); |
| | | pingService.create(ping); |
| | | // pingService.create(ping); |
| | | //存储缓存中,5分钟有效 |
| | | redisTemplate.opsForValue().set("ping:" + ping.getCharging_pile_code() + ping.getCharging_gun_code(), ping, 5, TimeUnit.MINUTES); |
| | | |
| | | UpdateChargingPileStatusVo vo1 = new UpdateChargingPileStatusVo(); |
| | | vo1.setGun_code(pingMessage.getCharging_gun_code()); |