Commit fbdec685 by 庄冰

aaa

parent be967f57
...@@ -41,21 +41,21 @@ class APIBase { ...@@ -41,21 +41,21 @@ class APIBase {
try { try {
var shaStr = await sha256(JSON.stringify(pobj)); var shaStr = await sha256(JSON.stringify(pobj));
//查询缓存 //查询缓存
if (pobj && pobj.actionType && this.queryAction.indexOf(pobj.actionType) >= 0) { // if (pobj && pobj.actionType && this.queryAction.indexOf(pobj.actionType) >= 0) {
var cacheRes = await this.redisClient.get(shaStr); // var cacheRes = await this.redisClient.get(shaStr);
if (cacheRes) { // if (cacheRes) {
// return JSON.parse(cacheRes); // return JSON.parse(cacheRes);
} // }
} // }
let xarg = await this.setContextParams(pobj, query, req); let xarg = await this.setContextParams(pobj, query, req);
if (xarg && xarg[0] < 0) { if (xarg && xarg[0] < 0) {
return system.getResultFail(...xarg); return system.getResultFail(...xarg);
} }
var rtn = await this[methodname](pobj, query, req); var rtn = await this[methodname](pobj, query, req);
this.logClient.log(pobj, req, rtn); this.logClient.log(pobj, req, rtn);
if(rtn && rtn.status==0){ // if(rtn && rtn.status==0){
await this.redisClient.setWithEx(shaStr, JSON.stringify(rtn), 300); // await this.redisClient.setWithEx(shaStr, JSON.stringify(rtn), 30);
} // }
return rtn; return rtn;
} catch (e) { } catch (e) {
this.logClient.log(pobj, req, null, e.stack); this.logClient.log(pobj, req, null, e.stack);
......
...@@ -39,6 +39,8 @@ class Template extends APIBase { ...@@ -39,6 +39,8 @@ class Template extends APIBase {
opResult = await this.templateinfoSve.getTemplateInfoByCode(pobj); opResult = await this.templateinfoSve.getTemplateInfoByCode(pobj);
break; break;
case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息 case "getTemplateAndLinkInfo"://根据链接参数获取模板链接信息
console.log("getTemplateAndLinkInfo+++++++++++++++++++++++++++");
console.log(JSON.stringify(pobj));
opResult = await this.templatelinkSve.getTemplateAndLinkInfo2(pobj); opResult = await this.templatelinkSve.getTemplateAndLinkInfo2(pobj);
break; break;
case "submitFormRecord"://提交表单记录 case "submitFormRecord"://提交表单记录
......
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