|
|
|
@ -63,17 +63,17 @@ public class LatestLocationAppController {
@@ -63,17 +63,17 @@ public class LatestLocationAppController {
|
|
|
|
|
if (CommonConstant.AUDIT_STATUS_ONE.equals(onlineStatus)){ |
|
|
|
|
String deviceModelId = deviceInfo.getDeviceModelId(); |
|
|
|
|
String hasKey="local:limitCount"+":"+deviceModelId; |
|
|
|
|
int limitCount=500; |
|
|
|
|
// int limitCount=5;
|
|
|
|
|
if (redisService.hasKey(hasKey)){ |
|
|
|
|
limitCount=redisService.getCacheObject(hasKey); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Long count =(Long) redisService.redisTemplate.execute(localLimitScript, Arrays.asList(imei),limitCount,getStartTimeStamp()); |
|
|
|
|
System.out.println("定位次数===:"+count); |
|
|
|
|
if (count<=0){ |
|
|
|
|
return AjaxResult.error(241,"该设备每天的定位次数已到达上限"); |
|
|
|
|
int limitCount=redisService.getCacheObject(hasKey); |
|
|
|
|
Long count =(Long) redisService.redisTemplate.execute(localLimitScript, Arrays.asList(imei),limitCount,getStartTimeStamp()); |
|
|
|
|
System.out.println("定位次数===:"+count); |
|
|
|
|
if (count<=0){ |
|
|
|
|
return AjaxResult.error(241,"该设备每天的定位次数已到达上限"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return AjaxResult.success(latestLocationAppService.getLastLocationInstructions(imei,onlineStatus)); |
|
|
|
|