From b69dd0117635541da7ab37457608e32a5068f488 Mon Sep 17 00:00:00 2001 From: hugh Date: Wed, 21 Apr 2021 14:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 1 + .../tptj/demo/hg/request/interceptor/ReplaceDemo.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index 4f5d9d4..2a67956 100644 --- a/plugin.xml +++ b/plugin.xml @@ -11,6 +11,7 @@ com.tptj.demo.hg.request.interceptor + diff --git a/src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java b/src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java index 36f7f73..a2b6e62 100644 --- a/src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java +++ b/src/main/java/com/tptj/demo/hg/request/interceptor/ReplaceDemo.java @@ -5,6 +5,7 @@ import com.fanruan.api.net.NetworkKit; import com.fr.intelli.record.Focus; import com.fr.record.analyzer.EnableMetrics; import com.fr.report.enhancement.engine.write.service.action.EvaluateFormulaAction; +import com.fr.web.utils.WebUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -22,11 +23,16 @@ public class ReplaceDemo extends EvaluateFormulaAction { } @Override - @Focus(id="com.tptj.demo.hg.request.interceptor.v10",text = "cmd接口拦截") public void actionCMD(HttpServletRequest req, HttpServletResponse res) throws Exception { + actionCMD(req,res, WebUtils.getHTTPRequestParameter(req,"sessionID")); + } + + @Override + @Focus(id="com.tptj.demo.hg.request.interceptor.v10",text = "cmd接口拦截") + public void actionCMD(HttpServletRequest req, HttpServletResponse res, String sessionID)throws Exception{ String expression = NetworkKit.getHTTPRequestParameter(req,"expression"); LogKit.info("Evaluate Formula Starting: {}",expression); - super.actionCMD(req,res); + super.actionCMD(req,res,sessionID); LogKit.info("Evaluate Formula Ended: {}",expression); } }