Commit fbdec685 by 庄冰

aaa

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