浏览代码

增加一个重载方法

lixing 2 年之前
父节点
当前提交
a15c3c4b89
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      apm-common/src/main/java/com/persagy/apm/common/context/poems/PoemsContext.java

+ 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();