{
  "result": {
    "stats": {
      "steps": {
        "total": 44,
        "passed": 44,
        "failed": 0
      },
      "iterations": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "items": {},
      "scripts": {
        "total": 140,
        "pending": 0,
        "failed": 0
      },
      "prerequests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "requests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "socketRequests": {
        "total": 0,
        "pending": 0,
        "failed": 0
      },
      "tests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "assertions": {
        "total": 372,
        "pending": 0,
        "failed": 0
      },
      "testScripts": {
        "total": 94,
        "pending": 0,
        "failed": 0
      },
      "prerequestScripts": {
        "total": 46,
        "pending": 0,
        "failed": 0
      }
    },
    "timings": {
      "responseTime": 19698,
      "responseAverage": 447.6818181818182,
      "responseMin": 2,
      "responseMax": 1674,
      "responseSd": 482.65170826135403,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1790390647681,
      "completed": 1790390668833
    },
    "transfers": {
      "responseTotal": 27012
    },
    "failures": [],
    "stepTree": [
      {
        "id": "16792b88-3d62-4233-bfb1-7fe1698b1300__forEach",
        "type": "forEach",
        "iteration": 0,
        "children": [
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
            "type": "forEachRound",
            "index": 1,
            "element": "http://127.0.0.1:3311",
            "children": [
              {
                "ref": "b0ea8d83-ba77-46c8-87f5-7c310873e6d8",
                "type": "customHttp"
              },
              {
                "ref": "6f82fcf4-0ee6-460e-8feb-383a75272e3c",
                "type": "customHttp"
              },
              {
                "ref": "ff5179ca-43ba-4530-80a7-e7d8b39db48f",
                "type": "customHttp"
              },
              {
                "ref": "67026efa-cfe4-4b16-9e2a-0d55df495839",
                "type": "customHttp"
              },
              {
                "ref": "5c118447-b431-4a99-8a39-83d4af81f3dd",
                "type": "customHttp"
              },
              {
                "ref": "fcea11a4-4d8e-4334-8931-8b6dd04c1a7c",
                "type": "customHttp"
              },
              {
                "ref": "cc4c7465-429b-448d-9bb6-bd1cea89af26",
                "type": "customHttp"
              },
              {
                "ref": "261ed0fe-68da-4578-8a85-bbbe18377c08",
                "type": "customHttp"
              },
              {
                "ref": "41434df9-ae8a-42a4-bb99-fcf124ddcccb",
                "type": "customHttp"
              },
              {
                "ref": "7fd7b8d0-62f0-4d45-b335-6d8ff8f26260",
                "type": "customHttp"
              },
              {
                "ref": "febbdf9e-d1b8-4ea9-83ba-c30252ee447f",
                "type": "customHttp"
              },
              {
                "ref": "35c5d2e9-f382-4e08-a8f2-09ae4255c660",
                "type": "customHttp"
              },
              {
                "ref": "888568f7-d937-4db7-a0e0-95f9c9ba26fb",
                "type": "customHttp"
              },
              {
                "ref": "f90838fb-3ecf-4ca4-9b16-c982731a3213",
                "type": "customHttp"
              },
              {
                "ref": "0ca27c37-ed1c-4f4d-8e2a-583acb7cb007",
                "type": "customHttp"
              },
              {
                "ref": "1390e464-7f58-4270-a996-34940e9aad1f",
                "type": "customHttp"
              },
              {
                "ref": "90f5ca56-1938-4657-acdc-93f142938907",
                "type": "customHttp"
              },
              {
                "ref": "05f530cc-9843-490f-af16-81aa2b2e43bd",
                "type": "customHttp"
              },
              {
                "ref": "40557235-e074-4897-8521-b8ccf494a5d4",
                "type": "customHttp"
              },
              {
                "ref": "14328b52-9151-4023-88c2-90783564aa0b",
                "type": "customHttp"
              },
              {
                "ref": "aaa3c360-b541-41fd-89b7-c9baadd5571d",
                "type": "customHttp"
              },
              {
                "ref": "9ab89d8a-417a-4fa0-b757-8420a3a80e92",
                "type": "customHttp"
              }
            ]
          },
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
            "type": "forEachRound",
            "index": 2,
            "element": "http://127.0.0.1:3310",
            "children": [
              {
                "ref": "9a9d9755-72d0-4f1d-9ea0-d9f2ae720a48",
                "type": "customHttp"
              },
              {
                "ref": "59e53765-9151-47a2-925e-6e57e87b96d7",
                "type": "customHttp"
              },
              {
                "ref": "35c58b9e-c4f6-416c-b1fb-00288b368ca7",
                "type": "customHttp"
              },
              {
                "ref": "9c85971c-1484-48d3-943b-e48e5f7775be",
                "type": "customHttp"
              },
              {
                "ref": "ebe949fa-fcea-4616-a530-774df1923974",
                "type": "customHttp"
              },
              {
                "ref": "e3448b16-9fe8-4e48-87c6-68e9c8755826",
                "type": "customHttp"
              },
              {
                "ref": "292cf612-7c4f-4ddc-9a97-80bd0d81faf9",
                "type": "customHttp"
              },
              {
                "ref": "f2f94616-66a9-4240-a1bf-982fc3110a2f",
                "type": "customHttp"
              },
              {
                "ref": "8bbf8429-bcbc-4bd3-9415-f6698b8c0120",
                "type": "customHttp"
              },
              {
                "ref": "37e60cbc-0a29-4ea3-b5d8-144482f7fd26",
                "type": "customHttp"
              },
              {
                "ref": "ebf872d8-ae23-4726-8a5d-22010dc73f62",
                "type": "customHttp"
              },
              {
                "ref": "c39122fb-1429-4dc1-ab08-6bcbe05a6d53",
                "type": "customHttp"
              },
              {
                "ref": "3bf49e29-fc5b-4f3d-9b3b-0a44105f206c",
                "type": "customHttp"
              },
              {
                "ref": "abf1c99c-819a-427e-a097-a30821040af3",
                "type": "customHttp"
              },
              {
                "ref": "980c5472-58b9-468a-ace7-3ff8b472f0de",
                "type": "customHttp"
              },
              {
                "ref": "767b827b-42fc-4141-a568-0659d999ee22",
                "type": "customHttp"
              },
              {
                "ref": "9546134c-4514-4bda-ab3e-46680b93f540",
                "type": "customHttp"
              },
              {
                "ref": "090ff2fa-4087-4fdf-a7e8-984e983e4677",
                "type": "customHttp"
              },
              {
                "ref": "167cd42d-a278-4433-b77c-0b0eca113a33",
                "type": "customHttp"
              },
              {
                "ref": "1f246ed1-27b4-41df-a134-d37d43bb3f35",
                "type": "customHttp"
              },
              {
                "ref": "4570115b-0ccb-4355-b001-3f2065fff56b",
                "type": "customHttp"
              },
              {
                "ref": "8f34b73a-c319-44fd-b3a7-035d60a237b0",
                "type": "customHttp"
              }
            ]
          }
        ],
        "array": [
          "http://127.0.0.1:3311",
          "http://127.0.0.1:3310"
        ]
      }
    ],
    "error": null
  },
  "isTestFlowControl": true,
  "run": {
    "stats": {
      "steps": {
        "total": 44,
        "passed": 44,
        "failed": 0
      },
      "iterations": {
        "total": 1,
        "pending": 0,
        "failed": 0
      },
      "items": {},
      "scripts": {
        "total": 140,
        "pending": 0,
        "failed": 0
      },
      "prerequests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "requests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "socketRequests": {
        "total": 0,
        "pending": 0,
        "failed": 0
      },
      "tests": {
        "total": 44,
        "pending": 0,
        "failed": 0
      },
      "assertions": {
        "total": 372,
        "pending": 0,
        "failed": 0
      },
      "testScripts": {
        "total": 94,
        "pending": 0,
        "failed": 0
      },
      "prerequestScripts": {
        "total": 46,
        "pending": 0,
        "failed": 0
      }
    },
    "timings": {
      "responseTime": 19698,
      "responseAverage": 447.6818181818182,
      "responseMin": 2,
      "responseMax": 1674,
      "responseSd": 482.65170826135403,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1790390647681,
      "completed": 1790390668833
    },
    "transfers": {
      "responseTotal": 27012
    },
    "failures": [],
    "stepTree": [
      {
        "id": "16792b88-3d62-4233-bfb1-7fe1698b1300__forEach",
        "type": "forEach",
        "iteration": 0,
        "children": [
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
            "type": "forEachRound",
            "index": 1,
            "element": "http://127.0.0.1:3311",
            "children": [
              {
                "ref": "b0ea8d83-ba77-46c8-87f5-7c310873e6d8",
                "type": "customHttp"
              },
              {
                "ref": "6f82fcf4-0ee6-460e-8feb-383a75272e3c",
                "type": "customHttp"
              },
              {
                "ref": "ff5179ca-43ba-4530-80a7-e7d8b39db48f",
                "type": "customHttp"
              },
              {
                "ref": "67026efa-cfe4-4b16-9e2a-0d55df495839",
                "type": "customHttp"
              },
              {
                "ref": "5c118447-b431-4a99-8a39-83d4af81f3dd",
                "type": "customHttp"
              },
              {
                "ref": "fcea11a4-4d8e-4334-8931-8b6dd04c1a7c",
                "type": "customHttp"
              },
              {
                "ref": "cc4c7465-429b-448d-9bb6-bd1cea89af26",
                "type": "customHttp"
              },
              {
                "ref": "261ed0fe-68da-4578-8a85-bbbe18377c08",
                "type": "customHttp"
              },
              {
                "ref": "41434df9-ae8a-42a4-bb99-fcf124ddcccb",
                "type": "customHttp"
              },
              {
                "ref": "7fd7b8d0-62f0-4d45-b335-6d8ff8f26260",
                "type": "customHttp"
              },
              {
                "ref": "febbdf9e-d1b8-4ea9-83ba-c30252ee447f",
                "type": "customHttp"
              },
              {
                "ref": "35c5d2e9-f382-4e08-a8f2-09ae4255c660",
                "type": "customHttp"
              },
              {
                "ref": "888568f7-d937-4db7-a0e0-95f9c9ba26fb",
                "type": "customHttp"
              },
              {
                "ref": "f90838fb-3ecf-4ca4-9b16-c982731a3213",
                "type": "customHttp"
              },
              {
                "ref": "0ca27c37-ed1c-4f4d-8e2a-583acb7cb007",
                "type": "customHttp"
              },
              {
                "ref": "1390e464-7f58-4270-a996-34940e9aad1f",
                "type": "customHttp"
              },
              {
                "ref": "90f5ca56-1938-4657-acdc-93f142938907",
                "type": "customHttp"
              },
              {
                "ref": "05f530cc-9843-490f-af16-81aa2b2e43bd",
                "type": "customHttp"
              },
              {
                "ref": "40557235-e074-4897-8521-b8ccf494a5d4",
                "type": "customHttp"
              },
              {
                "ref": "14328b52-9151-4023-88c2-90783564aa0b",
                "type": "customHttp"
              },
              {
                "ref": "aaa3c360-b541-41fd-89b7-c9baadd5571d",
                "type": "customHttp"
              },
              {
                "ref": "9ab89d8a-417a-4fa0-b757-8420a3a80e92",
                "type": "customHttp"
              }
            ]
          },
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
            "type": "forEachRound",
            "index": 2,
            "element": "http://127.0.0.1:3310",
            "children": [
              {
                "ref": "9a9d9755-72d0-4f1d-9ea0-d9f2ae720a48",
                "type": "customHttp"
              },
              {
                "ref": "59e53765-9151-47a2-925e-6e57e87b96d7",
                "type": "customHttp"
              },
              {
                "ref": "35c58b9e-c4f6-416c-b1fb-00288b368ca7",
                "type": "customHttp"
              },
              {
                "ref": "9c85971c-1484-48d3-943b-e48e5f7775be",
                "type": "customHttp"
              },
              {
                "ref": "ebe949fa-fcea-4616-a530-774df1923974",
                "type": "customHttp"
              },
              {
                "ref": "e3448b16-9fe8-4e48-87c6-68e9c8755826",
                "type": "customHttp"
              },
              {
                "ref": "292cf612-7c4f-4ddc-9a97-80bd0d81faf9",
                "type": "customHttp"
              },
              {
                "ref": "f2f94616-66a9-4240-a1bf-982fc3110a2f",
                "type": "customHttp"
              },
              {
                "ref": "8bbf8429-bcbc-4bd3-9415-f6698b8c0120",
                "type": "customHttp"
              },
              {
                "ref": "37e60cbc-0a29-4ea3-b5d8-144482f7fd26",
                "type": "customHttp"
              },
              {
                "ref": "ebf872d8-ae23-4726-8a5d-22010dc73f62",
                "type": "customHttp"
              },
              {
                "ref": "c39122fb-1429-4dc1-ab08-6bcbe05a6d53",
                "type": "customHttp"
              },
              {
                "ref": "3bf49e29-fc5b-4f3d-9b3b-0a44105f206c",
                "type": "customHttp"
              },
              {
                "ref": "abf1c99c-819a-427e-a097-a30821040af3",
                "type": "customHttp"
              },
              {
                "ref": "980c5472-58b9-468a-ace7-3ff8b472f0de",
                "type": "customHttp"
              },
              {
                "ref": "767b827b-42fc-4141-a568-0659d999ee22",
                "type": "customHttp"
              },
              {
                "ref": "9546134c-4514-4bda-ab3e-46680b93f540",
                "type": "customHttp"
              },
              {
                "ref": "090ff2fa-4087-4fdf-a7e8-984e983e4677",
                "type": "customHttp"
              },
              {
                "ref": "167cd42d-a278-4433-b77c-0b0eca113a33",
                "type": "customHttp"
              },
              {
                "ref": "1f246ed1-27b4-41df-a134-d37d43bb3f35",
                "type": "customHttp"
              },
              {
                "ref": "4570115b-0ccb-4355-b001-3f2065fff56b",
                "type": "customHttp"
              },
              {
                "ref": "8f34b73a-c319-44fd-b3a7-035d60a237b0",
                "type": "customHttp"
              }
            ]
          }
        ],
        "array": [
          "http://127.0.0.1:3311",
          "http://127.0.0.1:3310"
        ]
      }
    ],
    "error": null
  },
  "options": {
    "accessToken": "<REDACTED>",
    "apiBaseUrl": "https://api.apifox.com",
    "testScenario": [
      8794247
    ],
    "environment": 49344529,
    "reporters": [
      "cli",
      "json",
      "html"
    ],
    "outDir": "work_food_safety/2026-09-24-apifox-full-api-automation/reports/raw/S08_20260926_1045",
    "outFile": "s08-dual-db",
    "originalOutFile": "s08-dual-db",
    "onError": "continue",
    "envVar": [
      {
        "key": "app_admin_username",
        "value": "admin"
      },
      {
        "key": "app_admin_password",
        "value": "Cpt@123"
      }
    ],
    "globalVar": [],
    "color": "auto",
    "delayRequest": 0,
    "timeoutRequest": 20000,
    "timeoutScript": 10000,
    "uploadReport": "true",
    "enableBigInt": false,
    "disableRejectUnauthorized": false,
    "allowSecuritySensitiveActions": true,
    "apifoxVersion": "2.2.6",
    "globals": {},
    "teamGlobals": {}
  },
  "collection": {
    "apifoxCli": "1.2.36",
    "item": [
      {
        "item": [
          {
            "id": "ffef0aa9-a0e0-4c64-8ff5-4b4f5f87a6c9",
            "type": "group",
            "metaInfo": {
              "id": "ffef0aa9-a0e0-4c64-8ff5-4b4f5f87a6c9",
              "type": "group",
              "scopeType": "start",
              "scopeEndId": "84d03cb8-782c-4735-b891-0d8bed343c47",
              "isRoot": true,
              "needRecordRoot": false,
              "onError": "continue",
              "extraData": {}
            }
          },
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300__forEach",
            "type": "group",
            "metaInfo": {
              "id": "16792b88-3d62-4233-bfb1-7fe1698b1300__forEach",
              "type": "group",
              "scopeType": "start",
              "scopeEndId": "012b4e7b-39c9-4337-868b-badc18e8249e",
              "extraData": {
                "array": [
                  "http://127.0.0.1:3311",
                  "http://127.0.0.1:3310"
                ]
              }
            }
          },
          {
            "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
            "type": "forEach",
            "number": 1,
            "parameters": {
              "array": "[\"http://127.0.0.1:3311\",\"http://127.0.0.1:3310\"]",
              "disableOnError": false
            },
            "disable": false,
            "metaInfo": {
              "id": "16792b88-3d62-4233-bfb1-7fe1698b1300",
              "type": "forEach",
              "number": 1,
              "scopeType": "start",
              "scopeEndId": "e945ff94-635b-47f7-b3b6-cd8a0c968dd2",
              "index": 1,
              "array": [
                "http://127.0.0.1:3311",
                "http://127.0.0.1:3310"
              ],
              "disableOnError": false,
              "extracts": [
                {
                  "expression": "$.1.element",
                  "paths": [
                    "$",
                    "1",
                    "element"
                  ]
                }
              ]
            }
          },
          {
            "id": "285cf104-5ace-48ad-9184-59d4e5ee51e0",
            "name": "登录并初始化双库测试变量",
            "request": {
              "url": {
                "path": [
                  "auth",
                  "login"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"username\":\"{{app_admin_username}}\",\"password\":\"{{app_admin_password}}\"}",
                "type": "application/json"
              },
              "auth": {
                "type": "noauth",
                "noauth": []
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "prerequest",
                "script": {
                  "id": "preProcessors.0.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        pm.variables.set('base_url', pm.variables.get('$.1.element'));",
                    "pm.variables.set('test_batch', 'APIFOX_S08_' + Date.now());",
                    "pm.variables.set('operator_password', 'S08-' + Date.now() + '-Aa1!');",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.extractor",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "      async function ____replaceIn(value) {",
                    "        if (typeof pm.variables.replaceInAsync === 'function') {",
                    "          return await pm.variables.replaceInAsync(value);",
                    "        }",
                    "        return pm.variables.replaceIn(value);",
                    "      };",
                    "      ;(async () => {",
                    "        try{",
                    "          ",
                    "          const expression = await ____replaceIn(`$.data.token`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          const jsonData = pm.response.json();",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "          ",
                    "          ",
                    "        switch (typeof value) {",
                    "          case 'object':",
                    "            value = JSON.stringify(value);",
                    "            break;",
                    "          default:",
                    "            value = String(value);",
                    "            break;",
                    "        }",
                    "      ",
                    "          const formattedName = await ____replaceIn(`auth_token`);pm.variables.set(formattedName, value);console.log('___label_placeholder__processor___', 'The value of the Local variable ' + formattedName + ' has been set to' + ' ' + '' + value + '')",
                    "        } catch(e) {",
                    "          e.message = `error occurred in extracting variable auth_token, error message: ` + e.message;",
                    "          setImmediate(() => { throw e });",
                    "        }",
                    "      })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`登录业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.2.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('登录返回临时 Token（报告脱敏）', function () { pm.expect(__json.data.token).to.be.a('string').and.not.empty; });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "8910fd08-5b79-47ff-a02e-e84c1758d5a7",
              "id": "8910fd08-5b79-47ff-a02e-e84c1758d5a7",
              "type": "customHttp",
              "name": "登录并初始化双库测试变量",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 1,
              "httpApiId": 4573848,
              "httpApiCaseId": 4573848,
              "httpApiName": "登录并初始化双库测试变量",
              "httpApiPath": "{{base_url}}/auth/login",
              "httpApiMethod": "post",
              "httpApiCaseName": "登录并初始化双库测试变量",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "0f712a80-d7ae-47c5-a872-00dccad4f05e",
            "name": "读取菜品列表基线",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "status",
                    "value": "all"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('菜品基线：items 为数组', function () { pm.expect(__json.data.items).to.be.an('array'); });",
                    "pm.test('菜品基线：分页字段存在', function () { pm.expect(Number(__json.data.page)).to.equal(1); pm.expect(Number(__json.data.pageSize)).to.equal(20); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "8b9e8222-049a-4eea-937e-e3b1a2ef0e1b",
              "id": "8b9e8222-049a-4eea-937e-e3b1a2ef0e1b",
              "type": "customHttp",
              "name": "读取菜品列表基线",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 2,
              "httpApiId": 4573847,
              "httpApiCaseId": 4573847,
              "httpApiName": "读取菜品列表基线",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=1&canteenId=2&status=all&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "读取菜品列表基线",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "8239c224-0c2b-4fa6-a36c-f27031e977c8",
            "name": "新增中文菜品并返回 ID",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"code\":\"{{test_batch}}_F01\",\"name\":\"{{test_batch}}_宫保鸡丁\",\"imageUrl\":null,\"remark\":\"中文备注：少盐少油\",\"enabled\":true,\"by\":\"自动化测试员\"}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.extractor",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "      async function ____replaceIn(value) {",
                    "        if (typeof pm.variables.replaceInAsync === 'function') {",
                    "          return await pm.variables.replaceInAsync(value);",
                    "        }",
                    "        return pm.variables.replaceIn(value);",
                    "      };",
                    "      ;(async () => {",
                    "        try{",
                    "          ",
                    "          const expression = await ____replaceIn(`$.data.id`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          const jsonData = pm.response.json();",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "          ",
                    "          ",
                    "        switch (typeof value) {",
                    "          case 'object':",
                    "            value = JSON.stringify(value);",
                    "            break;",
                    "          default:",
                    "            value = String(value);",
                    "            break;",
                    "        }",
                    "      ",
                    "          const formattedName = await ____replaceIn(`food_id`);pm.variables.set(formattedName, value);console.log('___label_placeholder__processor___', 'The value of the Local variable ' + formattedName + ' has been set to' + ' ' + '' + value + '')",
                    "        } catch(e) {",
                    "          e.message = `error occurred in extracting variable food_id, error message: ` + e.message;",
                    "          setImmediate(() => { throw e });",
                    "        }",
                    "      })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.2.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('菜品创建：返回正整数 ID', function () { pm.expect(Number(__json.data.id)).to.be.greaterThan(0); });",
                    "pm.test('写入响应：返回正整数 ID', function () { pm.expect(Number(__json.data.id)).to.be.greaterThan(0); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "1fb099ed-78a1-437f-8d63-12877e150b69",
              "id": "1fb099ed-78a1-437f-8d63-12877e150b69",
              "type": "customHttp",
              "name": "新增中文菜品并返回 ID",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 3,
              "httpApiId": 4573846,
              "httpApiCaseId": 4573846,
              "httpApiName": "新增中文菜品并返回 ID",
              "httpApiPath": "{{base_url}}/school/foods",
              "httpApiMethod": "post",
              "httpApiCaseName": "新增中文菜品并返回 ID",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "1a1100a0-d5ca-4f2e-9186-ede473513635",
            "name": "检查刚创建菜品名称已存在",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods",
                  "exists"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "name",
                    "value": "{{test_batch}}_宫保鸡丁"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('存在性：exists=true', function () { pm.expect(__json.data.exists).to.equal(true); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "325cfb16-46f1-43ba-afb8-feec384c2fed",
              "id": "325cfb16-46f1-43ba-afb8-feec384c2fed",
              "type": "customHttp",
              "name": "检查刚创建菜品名称已存在",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 4,
              "httpApiId": 4573845,
              "httpApiCaseId": 4573845,
              "httpApiName": "检查刚创建菜品名称已存在",
              "httpApiPath": "{{base_url}}/school/foods/exists?schoolId=1&canteenId=2&name={{test_batch}}_宫保鸡丁",
              "httpApiMethod": "get",
              "httpApiCaseName": "检查刚创建菜品名称已存在",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "f8f05c82-a068-4093-b9ae-16b1e203882b",
            "name": "按 marker 回查新增菜品",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "q",
                    "value": "{{test_batch}}"
                  },
                  {
                    "key": "status",
                    "value": "all"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('菜品回查：包含创建 ID', function () { const id=Number(pm.variables.get('food_id')); pm.expect(__json.data.items.some(function(x){return Number(x.id)===id;})).to.equal(true); });",
                    "pm.test('菜品回查：中文、启用、NULL 图片正确', function () { const id=Number(pm.variables.get('food_id')); const row=__json.data.items.find(function(x){return Number(x.id)===id;}); pm.expect(row.name).to.equal(pm.variables.get('test_batch') + '_宫保鸡丁'); pm.expect(Boolean(row.enabled)).to.equal(true); pm.expect(row.imageUrl === null || row.image_url === null || row.imageUrl === '').to.equal(true); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "676df3f5-c3d5-4768-b91b-ae3f925c2fb2",
              "id": "676df3f5-c3d5-4768-b91b-ae3f925c2fb2",
              "type": "customHttp",
              "name": "按 marker 回查新增菜品",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 5,
              "httpApiId": 4573844,
              "httpApiCaseId": 4573844,
              "httpApiName": "按 marker 回查新增菜品",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=1&canteenId=2&q={{test_batch}}&status=all&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "按 marker 回查新增菜品",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "d422cac0-e99b-432a-b841-70a30cdd954d",
            "name": "更新菜品中文、备注、NULL 图片和停用状态",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods",
                  "{{food_id}}"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "PATCH",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"name\":\"{{test_batch}}_鱼香肉丝\",\"imageUrl\":null,\"remark\":\"中文备注：复核配方后停用\",\"enabled\":false,\"by\":\"自动化复核员\"}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('菜品更新：ok=true', function () { pm.expect(__json.data.ok).to.equal(true); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "6c07fcf3-3d5e-4046-a8ad-26eea29f1eae",
              "id": "6c07fcf3-3d5e-4046-a8ad-26eea29f1eae",
              "type": "customHttp",
              "name": "更新菜品中文、备注、NULL 图片和停用状态",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 6,
              "httpApiId": 4573843,
              "httpApiCaseId": 4573843,
              "httpApiName": "更新菜品中文、备注、NULL 图片和停用状态",
              "httpApiPath": "{{base_url}}/school/foods/{{food_id}}",
              "httpApiMethod": "patch",
              "httpApiCaseName": "更新菜品中文、备注、NULL 图片和停用状态",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "e833cf9b-eb47-4997-ad6f-8f85808fc233",
            "name": "更新后回查菜品已持久化",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "q",
                    "value": "{{test_batch}}"
                  },
                  {
                    "key": "status",
                    "value": "disabled"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('更新回查：名称和备注正确', function () { const id=Number(pm.variables.get('food_id')); const row=__json.data.items.find(function(x){return Number(x.id)===id;}); pm.expect(row).to.exist; pm.expect(row.name).to.equal(pm.variables.get('test_batch') + '_鱼香肉丝'); pm.expect(row.remark).to.equal('中文备注：复核配方后停用'); });",
                    "pm.test('更新回查：enabled=false 且图片仍为空', function () { const id=Number(pm.variables.get('food_id')); const row=__json.data.items.find(function(x){return Number(x.id)===id;}); pm.expect(Boolean(row.enabled)).to.equal(false); pm.expect(row.imageUrl === null || row.image_url === null || row.imageUrl === '').to.equal(true); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "9b900b58-91f2-4886-8df9-2143be4317bf",
              "id": "9b900b58-91f2-4886-8df9-2143be4317bf",
              "type": "customHttp",
              "name": "更新后回查菜品已持久化",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 7,
              "httpApiId": 4573842,
              "httpApiCaseId": 4573842,
              "httpApiName": "更新后回查菜品已持久化",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=1&canteenId=2&q={{test_batch}}&status=disabled&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "更新后回查菜品已持久化",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "669ed04b-4f1d-485a-b4ac-4ad69716a283",
            "name": "批量导入一条合法菜品和一条超长编号",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods",
                  "import"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"by\":\"自动化导入员\",\"items\":[{\"code\":\"{{test_batch}}_I01\",\"name\":\"{{test_batch}}_红烧茄子\",\"canteenId\":2,\"imageUrl\":null,\"remark\":\"批量导入中文备注\"},{\"code\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"name\":\"{{test_batch}}_NEG_CODE_65\",\"canteenId\":2,\"remark\":\"该项必须失败且不得写入\"}]}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('批量导入：success=1', function () { pm.expect(Number(__json.data.success)).to.equal(1); });",
                    "pm.test('批量导入：fail=1 且 total=2', function () { pm.expect(Number(__json.data.fail)).to.equal(1); pm.expect(Number(__json.data.total)).to.equal(2); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "f392112f-a879-4929-abf1-71f6a4390dff",
              "id": "f392112f-a879-4929-abf1-71f6a4390dff",
              "type": "customHttp",
              "name": "批量导入一条合法菜品和一条超长编号",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 8,
              "httpApiId": 4573841,
              "httpApiCaseId": 4573841,
              "httpApiName": "批量导入一条合法菜品和一条超长编号",
              "httpApiPath": "{{base_url}}/school/foods/import",
              "httpApiMethod": "post",
              "httpApiCaseName": "批量导入一条合法菜品和一条超长编号",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "c5c3ac77-80e7-4d7f-9822-9fa17a55f735",
            "name": "批量导入后核对合法与失败项",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "q",
                    "value": "{{test_batch}}"
                  },
                  {
                    "key": "status",
                    "value": "all"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "50"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('导入回查：合法红烧茄子存在', function () { pm.expect(__json.data.items.some(function(x){return x.name===pm.variables.get('test_batch') + '_红烧茄子';})).to.equal(true); });",
                    "pm.test('导入回查：超长编号项零写入', function () { pm.expect(__json.data.items.some(function(x){return x.name===pm.variables.get('test_batch') + '_NEG_CODE_65';})).to.equal(false); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "e56e2deb-2f12-4f8c-a882-02132ab22aea",
              "id": "e56e2deb-2f12-4f8c-a882-02132ab22aea",
              "type": "customHttp",
              "name": "批量导入后核对合法与失败项",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 9,
              "httpApiId": 4573840,
              "httpApiCaseId": 4573840,
              "httpApiName": "批量导入后核对合法与失败项",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=1&canteenId=2&q={{test_batch}}&status=all&page=1&pageSize=50",
              "httpApiMethod": "get",
              "httpApiCaseName": "批量导入后核对合法与失败项",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "f5b48d43-c1cd-42e9-a9eb-20cafc8af215",
            "name": "导出菜品 CSV 并核对本轮数据",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods",
                  "export.csv"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "q",
                    "value": "{{test_batch}}"
                  },
                  {
                    "key": "status",
                    "value": "all"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('菜品 CSV：包含中文表头', function () { pm.expect(__json.data.csv).to.include('菜品编号,菜品名称,食堂'); });",
                    "pm.test('菜品 CSV：包含本轮 marker 和中文菜名', function () { pm.expect(__json.data.csv).to.include(pm.variables.get('test_batch')); pm.expect(__json.data.csv).to.include('鱼香肉丝'); pm.expect(__json.data.csv).to.include('红烧茄子'); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "ee19bb14-2f9a-4d91-962d-030096e7ba40",
              "id": "ee19bb14-2f9a-4d91-962d-030096e7ba40",
              "type": "customHttp",
              "name": "导出菜品 CSV 并核对本轮数据",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 10,
              "httpApiId": 4573839,
              "httpApiCaseId": 4573839,
              "httpApiName": "导出菜品 CSV 并核对本轮数据",
              "httpApiPath": "{{base_url}}/school/foods/export.csv?schoolId=1&q={{test_batch}}&status=all",
              "httpApiMethod": "get",
              "httpApiCaseName": "导出菜品 CSV 并核对本轮数据",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "a9299b81-df65-41d9-a9b6-0f2818bc3ac1",
            "name": "直接新增 65 字符菜品编号应 400",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"code\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"name\":\"{{test_batch}}_NEG_DIRECT_CODE_65\",\"enabled\":true,\"by\":\"自动化边界测试员\"}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=400`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`400`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 400', function () { pm.expect(pm.response.code).to.equal(400); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 400', function () { pm.expect(__json && __json.code).to.equal(400); });",
                    "pm.test('65 字编号：返回 64 字符上限错误', function () { pm.expect(String(__json.message)).to.match(/菜品编号|64/); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "f823cea4-a531-4348-9559-7fee83ae8dcd",
              "id": "f823cea4-a531-4348-9559-7fee83ae8dcd",
              "type": "customHttp",
              "name": "直接新增 65 字符菜品编号应 400",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 11,
              "httpApiId": 4573838,
              "httpApiCaseId": 4573838,
              "httpApiName": "直接新增 65 字符菜品编号应 400",
              "httpApiPath": "{{base_url}}/school/foods",
              "httpApiMethod": "post",
              "httpApiCaseName": "直接新增 65 字符菜品编号应 400",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "a241030f-6600-4fb5-87de-63081f6eb33f",
            "name": "65 字符编号失败后确认零写入",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "q",
                    "value": "{{test_batch}}_NEG_DIRECT_CODE_65"
                  },
                  {
                    "key": "status",
                    "value": "all"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('65 字编号零写入：total=0', function () { pm.expect(Number(__json.data.total)).to.equal(0); });",
                    "pm.test('65 字编号零写入：items 为空', function () { pm.expect(__json.data.items).to.be.an('array').that.is.empty; });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "24c15b26-e8b2-47e9-917b-0e5d0d9b0d94",
              "id": "24c15b26-e8b2-47e9-917b-0e5d0d9b0d94",
              "type": "customHttp",
              "name": "65 字符编号失败后确认零写入",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 12,
              "httpApiId": 4573837,
              "httpApiCaseId": 4573837,
              "httpApiName": "65 字符编号失败后确认零写入",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=1&canteenId=2&q={{test_batch}}_NEG_DIRECT_CODE_65&status=all&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "65 字符编号失败后确认零写入",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "60b313d8-4294-4fc0-87cf-b3a2a2652ef4",
            "name": "读取学校人员基线",
            "request": {
              "url": {
                "path": [
                  "school",
                  "personnel"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('人员基线：items 为数组', function () { pm.expect(__json.data.items).to.be.an('array'); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "4fe5c3a3-fdc0-4308-96c0-b34f2d21d896",
              "id": "4fe5c3a3-fdc0-4308-96c0-b34f2d21d896",
              "type": "customHttp",
              "name": "读取学校人员基线",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 13,
              "httpApiId": 4573836,
              "httpApiCaseId": 4573836,
              "httpApiName": "读取学校人员基线",
              "httpApiPath": "{{base_url}}/school/personnel?schoolId=1&canteenId=2&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "读取学校人员基线",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "29bd3b8d-5b93-4a86-b285-73ac76c7e250",
            "name": "新增本轮专用留样人员",
            "request": {
              "url": {
                "path": [
                  "school",
                  "personnel"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"name\":\"{{test_batch}}_李留样\",\"gender\":\"女\",\"phone\":\"13900001111\",\"jobTitle\":\"留样管理员\",\"enabled\":false}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.extractor",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "      async function ____replaceIn(value) {",
                    "        if (typeof pm.variables.replaceInAsync === 'function') {",
                    "          return await pm.variables.replaceInAsync(value);",
                    "        }",
                    "        return pm.variables.replaceIn(value);",
                    "      };",
                    "      ;(async () => {",
                    "        try{",
                    "          ",
                    "          const expression = await ____replaceIn(`$.data.id`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          const jsonData = pm.response.json();",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "          ",
                    "          ",
                    "        switch (typeof value) {",
                    "          case 'object':",
                    "            value = JSON.stringify(value);",
                    "            break;",
                    "          default:",
                    "            value = String(value);",
                    "            break;",
                    "        }",
                    "      ",
                    "          const formattedName = await ____replaceIn(`personnel_id`);pm.variables.set(formattedName, value);console.log('___label_placeholder__processor___', 'The value of the Local variable ' + formattedName + ' has been set to' + ' ' + '' + value + '')",
                    "        } catch(e) {",
                    "          e.message = `error occurred in extracting variable personnel_id, error message: ` + e.message;",
                    "          setImmediate(() => { throw e });",
                    "        }",
                    "      })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.2.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('人员创建：返回正整数 ID', function () { pm.expect(Number(__json.data.id)).to.be.greaterThan(0); });",
                    "pm.test('写入响应：返回正整数 ID', function () { pm.expect(Number(__json.data.id)).to.be.greaterThan(0); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "1811492b-b082-4feb-896f-01ae32927d4d",
              "id": "1811492b-b082-4feb-896f-01ae32927d4d",
              "type": "customHttp",
              "name": "新增本轮专用留样人员",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 14,
              "httpApiId": 4573835,
              "httpApiCaseId": 4573835,
              "httpApiName": "新增本轮专用留样人员",
              "httpApiPath": "{{base_url}}/school/personnel",
              "httpApiMethod": "post",
              "httpApiCaseName": "新增本轮专用留样人员",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "f4475368-1b9e-4f54-98cc-b4695ed483d6",
            "name": "回查本轮专用人员",
            "request": {
              "url": {
                "path": [
                  "school",
                  "personnel",
                  "detail"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "id",
                    "value": "{{personnel_id}}"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('人员回查：中文姓名正确', function () { pm.expect(__json.data.name).to.equal(pm.variables.get('test_batch') + '_李留样'); });",
                    "pm.test('人员回查：学校、食堂、停用状态正确', function () { pm.expect(Number(__json.data.schoolId || __json.data.school_id)).to.equal(1); pm.expect(Number(__json.data.canteenId || __json.data.canteen_id)).to.equal(2); pm.expect(Boolean(__json.data.enabled)).to.equal(false); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "47b4ec73-bf61-475e-9acc-83bc0b399635",
              "id": "47b4ec73-bf61-475e-9acc-83bc0b399635",
              "type": "customHttp",
              "name": "回查本轮专用人员",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 15,
              "httpApiId": 4573834,
              "httpApiCaseId": 4573834,
              "httpApiName": "回查本轮专用人员",
              "httpApiPath": "{{base_url}}/school/personnel/detail?id={{personnel_id}}",
              "httpApiMethod": "get",
              "httpApiCaseName": "回查本轮专用人员",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "ce3685b4-4f5e-4f4d-9a59-df7bcf9dea0e",
            "name": "新增留样人员授权",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"personnelIds\":[\"{{personnel_id}}\"],\"password\":\"{{operator_password}}\",\"faceOssUrl\":null,\"faceFilePath\":null}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('留样人员新增：count=1', function () { pm.expect(Number(__json.data.count)).to.equal(1); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "0cff4f61-be6d-4e5d-a04e-8922922f5c75",
              "id": "0cff4f61-be6d-4e5d-a04e-8922922f5c75",
              "type": "customHttp",
              "name": "新增留样人员授权",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 16,
              "httpApiId": 4573833,
              "httpApiCaseId": 4573833,
              "httpApiName": "新增留样人员授权",
              "httpApiPath": "{{base_url}}/school/sampling/operators",
              "httpApiMethod": "post",
              "httpApiCaseName": "新增留样人员授权",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "9927f06f-b176-418b-be55-fbce831d6484",
            "name": "留样人员列表回查且不得泄露密码",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "100"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('留样人员回查：包含本轮人员 ID', function () { const id=String(pm.variables.get('personnel_id')); pm.expect(__json.data.items.some(function(x){return String(x.id)===id;})).to.equal(true); });",
                    "pm.test('留样人员列表：不包含 password 字段', function () { pm.expect(__json.data.items.every(function(x){return !Object.prototype.hasOwnProperty.call(x,'password');})).to.equal(true); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "244f4068-abbf-4f8d-8a69-473761bd2fda",
              "id": "244f4068-abbf-4f8d-8a69-473761bd2fda",
              "type": "customHttp",
              "name": "留样人员列表回查且不得泄露密码",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 17,
              "httpApiId": 4573832,
              "httpApiCaseId": 4573832,
              "httpApiName": "留样人员列表回查且不得泄露密码",
              "httpApiPath": "{{base_url}}/school/sampling/operators?schoolId=1&canteenId=2&page=1&pageSize=100",
              "httpApiMethod": "get",
              "httpApiCaseName": "留样人员列表回查且不得泄露密码",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "bd85ad61-db72-4104-a6ab-fd279262f1a8",
            "name": "留样人员编辑详情可回显密码但证据脱敏",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators",
                  "detail"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "id",
                    "value": "{{personnel_id}}"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('留样人员详情：ID 正确', function () { pm.expect(String(__json.data.id)).to.equal(String(pm.variables.get('personnel_id'))); });",
                    "pm.test('留样人员详情：密码专列存在', function () { pm.expect(String(__json.data.password)).to.equal(String(pm.variables.get('operator_password'))); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "4afba42d-aa38-45f1-8447-4c2b3e10585b",
              "id": "4afba42d-aa38-45f1-8447-4c2b3e10585b",
              "type": "customHttp",
              "name": "留样人员编辑详情可回显密码但证据脱敏",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 18,
              "httpApiId": 4573831,
              "httpApiCaseId": 4573831,
              "httpApiName": "留样人员编辑详情可回显密码但证据脱敏",
              "httpApiPath": "{{base_url}}/school/sampling/operators/detail?schoolId=1&id={{personnel_id}}",
              "httpApiMethod": "get",
              "httpApiCaseName": "留样人员编辑详情可回显密码但证据脱敏",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "e396175b-1cf5-425e-95b6-a9d3b32fb018",
            "name": "更新留样人员中文、时间、布尔值和 NULL 图片",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators",
                  "upsert"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                },
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "method": "POST",
              "body": {
                "mode": "raw",
                "raw": "{\"schoolId\":1,\"canteenId\":2,\"id\":\"{{personnel_id}}\",\"userName\":\"{{test_batch}}_李留样复核\",\"userNo\":\"{{test_batch}}_OP01\",\"jobTitle\":\"留样复核员\",\"enabled\":false,\"faceOssUrl\":null,\"faceFilePath\":null,\"updTime\":\"2026-09-26 09:10:11\",\"pushTime\":\"2026-09-26 09:10:12\"}",
                "type": "application/json"
              },
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 201', function () { pm.expect(pm.response.code).to.equal(201); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('留样人员更新：count=1', function () { pm.expect(Number(__json.data.count)).to.equal(1); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "66c3beff-9b7c-40e4-a3b1-315cab902231",
              "id": "66c3beff-9b7c-40e4-a3b1-315cab902231",
              "type": "customHttp",
              "name": "更新留样人员中文、时间、布尔值和 NULL 图片",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 19,
              "httpApiId": 4573830,
              "httpApiCaseId": 4573830,
              "httpApiName": "更新留样人员中文、时间、布尔值和 NULL 图片",
              "httpApiPath": "{{base_url}}/school/sampling/operators/upsert",
              "httpApiMethod": "post",
              "httpApiCaseName": "更新留样人员中文、时间、布尔值和 NULL 图片",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "8c94b713-d9ad-4273-abba-829c055953d8",
            "name": "更新后回查留样人员字段",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "canteenId",
                    "value": "2"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "100"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=200`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`200`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 200', function () { pm.expect(pm.response.code).to.equal(200); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 200', function () { pm.expect(__json && __json.code).to.equal(200); });",
                    "pm.test('响应包含 data 字段', function () { pm.expect(__json).to.have.property('data'); });",
                    "pm.test('人员更新回查：中文姓名、时间正确', function () { const id=String(pm.variables.get('personnel_id')); const row=__json.data.items.find(function(x){return String(x.id)===id;}); pm.expect(row).to.exist; pm.expect(row.userName).to.equal(pm.variables.get('test_batch') + '_李留样复核'); pm.expect(row.updTime).to.equal('2026-09-26 09:10:11'); pm.expect(row.pushTime).to.equal('2026-09-26 09:10:12'); });",
                    "pm.test('人员更新回查：仍不泄露密码', function () { const id=String(pm.variables.get('personnel_id')); const row=__json.data.items.find(function(x){return String(x.id)===id;}); pm.expect(Object.prototype.hasOwnProperty.call(row,'password')).to.equal(false); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "12707d89-c19b-49ac-8c42-219e678699dc",
              "id": "12707d89-c19b-49ac-8c42-219e678699dc",
              "type": "customHttp",
              "name": "更新后回查留样人员字段",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 20,
              "httpApiId": 4573829,
              "httpApiCaseId": 4573829,
              "httpApiName": "更新后回查留样人员字段",
              "httpApiPath": "{{base_url}}/school/sampling/operators?schoolId=1&canteenId=2&page=1&pageSize=100",
              "httpApiMethod": "get",
              "httpApiCaseName": "更新后回查留样人员字段",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "09f9dab1-e8ff-4eaa-b4f0-21130c085625",
            "name": "跨校菜品列表应 403",
            "request": {
              "url": {
                "path": [
                  "school",
                  "foods"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "99999999"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "Authorization",
                  "value": "Bearer {{auth_token}}"
                },
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "bearer",
                "bearer": [
                  {
                    "type": "any",
                    "value": "{{auth_token}}",
                    "key": "token"
                  }
                ]
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=403`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`403`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 403', function () { pm.expect(pm.response.code).to.equal(403); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 403', function () { pm.expect(__json && __json.code).to.equal(403); });",
                    "pm.test('跨校菜品：无业务数据', function () { pm.expect(__json.data).to.not.exist; });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "22bf05fc-20ab-445b-829a-b03770ae3c9c",
              "id": "22bf05fc-20ab-445b-829a-b03770ae3c9c",
              "type": "customHttp",
              "name": "跨校菜品列表应 403",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 21,
              "httpApiId": 4573828,
              "httpApiCaseId": 4573828,
              "httpApiName": "跨校菜品列表应 403",
              "httpApiPath": "{{base_url}}/school/foods?schoolId=99999999&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "跨校菜品列表应 403",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "e505f5a6-2c61-4d85-b65d-e2a4ff3aa925",
            "name": "无 Token 留样人员列表应 401",
            "request": {
              "url": {
                "path": [
                  "school",
                  "sampling",
                  "operators"
                ],
                "host": [
                  "{{base_url}}"
                ],
                "query": [
                  {
                    "key": "schoolId",
                    "value": "1"
                  },
                  {
                    "key": "page",
                    "value": "1"
                  },
                  {
                    "key": "pageSize",
                    "value": "20"
                  }
                ],
                "variable": []
              },
              "header": [
                {
                  "key": "User-Agent",
                  "value": "app/1.0.0"
                }
              ],
              "method": "GET",
              "body": {},
              "auth": {
                "type": "noauth",
                "noauth": []
              },
              "type": "http"
            },
            "response": [],
            "event": [
              {
                "listen": "prerequest",
                "script": {
                  "id": "commonScript.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "  ____string2Array = function(value) {",
                    "    if(typeof value === 'object'){",
                    "      return value;",
                    "    }",
                    "    try {",
                    "      return JSON.parse(value);",
                    "    } catch (e) {",
                    "      return value;",
                    "    }",
                    "  }",
                    "  ____string2Number = function(value, errorMsg) {",
                    "   if(typeof value !== 'string'){",
                    "     return value;",
                    "   }",
                    "   if (/^\\-?\\d+$/.test(value)) {",
                    "       return parseInt(value);",
                    "   } else if (/^\\-?\\d+\\.\\d+$/.test(value)) {",
                    "       return parseFloat(value);",
                    "   } else {",
                    "       throw new Error(errorMsg || 'Data type mismatch')",
                    "   }",
                    " }",
                    "",
                    "  ____formatValues = function(value, stringCompareValue, comparison) {",
                    "   try{",
                    "     const isNumberComparisons = ['isBelow', 'isAtMost', 'isAbove', 'isAtLeast'].includes(comparison);",
                    "     const isCollectionComparisons = ['isOneOf', 'notOneOf'].includes(comparison);",
                    "     let compareValue;",
                    "     switch (typeof value) {",
                    "         case 'string':",
                    "             if (isNumberComparisons) {",
                    "                value = ____string2Number(value);",
                    "                compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "                compareValue = ____string2Array(stringCompareValue);",
                    "             } else if (comparison === 'exists' || comparison === 'notExist') {",
                    "                value = /^({%.*%})|({{.*}})$/.test(value) ? undefined : value;",
                    "             } else {",
                    "                compareValue = stringCompareValue;",
                    "             }",
                    "             break;",
                    "         case 'object':",
                    "             const isArray = value instanceof Array;",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type object cannot be compared using the ' + comparison + ' method')",
                    "             } else if (isCollectionComparisons && isArray) {",
                    "              throw new Error('Values of type array cannot be compared using the ' + comparison + ' method')",
                    "            } else if (",
                    "              isArray &&",
                    "              comparison === 'include' &&",
                    "              value.includes(stringCompareValue)",
                    "            ) {",
                    "              compareValue = stringCompareValue;",
                    "            } else {",
                    "              try {",
                    "                  compareValue = JSON.parse(stringCompareValue);",
                    "              } catch (e) {",
                    "                  compareValue = stringCompareValue;",
                    "              }",
                    "            }",
                    "             break;",
                    "         case 'boolean':",
                    "             if (isNumberComparisons || isCollectionComparisons) {",
                    "                 throw new Error('Values of type boolean cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'true' ? true : (stringCompareValue === 'false' ? false : stringCompareValue);",
                    "             break;",
                    "           case 'bigint':",
                    "           case 'number':",
                    "             if (isNumberComparisons) {",
                    "               compareValue = ____string2Number(stringCompareValue);",
                    "             } else if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "              value = '' + value;",
                    "            } else {",
                    "               compareValue = stringCompareValue;",
                    "               value = '' + value;",
                    "             }",
                    "             break;",
                    "         case 'null':",
                    "             if (isNumberComparisons) {",
                    "                 throw new Error('Values of type null cannot be compared using the ' + comparison + ' method')",
                    "             }",
                    "             compareValue = stringCompareValue === 'null' ? null : stringCompareValue;",
                    "             break;",
                    "         default:",
                    "            if (isCollectionComparisons) {",
                    "              compareValue = ____string2Array(stringCompareValue);",
                    "            } else {",
                    "              compareValue = stringCompareValue;",
                    "            }",
                    "            break;",
                    "     }",
                    "     return { compareValue, value };",
                    "   } catch(e) {",
                    "     console.log(e);",
                    "     throw e;",
                    "   }",
                    " }",
                    " "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.0.assertion",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        ",
                    "  async function ____replaceIn(value) {",
                    "    if (typeof pm.variables.replaceInAsync === 'function') {",
                    "      return await pm.variables.replaceInAsync(value);",
                    "    }",
                    "    return pm.variables.replaceIn(value);",
                    "  };",
                    "",
                    "  ;(async () => {",
                    "    try {",
                    "      const formattedName = await ____replaceIn(`业务码 code=401`);",
                    "      pm.test(formattedName, async function(done) {",
                    "        try {",
                    "          ",
                    "          const expression = await ____replaceIn(`$.code`);",
                    "          const JSONPath = require('jsonpath-plus').JSONPath;",
                    "          let jsonData;",
                    "          try {",
                    "            jsonData = pm.response.json();",
                    "          } catch(e) {",
                    "            let text = pm.response.text();",
                    "            const xml2js = require('xml2js');",
                    "            function removeXmlUselessPrefixAndSuffix(text) {",
                    "              const start = text.indexOf('<');",
                    "              const end = text.lastIndexOf('>');",
                    "              if (start === -1 || end === -1) {",
                    "                return text;",
                    "              }",
                    "              return text.substring(start, end + 1);",
                    "            }",
                    "            text = removeXmlUselessPrefixAndSuffix(text);",
                    "            let json;",
                    "            let xmlParseOptions = {",
                    "                explicitArray: false,",
                    "                trim: true,",
                    "                ignoreAttrs: true,",
                    "            };",
                    "            xml2js.parseString(text, xmlParseOptions, function (_, result) {",
                    "                jsonData = result;",
                    "            });",
                    "          }",
                    "          let value = JSONPath({",
                    "            json: jsonData,",
                    "            path: expression,",
                    "            wrap: false",
                    "          });",
                    "",
                    "          if (false && undefined !== undefined) {",
                    "            if (Array.isArray(value)) {",
                    "              value = Number(undefined) >= 0 ? value[undefined] : value[value.length + Number(undefined)];",
                    "            } else {",
                    "              value = undefined;",
                    "            }",
                    "          }",
                    "",
                    "          ",
                    "          ",
                    "    const compareValue = await ____replaceIn(`401`);",
                    "    const formattedValues = ____formatValues(value, compareValue, 'equal');",
                    "  ",
                    "          pm.expect(formattedValues.value).to.eql(formattedValues.compareValue);",
                    "          done();",
                    "        } catch (err) {",
                    "          done(err);",
                    "        }",
                    "      });",
                    "    } catch(e) {",
                    "      setImmediate(() => { throw e });",
                    "    }",
                    "  })();",
                    "      "
                  ]
                }
              },
              {
                "listen": "test",
                "script": {
                  "id": "postProcessors.1.customScript",
                  "type": "text/javascript",
                  "exec": [
                    "",
                    "        if (JSON.setEnableBigInt) {",
                    "          JSON.setEnableBigInt(undefined);",
                    "        }",
                    "        const __text = pm.response.text();",
                    "let __json = null;",
                    "try { __json = pm.response.json(); } catch (e) {}",
                    "pm.test('HTTP 状态码 = 401', function () { pm.expect(pm.response.code).to.equal(401); });",
                    "pm.test('响应正文存在', function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "pm.test('响应正文是 JSON', function () { pm.expect(__json).to.be.an('object'); });",
                    "pm.test('业务码 code = 401', function () { pm.expect(__json && __json.code).to.equal(401); });",
                    "pm.test('无 Token：明确返回 Missing token', function () { pm.expect(String(__json.message)).to.include('Missing token'); });",
                    "function __summaryText(body) {",
                    "  if (!body || typeof body !== 'object') return '非 JSON 响应';",
                    "  const parts = ['code=' + String(body.code)];",
                    "  if (body.message && body.message !== 'OK') parts.push('message=' + String(body.message).slice(0, 32));",
                    "  const data = body.data;",
                    "  if (Array.isArray(data)) parts.push('items=' + data.length);",
                    "  else if (data && typeof data === 'object') {",
                    "    ['id', 'result', 'value', 'source', 'exception', 'ok', 'total', 'page', 'pageSize'].forEach(function (key) {",
                    "      if (data[key] !== undefined && data[key] !== null) parts.push(key + '=' + String(data[key]).slice(0, 24));",
                    "    });",
                    "    if (Array.isArray(data.items)) {",
                    "      parts.push('items=' + data.items.length);",
                    "      if (data.items[0] && data.items[0].id !== undefined) parts.push('firstId=' + data.items[0].id);",
                    "    }",
                    "    if (typeof data.csv === 'string') parts.push('csvChars=' + data.csv.length);",
                    "    if (parts.length === 1) parts.push('dataKeys=' + Object.keys(data).filter(function (key) { return !/token|password|secret|authorization|access.?key/i.test(key); }).slice(0, 8).join(','));",
                    "  }",
                    "  return parts.join('，').slice(0, 88);",
                    "}",
                    "pm.test('关键返回值｜' + __summaryText(__json), function () { pm.expect(__text.length).to.be.greaterThan(0); });",
                    "function __redact(value) {",
                    "  if (Array.isArray(value)) return value.slice(0, 20).map(__redact);",
                    "  if (value && typeof value === 'object') {",
                    "    const out = {};",
                    "    Object.keys(value).slice(0, 80).forEach(function (key) {",
                    "      if (/token|password|secret|authorization|access.?key/i.test(key)) out[key] = '[REDACTED]';",
                    "      else out[key] = __redact(value[key]);",
                    "    });",
                    "    return out;",
                    "  }",
                    "  if (typeof value === 'string') {",
                    "    const masked = value",
                    "      .replace(/(\\\"(?:password|token|secret|authorization|access.?key)\\\"\\s*:\\s*\\\")[^\\\"]*/ig, '$1[REDACTED]')",
                    "      .replace(/(Bearer\\s+)[A-Za-z0-9._-]+/ig, '$1[REDACTED]');",
                    "    return masked.length > 2000 ? masked.slice(0, 2000) + '...[TRUNCATED]' : masked;",
                    "  }",
                    "  return value;",
                    "}",
                    "const __evidence = {",
                    "  step: pm.info.requestName,",
                    "  method: pm.request.method,",
                    "  url: pm.request.url.toString(),",
                    "  httpStatus: pm.response.code,",
                    "  responseTimeMs: pm.response.responseTime,",
                    "  responseSize: pm.response.responseSize,",
                    "  requestBody: pm.request.body ? __redact(pm.request.body.toJSON ? pm.request.body.toJSON() : String(pm.request.body)) : null,",
                    "  responseBody: __redact(__json === null ? __text : __json)",
                    "};",
                    "console.log('APIFOX_EVIDENCE ' + JSON.stringify(__evidence));",
                    "      "
                  ]
                }
              }
            ],
            "type": "http",
            "metaInfo": {
              "blockId": "86ab57e4-fb80-483f-99d0-493df160a1e6",
              "id": "86ab57e4-fb80-483f-99d0-493df160a1e6",
              "type": "customHttp",
              "name": "无 Token 留样人员列表应 401",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 22,
              "httpApiId": 4573827,
              "httpApiCaseId": 4573827,
              "httpApiName": "无 Token 留样人员列表应 401",
              "httpApiPath": "{{base_url}}/school/sampling/operators?schoolId=1&page=1&pageSize=20",
              "httpApiMethod": "get",
              "httpApiCaseName": "无 Token 留样人员列表应 401",
              "serverId": "default"
            },
            "protocolProfileBehavior": {
              "useWhatWGUrlParser": false,
              "disableUrlEncoding": false,
              "disabledSystemHeaders": {},
              "disableCookies": false
            },
            "responseDefinition": {
              "validateDeletedResponse": false
            },
            "requestDefinition": {
              "jsonSchema": {},
              "examples": []
            },
            "overrideRequesterOptions": {
              "strictSSL": false
            }
          },
          {
            "id": "e945ff94-635b-47f7-b3b6-cd8a0c968dd2",
            "type": "forEach",
            "metaInfo": {
              "id": "e945ff94-635b-47f7-b3b6-cd8a0c968dd2",
              "type": "forEach",
              "scopeType": "end",
              "scopeStartId": "16792b88-3d62-4233-bfb1-7fe1698b1300"
            }
          },
          {
            "id": "012b4e7b-39c9-4337-868b-badc18e8249e",
            "type": "group",
            "metaInfo": {
              "id": "012b4e7b-39c9-4337-868b-badc18e8249e",
              "type": "group",
              "scopeType": "end",
              "scopeStartId": "16792b88-3d62-4233-bfb1-7fe1698b1300__forEach"
            }
          },
          {
            "id": "84d03cb8-782c-4735-b891-0d8bed343c47",
            "type": "group",
            "metaInfo": {
              "id": "84d03cb8-782c-4735-b891-0d8bed343c47",
              "type": "group",
              "scopeType": "end",
              "scopeStartId": "ffef0aa9-a0e0-4c64-8ff5-4b4f5f87a6c9"
            }
          }
        ],
        "name": "S08-菜品与留样人员（双库真实写入）"
      }
    ],
    "info": {
      "name": "S08-菜品与留样人员（双库真实写入）",
      "folderName": "学校端-双库兼容"
    },
    "dataSchemas": {},
    "mockRules": {
      "rules": [],
      "enableSystemRule": true
    },
    "environment": {
      "id": 49344529,
      "name": "本地食安网关；在 Apifox 环境中按实际隔离测试地址覆盖",
      "type": "normal",
      "baseUrls": {
        "default": "http://127.0.0.1:3310"
      },
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "http://127.0.0.1:3310",
      "variable": {
        "id": "28fc8868-e773-4115-bcf2-dc0ff214fb2f",
        "name": "本地食安网关；在 Apifox 环境中按实际隔离测试地址覆盖",
        "baseUrl": "http://127.0.0.1:3310",
        "baseUrls": {
          "default": "http://127.0.0.1:3310"
        },
        "values": [
          {
            "type": "any",
            "value": "15",
            "key": "schoolId",
            "isBindInitial": false,
            "initialValue": "15",
            "securityType": "default"
          },
          {
            "type": "any",
            "value": "APIFOX_B01_202609251130",
            "key": "testBatch",
            "isBindInitial": false,
            "initialValue": "APIFOX_B01_202609251130",
            "securityType": "default"
          },
          {
            "type": "any",
            "value": "",
            "key": "app_admin_username",
            "isBindInitial": false,
            "initialValue": "",
            "securityType": "default"
          },
          {
            "type": "any",
            "value": "",
            "key": "app_admin_password",
            "isBindInitial": false,
            "initialValue": "",
            "securityType": "secret"
          }
        ]
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      },
      "advancedSettings": {
        "default": {
          "requestProxySetting": {
            "type": "default",
            "agentId": 2
          }
        }
      }
    },
    "globals": {
      "baseUrls": {},
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "",
      "variable": {
        "id": "d0d59c34-b15f-4488-8b48-5c7fac0ff6fc",
        "baseUrl": "",
        "baseUrls": {},
        "values": []
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      }
    },
    "teamGlobals": {
      "baseUrls": {},
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "",
      "variable": {
        "id": "789e0cb7-9957-4f9a-9d27-6d9a29007e6e",
        "baseUrl": "",
        "baseUrls": {},
        "values": []
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      }
    },
    "moduleVariablesMap": {
      "8641820": []
    },
    "isServerBuild": true,
    "isTestFlowControl": true,
    "projectOptions": {
      "allowAutomationWriteAutomationCreatedSprintBranch": true,
      "enableJsonc": false,
      "enableBigint": false,
      "responseValidate": true,
      "enableTestScenarioSetting": false,
      "enableYAPICompatScript": false,
      "isDefaultUrlEncoding": 2,
      "publishedDocUrlRules": {
        "defaultRule": "RESOURCE_KEY_ONLY",
        "resourceKeyStandard": "NEW"
      },
      "mockSettings": {},
      "language": "zh-CN"
    },
    "ciRunningOptions": {
      "environmentId": 49344529,
      "onError": "continue"
    },
    "projectId": 8881630,
    "databaseConnectionMap": {},
    "reportUrlTemplate": "https://app.apifox.com/link/project/{{projectId}}/api-test/test-report/{{id}}",
    "reportExtra": {
      "runOptions": {
        "environmentId": 49344529,
        "onError": "continue"
      },
      "testScenario": {
        "id": 8794247,
        "name": "S08-菜品与留样人员（双库真实写入）"
      }
    },
    "runnerId": "4edb3f48-a625-4729-889d-aa4c3ea822ae",
    "name": "S08-菜品与留样人员（双库真实写入）"
  }
}