Преглед на файлове

:feat:增加游戏监控日志

zhangxianyu преди 1 година
родител
ревизия
66f839904d

+ 3 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/properties/SmsProperties.java

@@ -18,5 +18,8 @@ public class SmsProperties {
     private String accessKeySecret;
     private String defaultSignName;
     private String defaultStstemErrorTemplate;
+    private String msgParamName = "msg";
+    private String timeParamName = "time";
+
 
 }

+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OrderCostMonitorAlarmBySmsServiceImpl.java

@@ -86,7 +86,7 @@ public class OrderCostMonitorAlarmBySmsServiceImpl implements IOrderCostMonitorA
                 }
             }
         }
-        //将新数据存入redis
+        //将新数据存入redis  30分钟
         redisUtil.setCache(HEADLINE_COST_COUNT, newHeadCostCount.toString(), 60 * 30);
 
     }
@@ -109,7 +109,7 @@ public class OrderCostMonitorAlarmBySmsServiceImpl implements IOrderCostMonitorA
                 }
             }
         }
-        //将新数据存入redis
+        //将新数据存入redis  30分钟
         redisUtil.setCache(TENCENT_COST_COUNT, newTencentCostCount.toString(), 60 * 30);
     }
 
@@ -124,8 +124,8 @@ public class OrderCostMonitorAlarmBySmsServiceImpl implements IOrderCostMonitorA
         Date date = new Date();
         SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Map<String, String> params = new HashMap<>();
-        params.put("msg", content);
-        params.put("time",formatter.format(date));
+        params.put(smsProperties.getMsgParamName(), content);
+        params.put(smsProperties.getTimeParamName(),formatter.format(date));
         //存储在配置文件
         Set<String> numberList = new HashSet<>(Arrays.asList(phoneNumber.split(",")));