|
@@ -8,6 +8,7 @@ import com.persagy.dmp.starter.alarm.feign.AlarmUrlParam;
|
|
|
import com.persagy.dmp.starter.alarm.feign.DmpResult;
|
|
|
import com.persagy.dmp.starter.alarm.feign.client.AlarmClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -140,7 +141,12 @@ public abstract class NettyAlarmService extends BaseService {
|
|
|
* @version: V1.0
|
|
|
*/
|
|
|
public String getAlarmLevel(JSONObject data) {
|
|
|
- return data == null ? "" : data.getString("level");
|
|
|
+
|
|
|
+ String defaultValue = "3";
|
|
|
+ if (data != null && StringUtils.isNotBlank(data.getString("level"))) {
|
|
|
+ return data.getString("level");
|
|
|
+ }
|
|
|
+ return defaultValue;
|
|
|
}
|
|
|
|
|
|
|