doomiwork 4.1.0 → 4.1.1
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/core/controller.js +2 -2
- package/package.json +1 -1
- package/utilities/requestparser.js +1 -1
package/core/controller.js
CHANGED
|
@@ -227,11 +227,11 @@ class controller {
|
|
|
227
227
|
/*
|
|
228
228
|
* 获取详细记录的方法
|
|
229
229
|
*/
|
|
230
|
-
async getDataById(req, dataKey, sqlCommand) {
|
|
230
|
+
async getDataById(req, dataKey, sqlCommand,idValue) {
|
|
231
231
|
if (this.logger) this.logger.trace("准备获取dataconfig文件中对应的 %s 详细数据",dataKey)
|
|
232
232
|
const detailinfo = getDetailInfo(req, dataKey);
|
|
233
233
|
if (!detailinfo) return { successed: false, errcode: -10, errmsg: `缺失${dataKey}对应的详情配置` };
|
|
234
|
-
let beforeData = await this.beforeAccessDB(req, sqlCommand || this._daoModel.getByIdSql(), req.params.id, "detail", this);
|
|
234
|
+
let beforeData = await this.beforeAccessDB(req, sqlCommand || this._daoModel.getByIdSql(), idValue ||req.params.id, "detail", this);
|
|
235
235
|
////如果返回Null,则表示不加载数据了
|
|
236
236
|
if (beforeData.canceled===true) return { successed: false, errorcode: 1, errormessage: "操作已取消" };
|
|
237
237
|
/////处理SQL中的一些定义符
|
package/package.json
CHANGED
|
@@ -108,7 +108,7 @@ module.exports.getListInfo = (req, dataKey, cfgType = 0, dao) => {
|
|
|
108
108
|
// 防止页面数据传入非数字
|
|
109
109
|
if (!page || isNaN(page)) page = 1
|
|
110
110
|
///最大允许获取100条数据
|
|
111
|
-
pageSize = Math.min(pageSize,
|
|
111
|
+
pageSize = Math.min(pageSize, 10000);
|
|
112
112
|
///拼接排序的语句
|
|
113
113
|
if (order && sort && ORDER_STRING.includes(order.toLowerCase())) sort = sort + ' ' + order
|
|
114
114
|
//req.order =req.sort? utility.ifNull((req.body.order || req.query.order), ""):'';
|