feat: 去掉返回的stacks

This commit is contained in:
zengxiaobo 2024-07-05 17:38:27 +08:00
parent b6bed4d225
commit 7d531ac876
2 changed files with 4 additions and 9 deletions

View File

@ -1,6 +1,5 @@
package cn.axzo.foundation.result;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.Strings;
import lombok.AllArgsConstructor;
@ -27,8 +26,6 @@ public class ApiResult<T> {
protected T data;
protected JSONObject stacks;
public static <T> ApiResult<T> success() {
return success(null);
}
@ -74,12 +71,6 @@ public class ApiResult<T> {
return SUCCESS_CODE.equals(getCode());
}
public ApiResult<T> setStacks(JSONObject stacks) {
this.stacks = stacks;
return this;
}
/**
* 根据appId 获取标准的code
* 如果code > 100000 则认为可能已经带了appId

View File

@ -6,6 +6,7 @@ import com.google.common.collect.Multimaps;
import com.google.common.util.concurrent.RateLimiter;
import lombok.Builder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.util.Collection;
@ -74,6 +75,9 @@ public class AlertClientImpl implements AlertClient {
private void consume() {
Map<AlertKey, Collection<AlertMessage>> map = alertsMap.asMap();
if (CollectionUtils.isEmpty(map)) {
return;
}
try {
consumer.accept(map);
} catch (Exception ex) {