diff --git a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/res/layout/query_activity.xml b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/res/layout/query_activity.xml
index 46cad86a..7e70465b 100644
--- a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/res/layout/query_activity.xml
+++ b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/res/layout/query_activity.xml
@@ -43,7 +43,7 @@
diff --git a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/RequestUtil.java b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/RequestUtil.java
index b6193f16..efd442d4 100644
--- a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/RequestUtil.java
+++ b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/RequestUtil.java
@@ -96,15 +96,15 @@ public class RequestUtil {
}
public static JSONObject newAccessErrorRequest(long id) {
- return new JSONRequest(new Wallet().setUserId(id <= 0 ? 38710 : id));
+ return new JSONRequest(new Wallet().setUserId(id <= 0 ? 38710 : id)).setTag(Wallet.class.getSimpleName());
}
public static JSONObject newAccessPermittedRequest(long id) {
JSONRequest request = new JSONRequest();
request.put(new Wallet().setUserId(id <= 0 ? 38710 : id));
request.put("currentUserId", 38710);
- request.put("payPassword", "123456");
- return request;
+ request.put("loginPassword", "apijson");
+ return request.setTag(Wallet.class.getSimpleName());
}
}
diff --git a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/ui/QueryActivity.java b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/ui/QueryActivity.java
index b5ba1db0..ebb16de1 100644
--- a/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/ui/QueryActivity.java
+++ b/APIJSON(Android)/APIJSON(ADT)/APIJSONDemoApp/src/apijson/demo/ui/QueryActivity.java
@@ -88,8 +88,8 @@ public class QueryActivity extends Activity implements OnHttpResponseListener {
public static final int TYPE_RELY = 12;
public static final int TYPE_ARRAY = 13;
public static final int TYPE_COMPLEX = 14;
- public static final int TYPE_ACCESS_ERROR = 15;
- public static final int TYPE_ACCESS_PERMITTED = 16;
+ public static final int TYPE_ACCESS_ERROR = 5;
+ public static final int TYPE_ACCESS_PERMITTED = 6;
@@ -217,6 +217,9 @@ public class QueryActivity extends Activity implements OnHttpResponseListener {
return "put";
case TYPE_DELETE:
return "delete";
+ case TYPE_ACCESS_ERROR:
+ case TYPE_ACCESS_PERMITTED:
+ return "post_get";
default:
return "get";
}
diff --git a/APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/sql/AccessVerifier.java b/APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/sql/AccessVerifier.java
index b8af0f19..7dc39185 100644
--- a/APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/sql/AccessVerifier.java
+++ b/APIJSON(Server)/APIJSON(Eclipse_JEE)/src/main/java/zuo/biao/apijson/server/sql/AccessVerifier.java
@@ -35,9 +35,12 @@ public class AccessVerifier {
private static Map accessMap;
+ /**初始化,建议在Applicaiton的onCreate方法中调用
+ */
public static void init() {
accessMap = new HashMap();
accessMap.put("User", RequestMethod.values());
+ accessMap.put("Work", RequestMethod.values());
accessMap.put("Moment", RequestMethod.values());
accessMap.put("Comment", RequestMethod.values());
accessMap.put("Wallet", new RequestMethod[]{POST_GET, POST, PUT, DELETE});
@@ -184,7 +187,7 @@ public class AccessVerifier {
*/
public static String getLoginPassword(long userId) {
// TODO 查询并返回对应userId的登录密码
- return "apijson123";//仅测试用
+ return "apijson";//仅测试用
}
/**获取支付密码