feat: 去掉返回的stacks
This commit is contained in:
parent
b6bed4d225
commit
7d531ac876
@ -1,6 +1,5 @@
|
|||||||
package cn.axzo.foundation.result;
|
package cn.axzo.foundation.result;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@ -27,8 +26,6 @@ public class ApiResult<T> {
|
|||||||
|
|
||||||
protected T data;
|
protected T data;
|
||||||
|
|
||||||
protected JSONObject stacks;
|
|
||||||
|
|
||||||
public static <T> ApiResult<T> success() {
|
public static <T> ApiResult<T> success() {
|
||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
@ -74,12 +71,6 @@ public class ApiResult<T> {
|
|||||||
return SUCCESS_CODE.equals(getCode());
|
return SUCCESS_CODE.equals(getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ApiResult<T> setStacks(JSONObject stacks) {
|
|
||||||
this.stacks = stacks;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据appId 获取标准的code
|
* 根据appId 获取标准的code
|
||||||
* 如果code > 100000 则认为可能已经带了appId
|
* 如果code > 100000 则认为可能已经带了appId
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import com.google.common.collect.Multimaps;
|
|||||||
import com.google.common.util.concurrent.RateLimiter;
|
import com.google.common.util.concurrent.RateLimiter;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -74,6 +75,9 @@ public class AlertClientImpl implements AlertClient {
|
|||||||
|
|
||||||
private void consume() {
|
private void consume() {
|
||||||
Map<AlertKey, Collection<AlertMessage>> map = alertsMap.asMap();
|
Map<AlertKey, Collection<AlertMessage>> map = alertsMap.asMap();
|
||||||
|
if (CollectionUtils.isEmpty(map)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
consumer.accept(map);
|
consumer.accept(map);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user