| | |
| | | import com.ruoyi.integration.mongodb.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | @Component |
| | |
| | | private PlatformRemoteUpdateService platformRemoteUpdateService; |
| | | @Autowired |
| | | private QrCodeDeliveryService qrCodeDeliveryService; |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | /** |
| | | * 登录认证应答 |
| | |
| | | */ |
| | | public JSONObject pong(Pong pong){ |
| | | log.info("心跳包应答:{}", pong); |
| | | pongService.create(pong); |
| | | // pongService.create(pong); |
| | | //存储缓存中,5分钟有效 |
| | | redisTemplate.opsForValue().set("pong:" + pong.getCharging_pile_code() + pong.getCharging_gun_code(), pong, 5, TimeUnit.MINUTES); |
| | | return getMessageJsonString(pong, ServiceIdMenu.PONG.getValue()); |
| | | } |
| | | |