|
|
@@ -63,12 +63,12 @@ public class Controller extends BaseClass {
|
|
|
fagentnum = this.content.getString("fagentnum");
|
|
|
}
|
|
|
if (this.content.containsKey("hrid")) {
|
|
|
- if(content.containsKey("siteid")){
|
|
|
- System.err.println("siteid:"+content.getString("siteid"));
|
|
|
+ if (content.containsKey("siteid")) {
|
|
|
+ System.err.println("siteid:" + content.getString("siteid"));
|
|
|
}
|
|
|
|
|
|
hrid = this.content.getString("hrid").toUpperCase();
|
|
|
- siteid = content.containsKey("siteid")&&!StringUtils.isBlank(content.getString("siteid"))?content.getString("siteid"):getSiteid();
|
|
|
+ siteid = content.containsKey("siteid") && !StringUtils.isBlank(content.getString("siteid")) ? content.getString("siteid") : getSiteid();
|
|
|
usertype = getUserType();
|
|
|
}
|
|
|
if (this.content.containsKey("$classname")) {
|
|
|
@@ -78,10 +78,12 @@ public class Controller extends BaseClass {
|
|
|
$method = this.content.getString("$method");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
public PaoSetRemote getpaoset(String tablename) throws P2Exception {
|
|
|
PaoSetRemote paoSet = P2Server.getP2Server().getPaoSet(tablename, P2Server.getP2Server().getSystemUserInfo());
|
|
|
return paoSet;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 生成分页的返回数据
|
|
|
*
|
|
|
@@ -143,6 +145,16 @@ public class Controller extends BaseClass {
|
|
|
return returnObject;
|
|
|
}
|
|
|
|
|
|
+ public JSONObject getReturnObject_suc(JSONObject data, boolean issavetodatapool) {
|
|
|
+ returnObject.put("msg", "成功");
|
|
|
+ returnObject.put("code", 1);
|
|
|
+ returnObject.put("data", data);
|
|
|
+ if (issavetodatapool) {
|
|
|
+ DataPool.put(content.toString(), returnObject);
|
|
|
+ }
|
|
|
+ return returnObject;
|
|
|
+ }
|
|
|
+
|
|
|
public JSONObject getReturnObject_suc(Row data, boolean issavetodatapool) {
|
|
|
returnObject.put("msg", "成功");
|
|
|
returnObject.put("code", 1);
|
|
|
@@ -218,7 +230,7 @@ public class Controller extends BaseClass {
|
|
|
* 执行请求方法
|
|
|
*/
|
|
|
if (parameter.isdebug) {
|
|
|
- printInfoOut("缓存测试", "正在预加载数据:" + content,false);
|
|
|
+ printInfoOut("缓存测试", "正在预加载数据:" + content, false);
|
|
|
}
|
|
|
Class clz = Class.forName("openapi.restcontroller." + $classname);
|
|
|
Constructor cla = clz.getDeclaredConstructor(JSONObject.class);
|
|
|
@@ -230,7 +242,7 @@ public class Controller extends BaseClass {
|
|
|
}
|
|
|
} else {
|
|
|
if (parameter.isdebug) {
|
|
|
- printInfoOut("缓存测试", "预加载数据已在缓存中:" + content,false);
|
|
|
+ printInfoOut("缓存测试", "预加载数据已在缓存中:" + content, false);
|
|
|
}
|
|
|
}
|
|
|
}
|