Commit 597af8c2 authored by yanzg's avatar yanzg

不记录系统日志

parent 6bc18684
...@@ -87,6 +87,30 @@ public class ArrayHelper { ...@@ -87,6 +87,30 @@ public class ArrayHelper {
return list; return list;
} }
/**
* 将数组添加到列表中
*
* @param from
* @param <T>
*/
public static final <T extends Object> List<T> mergeList(T[]... from) {
List<T> list = new ArrayList<>();
addList(list, from);
return list;
}
/**
* 将数组添加到列表中
*
* @param from
* @param <T>
*/
public static final <T extends Object> List<T> mergeList(List<T>... from) {
List<T> list = new ArrayList<>();
addList(list, from);
return list;
}
/** /**
* 将数组添加到列表中 * 将数组添加到列表中
* *
......
...@@ -300,37 +300,21 @@ public class BaseRequestAspect { ...@@ -300,37 +300,21 @@ public class BaseRequestAspect {
if (feignClient != null) { if (feignClient != null) {
sb.append(feignClient.value()); sb.append(feignClient.value());
} }
if (classRequests != null) { List<RequestMapping> reqList = ArrayHelper.mergeList(classRequests, requests);
for (RequestMapping item : classRequests) { List<PostMapping> postList = ArrayHelper.mergeList(classPosts, posts);
List<GetMapping> getList = ArrayHelper.mergeList(classGets, gets);
for (RequestMapping item : reqList) {
if (item.value() != null && item.value().length > 0) {
sb.append(item.value()[0]); sb.append(item.value()[0]);
} }
} }
if (classPosts != null) { for (PostMapping item : postList) {
for (PostMapping item : classPosts) { if (item.value() != null && item.value().length > 0) {
sb.append(item.value()[0]); sb.append(item.value()[0]);
} }
} }
for (GetMapping item : getList) {
if (classGets != null) { if (item.value() != null && item.value().length > 0) {
for (GetMapping item : classGets) {
sb.append(item.value()[0]);
}
}
if (requests != null) {
for (RequestMapping item : requests) {
sb.append(item.value()[0]);
}
}
if (posts != null) {
for (PostMapping item : posts) {
sb.append(item.value()[0]);
}
}
if (gets != null) {
for (GetMapping item : gets) {
sb.append(item.value()[0]); sb.append(item.value()[0]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment