Browse Source

增加一个重载方法

lixing 2 years ago
parent
commit
a15c3c4b89

+ 8 - 0
apm-common/src/main/java/com/persagy/apm/common/context/poems/PoemsContext.java

@@ -24,6 +24,14 @@ public class PoemsContext {
         poemsContextContent.setProjectId(projectId);
     }
 
+    public static void setContext(String userId, String loginDevice, String pd) {
+        PoemsContextContent poemsContextContent = getContext();
+
+        poemsContextContent.setUserId(userId);
+        poemsContextContent.setLoginDevice(loginDevice);
+        poemsContextContent.setPd(pd);
+    }
+
     public static void setContext(PoemsContextContent poemsContextContent) {
         if (poemsContextContent == null) {
             poemsContextContent = new PoemsContextContent();