2 Revize aea0447cf6 ... dce0d1bc7c

Autor SHA1 Zpráva Datum
  shaohongbo dce0d1bc7c 修改日志表Integer字段为Long před 3 roky
  shaohongbo e71521acac 修改报警服务名称energy-alarm-service před 3 roky

+ 4 - 4
src/main/java/com/persagy/apm/diagnose/constant/EnumComputeLogType.java

@@ -9,19 +9,19 @@ package com.persagy.apm.diagnose.constant;
  * Update By cuixubin 2018年8月27日: 下午7:01:08
  */
 public enum EnumComputeLogType {
-	ComputeType(0, "计算日志"), SendDataType(1, "发数日志");
+	ComputeType(0L, "计算日志"), SendDataType(1L, "发数日志");
 
-	private int code;
+	private long code;
 	private String name;
 
-	public int getCode() {
+	public long getCode() {
 		return code;
 	}
 	public String getName() {
 		return name;
 	}
 
-	EnumComputeLogType(int code, String name) {
+	EnumComputeLogType(long code, String name) {
 		this.code = code;
 		this.name = name;
 	}

+ 3 - 3
src/main/java/com/persagy/apm/diagnose/indicatorrecord/service/impl/MonitorIndicatorRecordServiceImpl.java

@@ -168,7 +168,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
                 computeObjIndicatorData(projectDTO,lastComputeTime ,methodIdAndMethodDTO, objIdIndicatorId);
             }catch (Exception e){
                 IndicatorComputeLog save = new IndicatorComputeLog();
-                save.setLogInfo(e.getMessage());
+//                save.setLogInfo(e.getMessage());
                 save.setProject(projectDTO.getProjectId());
                 int indexOf = objIdIndicatorId.indexOf("_");
                 String objId = objIdIndicatorId.substring(0, indexOf);
@@ -177,7 +177,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
                 save.setObjId(objId);
                 save.setLogType(EnumComputeLogType.ComputeType.getCode());
                 save.setDataTime(lastComputeTime);
-                save.setComputeRound(projectIndicatorCompute.getComputeRound());
+                save.setComputeRound(Long.getLong(projectIndicatorCompute==null?"1":projectIndicatorCompute.getComputeRound()+""));
                 save.setLogInfo(CommonUtils.getExceptionStackTrace(e));
                 save.setLogTime(new Date());
                 coredao.save(save);
@@ -229,7 +229,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
      * @return: java.util.Set<java.lang.String>
      */
     private Set<String> getObjIdAndInfoCodeFromRules(List<AlarmRuleDTO> projectAlarmRules) {
-        Set<String> objIdAndInfoCode = new HashSet<>();
+        Set<String> objIdAndInfoCode = new HashSet<String>();
         for (AlarmRuleDTO projectAlarmRule : projectAlarmRules) {
             List<String> objIds = projectAlarmRule.getObjIds();
             if (CollectionUtils.isEmpty(objIds)) {

+ 2 - 2
src/main/java/com/persagy/framework/ems/data/pojo/hbase/IndicatorComputeLog.java

@@ -42,7 +42,7 @@ public class IndicatorComputeLog extends BusinessObject {
 
 	@Column(order = 50, name = "log_type", length = 1, nullable = false, comment = "0计算日志,1发数日志")
 	@JsonProperty("logType")
-	private Integer logType;
+	private Long logType;
 
 
 	@Column(order = 60, name = "data_time", length = 0, nullable = false, comment = "数据时间")
@@ -51,7 +51,7 @@ public class IndicatorComputeLog extends BusinessObject {
 
 	@Column(order = 70, name = "compute_round", length = 128, nullable = true, comment = "计算论次")
 	@JsonProperty("computeRound")
-	private Integer computeRound;
+	private Long computeRound;
 
 	@Column(order = 80, name = "log_info", length = 128, nullable = false, comment = "日志详情")
 	@JsonProperty("logInfo")