Commit 63c5ac40 by s_guodong

保存渠道类型

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