Commit 63c5ac40 by s_guodong

保存渠道类型

parent 985dcfda
...@@ -7,6 +7,8 @@ import java.util.Locale; ...@@ -7,6 +7,8 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
public interface IContext extends Serializable { public interface IContext extends Serializable {
String APP_KEY = "APP_ID";
String DISPLAY_KEY = "DISPLAY_KEY"; String DISPLAY_KEY = "DISPLAY_KEY";
String getTransName(); String getTransName();
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class BaseVO { public class BaseVO {
protected String src;
protected boolean needInit; protected boolean needInit;
protected String pageId; protected String pageId;
protected Map<String, Object> params; protected Map<String, Object> params;
...@@ -61,4 +62,12 @@ public class BaseVO { ...@@ -61,4 +62,12 @@ public class BaseVO {
public void setNeedInit(boolean needInit) { public void setNeedInit(boolean needInit) {
this.needInit = needInit; this.needInit = needInit;
} }
public String getSrc() {
return src;
}
public void setSrc(String src) {
this.src = src;
}
} }
...@@ -101,7 +101,7 @@ public abstract class AbstractRouteService<V extends BaseVO> { ...@@ -101,7 +101,7 @@ public abstract class AbstractRouteService<V extends BaseVO> {
Map<String, Object> params = null; Map<String, Object> params = null;
if (req != null) { if (req != null) {
params = req.getParams(); params = req.getParams();
if(!MdaUtils.isEmpty(params)) { if (!MdaUtils.isEmpty(params)) {
if (req.getParams().containsKey("trn")) { if (req.getParams().containsKey("trn")) {
return new ResponseSet<V>(req); return new ResponseSet<V>(req);
} }
...@@ -461,10 +461,12 @@ public abstract class AbstractRouteService<V extends BaseVO> { ...@@ -461,10 +461,12 @@ public abstract class AbstractRouteService<V extends BaseVO> {
public boolean enterTransaction(V req) { public boolean enterTransaction(V req) {
if (req != null) { if (req != null) {
IContext ctx = MdaEnv.getContext();
String src = req.getSrc();
ctx.storeData(IContext.APP_KEY, src);
Map<String, Object> params = req.getParams(); Map<String, Object> params = req.getParams();
chain(params); chain(params);
initTrans(req); initTrans(req);
IContext ctx = MdaEnv.getContext();
ctx.storeData(IContext.DISPLAY_KEY, req); ctx.storeData(IContext.DISPLAY_KEY, req);
} }
return true; return true;
......
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