fufanruiCommit

server_five_liuyunhu
ffr 2024-04-08 11:20:08 +08:00
parent e270770029
commit d41ac8c2fd
2 changed files with 4 additions and 5 deletions

View File

@ -277,13 +277,13 @@ public class RedisService {
}
public void setVinAndUserId(RealTimeDataRequest realTimeDataRequest) {
String key = "vin:"+realTimeDataRequest.getVin()+"userId:"+realTimeDataRequest.getUserId();
String key = "vin:"+realTimeDataRequest.getVin();
redisTemplate.opsForValue().set(key, realTimeDataRequest);
}
public void stopViewingData(Long userId,String vin) {
public void stopViewingData(String vin) {
String key = "vin:"+vin+"userId:"+userId;
String key = "vin:"+vin;
redisTemplate.delete(key);
}
}

View File

@ -49,8 +49,7 @@ public class VehicleDetectionServiceImpl implements VehicleDetectionService{
@Override
public void stopViewingData(String vin) {
Long userId = SecurityUtils.getUserId();
redisService.stopViewingData(userId,vin);
redisService.stopViewingData(vin);
}
}