-
-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from erupts/develop
1.12.16
- Loading branch information
Showing
261 changed files
with
639 additions
and
40,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 32 additions & 3 deletions
35
erupt-core/src/main/java/xyz/erupt/core/invoke/DataProxyContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,52 @@ | ||
package xyz.erupt.core.invoke; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import xyz.erupt.core.view.EruptModel; | ||
|
||
/** | ||
* @author YuePeng | ||
* date 2024/6/29 15:38 | ||
*/ | ||
public class DataProxyContext { | ||
|
||
private static final ThreadLocal<String[]> PRE_DATA_PROXY_THREADLOCAL = new ThreadLocal<>(); | ||
private static final ThreadLocal<Data> PRE_DATA_PROXY_THREADLOCAL = new ThreadLocal<>(); | ||
|
||
public static String[] params() { | ||
return get().getParams(); | ||
} | ||
|
||
public static Class<?> currentClass() { | ||
return get().getEruptModel().getClazz(); | ||
} | ||
|
||
public static Data get() { | ||
return PRE_DATA_PROXY_THREADLOCAL.get(); | ||
} | ||
|
||
static void set(String[] params) { | ||
PRE_DATA_PROXY_THREADLOCAL.set(params); | ||
static void set(Data data) { | ||
PRE_DATA_PROXY_THREADLOCAL.set(data); | ||
} | ||
|
||
static void remove() { | ||
PRE_DATA_PROXY_THREADLOCAL.remove(); | ||
} | ||
|
||
@Getter | ||
@Setter | ||
public static class Data { | ||
|
||
private EruptModel eruptModel; | ||
|
||
private String[] params; | ||
|
||
public Data(EruptModel eruptModel, String[] params) { | ||
this.eruptModel = eruptModel; | ||
this.params = params; | ||
} | ||
|
||
public Data() { | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,6 @@ public class MetaUserinfo { | |
|
||
private List<String> roles; //角色列表 | ||
|
||
private String tenantId; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.