@byted-apaas/server-sdk-node 1.1.14-beta.2 → 1.1.14
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.
|
@@ -535,6 +535,10 @@ class _KQuery {
|
|
|
535
535
|
selectFields = queryBuilder.getSelect();
|
|
536
536
|
orders = queryBuilder.getOrder();
|
|
537
537
|
}
|
|
538
|
+
// 当用户未设置排序字段时,强制指定为主键增序,避免数据重复
|
|
539
|
+
if (!orders || orders.length === 0) {
|
|
540
|
+
orders = [{ field: '_id', direction: 'asc', type: '' }];
|
|
541
|
+
}
|
|
538
542
|
let maxId = 0, queryCount = 0;
|
|
539
543
|
for (let i = offset; !limit || i < offset + limit; i += queryBuilder_1.defaultLimit) {
|
|
540
544
|
let newLimit = function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byted-apaas/server-sdk-node",
|
|
3
|
-
"version": "1.1.14
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"description": "aPaaS Server SDK",
|
|
5
5
|
"author": "zhouwexin <zhouwexin@bytedance.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "tsc --build --clean && rm -rf **/*.js.map"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@byted-apaas/server-common-node": "^2.0.2
|
|
16
|
+
"@byted-apaas/server-common-node": "^2.0.2",
|
|
17
17
|
"@jorgeferrero/stream-to-buffer": "^2.0.6",
|
|
18
18
|
"dayjs": "^1.9.6",
|
|
19
19
|
"form-data": "^3.0.0",
|
package/request/openapi.js
CHANGED
|
@@ -11,6 +11,7 @@ const constants_3 = require("@byted-apaas/server-common-node/constants/constants
|
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const utils_1 = require("@byted-apaas/server-common-node/utils/utils");
|
|
13
13
|
const permissionUtils = require("@byted-apaas/server-common-node/utils/permissionUtils");
|
|
14
|
+
const { URLSearchParams } = require('url');
|
|
14
15
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
15
16
|
const nodeCls = require('node-cls'); //nolint:byted_s_ts_no_require_imports
|
|
16
17
|
const fs = require('fs');
|
|
@@ -977,18 +978,14 @@ class RequestHttp {
|
|
|
977
978
|
let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.getApprovalInstance);
|
|
978
979
|
let urlPath = options._reqPath.replace(replaceKeys.id, String(params.approvalInstanceId));
|
|
979
980
|
// 设置参数
|
|
980
|
-
const searchParams =
|
|
981
|
-
includes: "",
|
|
982
|
-
};
|
|
983
|
-
const includes = [];
|
|
981
|
+
const searchParams = new URLSearchParams();
|
|
984
982
|
if (params && params.includeContent) {
|
|
985
|
-
|
|
983
|
+
searchParams.append('includes', 'ApprovalComment_Content');
|
|
986
984
|
}
|
|
987
985
|
if (params && params.includeFormData) {
|
|
988
|
-
|
|
986
|
+
searchParams.append('includes', 'ApprovalTask_FormData');
|
|
989
987
|
}
|
|
990
|
-
|
|
991
|
-
options.searchParams = searchParams;
|
|
988
|
+
urlPath = urlPath + '?' + searchParams.toString();
|
|
992
989
|
// 发起请求
|
|
993
990
|
let resp = await openapi.doRequest(null, urlPath, options);
|
|
994
991
|
if (!resp || !resp.approval_instance) {
|