瀏覽代碼

深时点位

lyhzzz 2 年之前
父節點
當前提交
32a2fe9dac

+ 1 - 1
src/main/java/com/fdkankan/manage/common/RedisKeyUtil.java

@@ -7,7 +7,7 @@ public class RedisKeyUtil {
     public static final String SCENE_NUMS_LOADING = "4dkankan:scene:nums:loading";
     public static final String loginNum= "manage:login:userName:%s:ip:%s";
     public static final String gpsKey= "manage:gps:%s";
-    public static final String numGpsKey= "manage:gps:num:%s";
+    public static final String numGpsKey= "manage:num:gps:%s";
     public static final String numShootKey= "manage:shoot:num:%s";
     public static final String restStoreKey= "manage:reststore:%s";
 

+ 6 - 4
src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java

@@ -138,16 +138,18 @@ public class LaserService {
         }
         ScenePro pro = sceneProService.getByNum(num);
         if(pro != null){
-            redisUtil.set(redisKey,pro.getGps());
+            redisUtil.set(redisKey,pro.getGps()== null ?"":pro.getGps());
             redisUtil.set(redisKey2,String.valueOf(pro.getShootCount()== null ? 0 :pro.getShootCount()));
             return pro.getGps();
         }
         ScenePlus plus = scenePlusService.getByNum(num);
         if(plus != null){
             ScenePlusExt ext = scenePlusExtService.getByPlusId(plus.getId());
-            redisUtil.set(redisKey,ext.getGps());
-            redisUtil.set(redisKey2,String.valueOf(ext.getShootCount()== null ? 0 :ext.getShootCount()));
-            return ext.getGps();
+            if(ext != null){
+                redisUtil.set(redisKey,ext.getGps()== null?"":ext.getGps());
+                redisUtil.set(redisKey2,String.valueOf(ext.getShootCount()== null ? 0 :ext.getShootCount()));
+                return ext.getGps();
+            }
         }
         return null;
     }