doomiwork 2.9.3 → 2.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doomiwork",
3
- "version": "2.9.3",
3
+ "version": "2.9.4",
4
4
  "description": "doomisoft nodejs web framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,10 +32,11 @@ class RequestParser {
32
32
  let keyValue =utility.ifNull(keyParse.parseKeyValue(req,ele.substring(1,ele.length-1)),'');
33
33
  if(keyValue=='') {
34
34
  parseKeyWordIsNull = true;
35
- }else{
35
+ }else if (typeof(keyValue)==='string'){
36
36
  keyValue = mysql.escape(keyValue)
37
37
  keyValue = keyValue.substr(1, keyValue.length - 2)
38
38
  }
39
+
39
40
  sql=sql.replace(ele,keyValue);
40
41
  });
41
42
  if (!allowNull && parseKeyWordIsNull) return '';
@@ -107,28 +108,6 @@ class RequestParser {
107
108
  this.parseAndReplaceSql(req,countsql),
108
109
  req.searchCondition)+';'
109
110
  }
110
- // switch (req.sqltype) {
111
- // case 'sql':
112
- // ///客户端调用时是否传递一些 特殊的过滤方式
113
- // req.listSql =this.parseAndReplaceSql(req,req.dataConfig.list.sql) +
114
- // ' ' + req.searchCondition + clientFilter +
115
- // (utility.isNullOrEmpty(req.sort) ? '' : (' order by ' + (req.sort+' '+req.order))) +
116
- // (export2Excel?'':' limit ' + req.pageSize + ' OFFSET ' + (req.page - 1) * req.pageSize) +
117
- // /////在Sql中再放入获取总记录数的语句
118
- // ';SELECT FOUND_ROWS() AS total;';
119
- // if (req.dataConfig.list.countsql){
120
- // req.countSql = this.appendSearchCondition2Count(
121
- // this.parseAndReplaceSql(req,req.dataConfig.list.countsql),
122
- // req.searchCondition
123
- // )
124
- // req.listSql+=req.countSql +';';
125
- // }
126
- // break;
127
- // ////来自DAO对象的属性
128
- // ////一般较复杂的SQL写在DAO对象的constantSql属性中
129
- // case 'property':
130
- // break;
131
- // }
132
111
  }
133
112
  }
134
113
  }