xzwebx-httpfilter 2.2.8 → 2.2.9
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/HttpFilter.js +31 -2
- package/package.json +4 -4
package/HttpFilter.js
CHANGED
|
@@ -177,10 +177,37 @@ class http {
|
|
|
177
177
|
continue
|
|
178
178
|
}
|
|
179
179
|
let fatherFieldType = fCfgItem.fieldType
|
|
180
|
+
|
|
181
|
+
if (fCfgItem.isRecursed) {
|
|
182
|
+
if (fatherFieldType === 'LIST') {
|
|
183
|
+
for (let key in msgFieldMap) {
|
|
184
|
+
if (key == '__FieldCfg') {
|
|
185
|
+
continue
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (!msgFieldMap[key]['__FieldCfg'] || msgFieldMap[key]['__FieldCfg'].fieldType !== 'OBJ') {
|
|
189
|
+
continue
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (!msgFieldMap[key][fCfgItem.fieldCode]) {
|
|
193
|
+
let msgFieldMap1 = JSON.parse(JSON.stringify(msgFieldMap))
|
|
194
|
+
msgFieldMap1['__FieldCfg'].ifMust = 'NO'
|
|
195
|
+
msgFieldMap[key][fCfgItem.fieldCode] = msgFieldMap1
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
} else if (fatherFieldType === 'OBJ') {
|
|
199
|
+
if (!msgFieldMap[fCfgItem.fieldCode]) {
|
|
200
|
+
let msgFieldMap1 = JSON.parse(JSON.stringify(msgFieldMap))
|
|
201
|
+
msgFieldMap1['__FieldCfg'].ifMust = 'NO'
|
|
202
|
+
msgFieldMap[fCfgItem.fieldCode] = msgFieldMap1
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
180
207
|
if (fatherFieldType == 'LIST' || (fatherFieldType == 'OBJ' && fCfgItem.keyType == 'VOBJ')) {
|
|
181
208
|
if (isRoot) {
|
|
182
209
|
retMsgData = this.cycleCheckParams(msgFieldMap[fieldName], data)
|
|
183
|
-
} else {
|
|
210
|
+
} else if (data) {
|
|
184
211
|
for (let idx in data) {
|
|
185
212
|
retMsgData = this.cycleCheckParams(msgFieldMap[fieldName], data[idx])
|
|
186
213
|
if (retMsgData) {
|
|
@@ -192,7 +219,9 @@ class http {
|
|
|
192
219
|
if (isRoot) {
|
|
193
220
|
retMsgData = this.cycleCheckParams(msgFieldMap[fieldName], data)
|
|
194
221
|
} else {
|
|
195
|
-
|
|
222
|
+
if (data) {
|
|
223
|
+
retMsgData = this.cycleCheckParams(msgFieldMap[fieldName], data[fieldName])
|
|
224
|
+
}
|
|
196
225
|
}
|
|
197
226
|
}
|
|
198
227
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xzwebx-httpfilter",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
4
|
"main": "HttpFilter.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
],
|
|
13
13
|
"author": "xzwebx",
|
|
14
14
|
"license": "ISC",
|
|
15
|
-
"
|
|
16
|
-
"publishConfig": {
|
|
15
|
+
"publishConfig": {
|
|
17
16
|
"registry": "https://registry.npmjs.org/"
|
|
18
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"description": ""
|
|
19
19
|
}
|