Procházet zdrojové kódy

公共代码执行错误bug修复

沈静伟 před 3 roky
rodič
revize
d3d75171d4

+ 4 - 3
src/dsb/com/cnd3b/common/Controller.java

@@ -71,10 +71,10 @@ public class Controller extends BaseClass {
         returnObject = new D3BReturnObject(this);
         donotpreloading = content.containsKey("donotpreloading") && content.getBoolean("donotpreloading");
         this.content.remove("donotpreloading");
-
         if (this.content.containsKey("pageNumber")) {
             pageNumber = this.content.getIntValue("pageNumber");
         }
+
         if (this.content.containsKey("pageSize")) {
             pageSize = this.content.getIntValue("pageSize");
         }
@@ -87,12 +87,13 @@ public class Controller extends BaseClass {
         if (this.content.containsKey("$requestHost")) {
             hostipport = this.content.getString("$requestHost");
         }
-
         if (this.content.containsKey("userid")) {
             userid = this.content.getLongValue("userid");
         } else if (this.content.containsKey("$accesstoken")) {
             $accesstoken = this.content.getString("$accesstoken");
-            userid = parameter.tokenlist.get($accesstoken);
+            if(parameter.tokenlist.containsKey($accesstoken)){
+                userid = parameter.tokenlist.get($accesstoken);
+            }
         }
         if (parameter.userIdList.containsKey(userid)) {
             Row row = parameter.userIdList.get(userid);

+ 0 - 1
src/dsb/com/cnd3b/common/restful/WebClientRest.java

@@ -132,7 +132,6 @@ public class WebClientRest {
                 /**
                  * Ö´ĐĐÇëÇ󡽡¨
                  */
-
                 Class clz = Class.forName("com.cnd3b.restcontroller." + className);
                 Constructor cla = clz.getDeclaredConstructor(JSONObject.class);
                 obj = cla.newInstance(content);