Commit 195cebf8 by 兰国旗

laolan

parent 6ac62af6
......@@ -20,12 +20,9 @@ class MediaaggregationDao extends Dao {
};
var countSql = "select count(1) as dataCount from mc_product where deleted_at is null and product_type_code = :product_type_code and is_enabled = 1 order by sequence desc";
var sql = "select * from mc_product where deleted_at is null and product_type_code = :product_type_code and is_enabled = 1 order by sequence desc";
// var optionType = "get";
var optionType = "get";
var functionName = "productList";
//删除
var optionType = "del";
var returnRes = this.redisInfo(sql, countSql, optionType, functionName, params);
// var returnRes = this.redisInfo(sql, countSql, optionType, functionName, params);
return returnRes;
}
......@@ -287,19 +284,15 @@ class MediaaggregationDao extends Dao {
rtnObj.total = dataCount && dataCount.length > 0 ? dataCount[0].dataCount : 0;
return rtnObj;
} else {
rtnObj.rows = JSON.parse(list);
rtnObj.total = dataCount && dataCount.length > 0 ? dataCount[0].dataCount : 0;
await this.redisClient.set(shaStr, JSON.stringify(rtnObj));
rtn = await this.redisClient.get(shaStr);
if (rtn) {
rtnObj.rows = JSON.parse(rtn);
rtnObj.total = dataCount && dataCount.length > 0 ? dataCount[0].dataCount : 0;
return rtnObj;
}
}
}
if (optionType == "del") {
var res = await this.redisClient.delete(shaStr);
return res;
}
}
}
module.exports = MediaaggregationDao;
\ No newline at end of file
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