| | |
| | | Integer status = vo.getStatus(); |
| | | Long time = (Long) redisTemplate.opsForHash().get("charging_gun_online", (pile_code + gun_code)); |
| | | //小于3秒才处理数据,防止频繁查询数据 |
| | | if(null != time && (System.currentTimeMillis() - time) < 3000){ |
| | | return; |
| | | } |
| | | // if(null != time && (System.currentTimeMillis() - time) < 3000){ |
| | | // return; |
| | | // } |
| | | TChargingGun tChargingGun = chargingGunService.getOne(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getFullNumber, (pile_code + gun_code)).eq(TChargingGun::getDelFlag, 0)); |
| | | if(null != tChargingGun){ |
| | | redisTemplate.opsForHash().put("charging_gun_online", tChargingGun.getFullNumber(), System.currentTimeMillis()); |