Commit 08627a53 by 兰国旗

laolan

parents 6f265110 ca96fd35
......@@ -259,7 +259,7 @@ class MediaaggregationDao extends Dao {
}
async redisInfo(sql, countSql, optionType, functionName, params = "") {
async redisInfo(sql, countSql, optionType, functionName, params = {}) {
var template = "mediaaggregation";
let shaStr; // 将linkObj转为字符串并计算出sha256的值
let rtn; // 根据shaStr从redis库中查询返回的值。
......@@ -269,8 +269,8 @@ class MediaaggregationDao extends Dao {
};
// shaStr = await sha256(JSON.stringify(params));
// shaStr = template + "_" + shaStr + "_" + functionName;
shaStr = template + "_" + params + "_" + functionName;
rtn = await this.redisClient.get(shaStr);
shaStr = template + "_" + functionName;
// rtn = await this.redisClient.get(shaStr);
if (params) {
var list = await this.customQuery(sql, params);
var dataCount = await this.customQuery(countSql, params);
......@@ -280,7 +280,8 @@ class MediaaggregationDao extends Dao {
}
if (optionType == "get") {
if (rtn) {
rtnObj = JSON.parse(rtn);
rtnObj.rows = JSON.parse(rtn);
rtnObj.total = dataCount && dataCount.length > 0 ? dataCount[0].dataCount : 0;
return rtnObj;
} else {
rtnObj.rows = list;
......
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