wechat query command

This commit is contained in:
Sola
2015-12-08 23:10:22 +08:00
parent b0ba46cc77
commit 2a062e4008
10 changed files with 161 additions and 46 deletions

View File

@@ -5,8 +5,6 @@ import lombok.AllArgsConstructor;
import java.util.HashMap;
import java.util.Map;
import static love.sola.netsupport.config.Lang.lang;
/**
* ***********************************************
* Created by Sola on 2015/11/5.
@@ -26,7 +24,7 @@ public class Response {
public Response(ResponseCode code, Object result) {
this.code = code.id;
this.info = code.info;
this.info = code.name();
this.result = result;
}
@@ -54,11 +52,9 @@ public class Response {
}
}
public final String info;
public final int id;
ResponseCode(int id) {
this.info = lang("RC_" + name());
this.id = id;
}
@@ -68,7 +64,7 @@ public class Response {
@Override
public String toString() {
return info;
return name();
}
}

View File

@@ -38,6 +38,10 @@ public class TestPost extends HttpServlet {
for (Map.Entry<String, String[]> entry : request.getParameterMap().entrySet()) {
out.println(entry.getKey() + ": " + Arrays.toString(entry.getValue()));
}
Integer i = (Integer) request.getSession().getAttribute("ReqCount");
i = i == null ? 0 : i;
request.getSession().setAttribute("ReqCount", i + 1);
out.println("ReqCount = " + i);
out.close();
}