Commit 5283b29f by chenjinjing

no message

parent 90df5b8a
...@@ -22,6 +22,7 @@ import { BizError } from "../../util/bizError"; ...@@ -22,6 +22,7 @@ import { BizError } from "../../util/bizError";
function analysisParamToWhere(param, column) { function analysisParamToWhere(param, column) {
let where = {}; let where = {};
let order = []; let order = [];
let group = "";
let limit = 0; let limit = 0;
for (let key in param) { for (let key in param) {
if (typeof param[key] == "object") { if (typeof param[key] == "object") {
...@@ -68,6 +69,9 @@ function analysisParamToWhere(param, column) { ...@@ -68,6 +69,9 @@ function analysisParamToWhere(param, column) {
case "%limit%": case "%limit%":
limit = param[key]; limit = param[key];
break; break;
case "%group%":
group = param[key];
break;
default: where[key] = param[key]; default: where[key] = param[key];
} }
} }
...@@ -77,6 +81,7 @@ function analysisParamToWhere(param, column) { ...@@ -77,6 +81,7 @@ function analysisParamToWhere(param, column) {
if (column && column.length) selectParam.attributes = column; if (column && column.length) selectParam.attributes = column;
if (order && order.length) selectParam.order = order; if (order && order.length) selectParam.order = order;
if (limit) selectParam.limit = limit; if (limit) selectParam.limit = limit;
if (group) selectParam.group = group;
return selectParam; return selectParam;
} }
......
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