{
  "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": 19752,
      "responseAverage": 448.90909090909093,
      "responseMin": 2,
      "responseMax": 1707,
      "responseSd": 475.80562390070304,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1790389984415,
      "completed": 1790390005687
    },
    "transfers": {
      "responseTotal": 23366
    },
    "failures": [],
    "stepTree": [
      {
        "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8__forEach",
        "type": "forEach",
        "iteration": 0,
        "children": [
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
            "type": "forEachRound",
            "index": 1,
            "element": "http://127.0.0.1:3311",
            "children": [
              {
                "ref": "e7140f3e-c5ab-4d1d-8d71-867d1a4a4cac",
                "type": "customHttp"
              },
              {
                "ref": "f6fff149-af29-411e-aaba-bdd5982e141e",
                "type": "customHttp"
              },
              {
                "ref": "005294bc-70c3-4e38-8c06-97ce6421cd4b",
                "type": "customHttp"
              },
              {
                "ref": "43451a61-7008-47ad-95e5-2328617b21de",
                "type": "customHttp"
              },
              {
                "ref": "f517bc9e-c1fc-41da-895d-e91dd7d5407d",
                "type": "customHttp"
              },
              {
                "ref": "bb5e802f-b6d6-486e-ac69-a02e18d3696b",
                "type": "customHttp"
              },
              {
                "ref": "8108c51c-7af9-4d21-be5b-3a0b6dddfacc",
                "type": "customHttp"
              },
              {
                "ref": "4211c6ff-507d-4ff0-b44d-1821b18ef32e",
                "type": "customHttp"
              },
              {
                "ref": "edb2d917-6e20-4f68-a43d-4edb2d81cee8",
                "type": "customHttp"
              },
              {
                "ref": "1b896524-be99-4ae7-83bd-38776ef86e52",
                "type": "customHttp"
              },
              {
                "ref": "cda3c508-2504-4a06-b5a5-b9ec55b80d77",
                "type": "customHttp"
              },
              {
                "ref": "2cec5ceb-248a-4390-a5f6-d6f59cf21969",
                "type": "customHttp"
              },
              {
                "ref": "b318173b-fbbc-491e-8dad-85232c316608",
                "type": "customHttp"
              },
              {
                "ref": "c6e607ed-dcf4-4b78-bd5b-50b911111120",
                "type": "customHttp"
              },
              {
                "ref": "d098444b-65c0-4ef6-bc46-c32523000862",
                "type": "customHttp"
              },
              {
                "ref": "b394ccfb-b57f-4c7b-8e9e-3525e16a6fa4",
                "type": "customHttp"
              },
              {
                "ref": "12388255-ef58-44ef-ad6e-28bc0c472a1f",
                "type": "customHttp"
              },
              {
                "ref": "b59b378d-1071-4588-925b-e38a5f332c22",
                "type": "customHttp"
              },
              {
                "ref": "61fde561-4a92-4a2e-b47e-2af2a095ec7f",
                "type": "customHttp"
              },
              {
                "ref": "19b1b967-f404-435b-9822-c757af99f301",
                "type": "customHttp"
              },
              {
                "ref": "f605ad99-8e32-4d94-8f51-fac12c0604c1",
                "type": "customHttp"
              },
              {
                "ref": "5e280acf-83a6-4863-be3b-65e25c0aff66",
                "type": "customHttp"
              }
            ]
          },
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
            "type": "forEachRound",
            "index": 2,
            "element": "http://127.0.0.1:3310",
            "children": [
              {
                "ref": "fd3b4520-8267-432b-adc5-e720e303c5f8",
                "type": "customHttp"
              },
              {
                "ref": "e633d535-eedb-40a8-b0fc-369fa0906641",
                "type": "customHttp"
              },
              {
                "ref": "d5e9cbac-cf20-433b-ba0f-81e83379f17f",
                "type": "customHttp"
              },
              {
                "ref": "03490150-c882-4b0c-a7fb-e9fa95af7c04",
                "type": "customHttp"
              },
              {
                "ref": "af745cf6-2ac7-48b3-b618-741188713a84",
                "type": "customHttp"
              },
              {
                "ref": "fe2e52dd-a3fd-4272-9d3d-da33d8b1741b",
                "type": "customHttp"
              },
              {
                "ref": "e605199c-8303-4efb-939b-85ab055cc11a",
                "type": "customHttp"
              },
              {
                "ref": "702b6ca1-b9d0-4721-9272-73754ec471cf",
                "type": "customHttp"
              },
              {
                "ref": "04fb6016-fa38-45f9-8693-19eda750005d",
                "type": "customHttp"
              },
              {
                "ref": "b9ae4af1-27f1-4482-bf9c-86b2bdcc95f8",
                "type": "customHttp"
              },
              {
                "ref": "4383416a-00ee-418b-b5c5-88743e3f40ef",
                "type": "customHttp"
              },
              {
                "ref": "920e2379-8432-43a8-919f-29a37faffaea",
                "type": "customHttp"
              },
              {
                "ref": "0ec3e9df-4084-4353-bc5e-7954e2d2305c",
                "type": "customHttp"
              },
              {
                "ref": "a414baa1-e69a-4ce2-8503-16b9fb70bdeb",
                "type": "customHttp"
              },
              {
                "ref": "e4c3fb83-da52-44f4-9d13-4ab922d26d6c",
                "type": "customHttp"
              },
              {
                "ref": "e3934b76-6575-434a-b5c7-7f66f5db8d0d",
                "type": "customHttp"
              },
              {
                "ref": "2edc3c5e-459e-477e-9815-48b26a5d0f7b",
                "type": "customHttp"
              },
              {
                "ref": "78116b6d-84cc-4d00-b3d1-fc69cf1a1ebd",
                "type": "customHttp"
              },
              {
                "ref": "3ad56d4c-3b8a-4fac-8dfc-5aa115714eeb",
                "type": "customHttp"
              },
              {
                "ref": "f0cb12f7-67dd-4831-b903-37afe34e3752",
                "type": "customHttp"
              },
              {
                "ref": "5e0f3a73-83f3-4ae0-a7bf-0708bcc7ddc7",
                "type": "customHttp"
              },
              {
                "ref": "0c9ded6d-1f1e-4563-9114-bb5a56a5453e",
                "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": 19752,
      "responseAverage": 448.90909090909093,
      "responseMin": 2,
      "responseMax": 1707,
      "responseSd": 475.80562390070304,
      "dnsAverage": 0,
      "dnsMin": 0,
      "dnsMax": 0,
      "dnsSd": 0,
      "firstByteAverage": 0,
      "firstByteMin": 0,
      "firstByteMax": 0,
      "firstByteSd": 0,
      "started": 1790389984415,
      "completed": 1790390005687
    },
    "transfers": {
      "responseTotal": 23366
    },
    "failures": [],
    "stepTree": [
      {
        "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8__forEach",
        "type": "forEach",
        "iteration": 0,
        "children": [
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
            "type": "forEachRound",
            "index": 1,
            "element": "http://127.0.0.1:3311",
            "children": [
              {
                "ref": "e7140f3e-c5ab-4d1d-8d71-867d1a4a4cac",
                "type": "customHttp"
              },
              {
                "ref": "f6fff149-af29-411e-aaba-bdd5982e141e",
                "type": "customHttp"
              },
              {
                "ref": "005294bc-70c3-4e38-8c06-97ce6421cd4b",
                "type": "customHttp"
              },
              {
                "ref": "43451a61-7008-47ad-95e5-2328617b21de",
                "type": "customHttp"
              },
              {
                "ref": "f517bc9e-c1fc-41da-895d-e91dd7d5407d",
                "type": "customHttp"
              },
              {
                "ref": "bb5e802f-b6d6-486e-ac69-a02e18d3696b",
                "type": "customHttp"
              },
              {
                "ref": "8108c51c-7af9-4d21-be5b-3a0b6dddfacc",
                "type": "customHttp"
              },
              {
                "ref": "4211c6ff-507d-4ff0-b44d-1821b18ef32e",
                "type": "customHttp"
              },
              {
                "ref": "edb2d917-6e20-4f68-a43d-4edb2d81cee8",
                "type": "customHttp"
              },
              {
                "ref": "1b896524-be99-4ae7-83bd-38776ef86e52",
                "type": "customHttp"
              },
              {
                "ref": "cda3c508-2504-4a06-b5a5-b9ec55b80d77",
                "type": "customHttp"
              },
              {
                "ref": "2cec5ceb-248a-4390-a5f6-d6f59cf21969",
                "type": "customHttp"
              },
              {
                "ref": "b318173b-fbbc-491e-8dad-85232c316608",
                "type": "customHttp"
              },
              {
                "ref": "c6e607ed-dcf4-4b78-bd5b-50b911111120",
                "type": "customHttp"
              },
              {
                "ref": "d098444b-65c0-4ef6-bc46-c32523000862",
                "type": "customHttp"
              },
              {
                "ref": "b394ccfb-b57f-4c7b-8e9e-3525e16a6fa4",
                "type": "customHttp"
              },
              {
                "ref": "12388255-ef58-44ef-ad6e-28bc0c472a1f",
                "type": "customHttp"
              },
              {
                "ref": "b59b378d-1071-4588-925b-e38a5f332c22",
                "type": "customHttp"
              },
              {
                "ref": "61fde561-4a92-4a2e-b47e-2af2a095ec7f",
                "type": "customHttp"
              },
              {
                "ref": "19b1b967-f404-435b-9822-c757af99f301",
                "type": "customHttp"
              },
              {
                "ref": "f605ad99-8e32-4d94-8f51-fac12c0604c1",
                "type": "customHttp"
              },
              {
                "ref": "5e280acf-83a6-4863-be3b-65e25c0aff66",
                "type": "customHttp"
              }
            ]
          },
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
            "type": "forEachRound",
            "index": 2,
            "element": "http://127.0.0.1:3310",
            "children": [
              {
                "ref": "fd3b4520-8267-432b-adc5-e720e303c5f8",
                "type": "customHttp"
              },
              {
                "ref": "e633d535-eedb-40a8-b0fc-369fa0906641",
                "type": "customHttp"
              },
              {
                "ref": "d5e9cbac-cf20-433b-ba0f-81e83379f17f",
                "type": "customHttp"
              },
              {
                "ref": "03490150-c882-4b0c-a7fb-e9fa95af7c04",
                "type": "customHttp"
              },
              {
                "ref": "af745cf6-2ac7-48b3-b618-741188713a84",
                "type": "customHttp"
              },
              {
                "ref": "fe2e52dd-a3fd-4272-9d3d-da33d8b1741b",
                "type": "customHttp"
              },
              {
                "ref": "e605199c-8303-4efb-939b-85ab055cc11a",
                "type": "customHttp"
              },
              {
                "ref": "702b6ca1-b9d0-4721-9272-73754ec471cf",
                "type": "customHttp"
              },
              {
                "ref": "04fb6016-fa38-45f9-8693-19eda750005d",
                "type": "customHttp"
              },
              {
                "ref": "b9ae4af1-27f1-4482-bf9c-86b2bdcc95f8",
                "type": "customHttp"
              },
              {
                "ref": "4383416a-00ee-418b-b5c5-88743e3f40ef",
                "type": "customHttp"
              },
              {
                "ref": "920e2379-8432-43a8-919f-29a37faffaea",
                "type": "customHttp"
              },
              {
                "ref": "0ec3e9df-4084-4353-bc5e-7954e2d2305c",
                "type": "customHttp"
              },
              {
                "ref": "a414baa1-e69a-4ce2-8503-16b9fb70bdeb",
                "type": "customHttp"
              },
              {
                "ref": "e4c3fb83-da52-44f4-9d13-4ab922d26d6c",
                "type": "customHttp"
              },
              {
                "ref": "e3934b76-6575-434a-b5c7-7f66f5db8d0d",
                "type": "customHttp"
              },
              {
                "ref": "2edc3c5e-459e-477e-9815-48b26a5d0f7b",
                "type": "customHttp"
              },
              {
                "ref": "78116b6d-84cc-4d00-b3d1-fc69cf1a1ebd",
                "type": "customHttp"
              },
              {
                "ref": "3ad56d4c-3b8a-4fac-8dfc-5aa115714eeb",
                "type": "customHttp"
              },
              {
                "ref": "f0cb12f7-67dd-4831-b903-37afe34e3752",
                "type": "customHttp"
              },
              {
                "ref": "5e0f3a73-83f3-4ae0-a7bf-0708bcc7ddc7",
                "type": "customHttp"
              },
              {
                "ref": "0c9ded6d-1f1e-4563-9114-bb5a56a5453e",
                "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",
    "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": "407176f8-8140-4169-b17c-c8257111c950",
            "type": "group",
            "metaInfo": {
              "id": "407176f8-8140-4169-b17c-c8257111c950",
              "type": "group",
              "scopeType": "start",
              "scopeEndId": "05cce571-5ff1-4a4f-903e-9045eb1c8272",
              "isRoot": true,
              "needRecordRoot": false,
              "onError": "continue",
              "extraData": {}
            }
          },
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8__forEach",
            "type": "group",
            "metaInfo": {
              "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8__forEach",
              "type": "group",
              "scopeType": "start",
              "scopeEndId": "4d1be251-039f-4f58-b569-0fb724c6317c",
              "extraData": {
                "array": [
                  "http://127.0.0.1:3311",
                  "http://127.0.0.1:3310"
                ]
              }
            }
          },
          {
            "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
            "type": "forEach",
            "number": 1,
            "parameters": {
              "array": "[\"http://127.0.0.1:3311\",\"http://127.0.0.1:3310\"]",
              "disableOnError": false
            },
            "disable": false,
            "metaInfo": {
              "id": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8",
              "type": "forEach",
              "number": 1,
              "scopeType": "start",
              "scopeEndId": "eef0d271-3de9-47ed-8f54-6c8ca2d2fe4f",
              "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": "8f523801-9959-4a1d-b134-42535e62c33f",
            "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());",
                    "      "
                  ]
                }
              },
              {
                "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": "a67509e4-0ebd-4043-8578-ba5a762a4f31",
              "id": "a67509e4-0ebd-4043-8578-ba5a762a4f31",
              "type": "customHttp",
              "name": "登录并初始化双库测试变量",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 1,
              "httpApiId": 4573491,
              "httpApiCaseId": 4573491,
              "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": "a0f020b7-b8fa-4844-a43e-2c4491b1c0f2",
            "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": "49cdf737-c789-4403-affa-ee3b8ddce66e",
              "id": "49cdf737-c789-4403-affa-ee3b8ddce66e",
              "type": "customHttp",
              "name": "读取菜品列表基线",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 2,
              "httpApiId": 4573490,
              "httpApiCaseId": 4573490,
              "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": "1a5bdbe5-4aeb-4536-a945-0c7442716a01",
            "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": "efbd5288-fc9a-42b1-b9ee-d3f6c7c03284",
              "id": "efbd5288-fc9a-42b1-b9ee-d3f6c7c03284",
              "type": "customHttp",
              "name": "新增中文菜品并返回 ID",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 3,
              "httpApiId": 4573489,
              "httpApiCaseId": 4573489,
              "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": "9ec9388d-ab08-43da-b1f9-ffc2d54c64d5",
            "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": "6ce29e5b-d585-444a-83e9-00b1d4a4f86c",
              "id": "6ce29e5b-d585-444a-83e9-00b1d4a4f86c",
              "type": "customHttp",
              "name": "检查刚创建菜品名称已存在",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 4,
              "httpApiId": 4573488,
              "httpApiCaseId": 4573488,
              "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": "7e29b8ce-038b-45ab-b1f4-58f8ae541d12",
            "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": "52651c0a-88a4-41d8-90d0-ca1ca45e2c7d",
              "id": "52651c0a-88a4-41d8-90d0-ca1ca45e2c7d",
              "type": "customHttp",
              "name": "按 marker 回查新增菜品",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 5,
              "httpApiId": 4573487,
              "httpApiCaseId": 4573487,
              "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": "6d9ff29b-e38c-490d-b634-1c3c13be0baf",
            "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": "a1e312e2-5429-4c0c-b95c-716fdc600f14",
              "id": "a1e312e2-5429-4c0c-b95c-716fdc600f14",
              "type": "customHttp",
              "name": "更新菜品中文、备注、NULL 图片和停用状态",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 6,
              "httpApiId": 4573486,
              "httpApiCaseId": 4573486,
              "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": "c8acb6ca-805d-481b-8729-ae1d5e53d1e3",
            "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": "2997712c-7a0f-44b5-8170-5d85255c8822",
              "id": "2997712c-7a0f-44b5-8170-5d85255c8822",
              "type": "customHttp",
              "name": "更新后回查菜品已持久化",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 7,
              "httpApiId": 4573485,
              "httpApiCaseId": 4573485,
              "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": "235fe29e-f3a4-4730-8600-de0d692bac68",
            "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": "723d4f6f-5c76-48a2-82d0-f1ea2c35a167",
              "id": "723d4f6f-5c76-48a2-82d0-f1ea2c35a167",
              "type": "customHttp",
              "name": "批量导入一条合法菜品和一条超长编号",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 8,
              "httpApiId": 4573484,
              "httpApiCaseId": 4573484,
              "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": "dbf3e72f-77ef-4086-a224-a97308149ebe",
            "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": "14331445-0b7c-4bd1-af35-7a3a0582bc87",
              "id": "14331445-0b7c-4bd1-af35-7a3a0582bc87",
              "type": "customHttp",
              "name": "批量导入后核对合法与失败项",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 9,
              "httpApiId": 4573483,
              "httpApiCaseId": 4573483,
              "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": "a03a94ad-4deb-4bbf-9e0f-1cec6393dcbb",
            "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": "1de961ee-dff0-4f92-bcff-b6a10e7528bb",
              "id": "1de961ee-dff0-4f92-bcff-b6a10e7528bb",
              "type": "customHttp",
              "name": "导出菜品 CSV 并核对本轮数据",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 10,
              "httpApiId": 4573482,
              "httpApiCaseId": 4573482,
              "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": "a5072d94-2de4-419c-8b37-0adf74c9c7ef",
            "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": "c5a1b487-6554-436b-aabc-7b0d4c188008",
              "id": "c5a1b487-6554-436b-aabc-7b0d4c188008",
              "type": "customHttp",
              "name": "直接新增 65 字符菜品编号应 400",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 11,
              "httpApiId": 4573481,
              "httpApiCaseId": 4573481,
              "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": "a829ac7c-5ea2-49d0-b228-140f09781d6a",
            "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": "34c0aaf3-19dd-41ea-92b2-e9be30fc8997",
              "id": "34c0aaf3-19dd-41ea-92b2-e9be30fc8997",
              "type": "customHttp",
              "name": "65 字符编号失败后确认零写入",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 12,
              "httpApiId": 4573480,
              "httpApiCaseId": 4573480,
              "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": "1aea9573-8acf-4a99-a620-15f0e7da3bbf",
            "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": "e55792db-fdd5-4453-bc49-7b334f641dd2",
              "id": "e55792db-fdd5-4453-bc49-7b334f641dd2",
              "type": "customHttp",
              "name": "读取学校人员基线",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 13,
              "httpApiId": 4573479,
              "httpApiCaseId": 4573479,
              "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": "fe8ff238-0596-49ea-b614-f260482b6a63",
            "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": "517f6956-da73-47de-8029-cebb298242b4",
              "id": "517f6956-da73-47de-8029-cebb298242b4",
              "type": "customHttp",
              "name": "新增本轮专用留样人员",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 14,
              "httpApiId": 4573478,
              "httpApiCaseId": 4573478,
              "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": "1b1138ea-1479-43f3-a813-65fbbaa74cd2",
            "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": "4ed6990a-20c0-4f36-ac96-203838f25e67",
              "id": "4ed6990a-20c0-4f36-ac96-203838f25e67",
              "type": "customHttp",
              "name": "回查本轮专用人员",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 15,
              "httpApiId": 4573477,
              "httpApiCaseId": 4573477,
              "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": "5e1a2881-5af8-4fb0-94e1-8e8681c64c87",
            "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\":\"S08-Test-Only@123\",\"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": "4ffecb99-ad2f-4344-b00f-d4bc60d32085",
              "id": "4ffecb99-ad2f-4344-b00f-d4bc60d32085",
              "type": "customHttp",
              "name": "新增留样人员授权",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 16,
              "httpApiId": 4573476,
              "httpApiCaseId": 4573476,
              "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": "006b3338-7a20-4c99-befe-7a5496633898",
            "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": "26774519-39c9-44b6-8cab-9517051d2151",
              "id": "26774519-39c9-44b6-8cab-9517051d2151",
              "type": "customHttp",
              "name": "留样人员列表回查且不得泄露密码",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 17,
              "httpApiId": 4573475,
              "httpApiCaseId": 4573475,
              "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": "e3a7368a-8e5b-4824-ad10-1fc6d5daad05",
            "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('S08-Test-Only@123'); });",
                    "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": "820e9498-9ba0-4b1d-9162-b5e391d1323b",
              "id": "820e9498-9ba0-4b1d-9162-b5e391d1323b",
              "type": "customHttp",
              "name": "留样人员编辑详情可回显密码但证据脱敏",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 18,
              "httpApiId": 4573474,
              "httpApiCaseId": 4573474,
              "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": "bc1dcc91-afa1-4427-b89d-e1fb99c0d5d5",
            "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": "1a5dc1d8-9ec7-4c10-8f29-41257c347c8e",
              "id": "1a5dc1d8-9ec7-4c10-8f29-41257c347c8e",
              "type": "customHttp",
              "name": "更新留样人员中文、时间、布尔值和 NULL 图片",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 19,
              "httpApiId": 4573473,
              "httpApiCaseId": 4573473,
              "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": "95e747b6-572a-4f58-9230-e92c6797dcc4",
            "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": "6837fcfb-dce8-4ae2-8443-6301501b4d7d",
              "id": "6837fcfb-dce8-4ae2-8443-6301501b4d7d",
              "type": "customHttp",
              "name": "更新后回查留样人员字段",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 20,
              "httpApiId": 4573472,
              "httpApiCaseId": 4573472,
              "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": "8867a7e5-7703-48e1-80d9-5642a335b35f",
            "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": "27c6bef5-2c23-48b6-9794-c91742326fe1",
              "id": "27c6bef5-2c23-48b6-9794-c91742326fe1",
              "type": "customHttp",
              "name": "跨校菜品列表应 403",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 21,
              "httpApiId": 4573471,
              "httpApiCaseId": 4573471,
              "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": "95c82ae7-2b64-49c4-98cb-915fe3de1a73",
            "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": "a6b2e8db-35cb-4dcd-ba45-1121d22be5a4",
              "id": "a6b2e8db-35cb-4dcd-ba45-1121d22be5a4",
              "type": "customHttp",
              "name": "无 Token 留样人员列表应 401",
              "projectId": 8881630,
              "relatedId": 8794247,
              "environmentId": 49344529,
              "blockNumber": 22,
              "httpApiId": 4573470,
              "httpApiCaseId": 4573470,
              "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": "eef0d271-3de9-47ed-8f54-6c8ca2d2fe4f",
            "type": "forEach",
            "metaInfo": {
              "id": "eef0d271-3de9-47ed-8f54-6c8ca2d2fe4f",
              "type": "forEach",
              "scopeType": "end",
              "scopeStartId": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8"
            }
          },
          {
            "id": "4d1be251-039f-4f58-b569-0fb724c6317c",
            "type": "group",
            "metaInfo": {
              "id": "4d1be251-039f-4f58-b569-0fb724c6317c",
              "type": "group",
              "scopeType": "end",
              "scopeStartId": "7bea54ad-0eea-433b-a3aa-cc9a8d355ea8__forEach"
            }
          },
          {
            "id": "05cce571-5ff1-4a4f-903e-9045eb1c8272",
            "type": "group",
            "metaInfo": {
              "id": "05cce571-5ff1-4a4f-903e-9045eb1c8272",
              "type": "group",
              "scopeType": "end",
              "scopeStartId": "407176f8-8140-4169-b17c-c8257111c950"
            }
          }
        ],
        "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": "0e070276-b3b4-4c35-b60a-b2a9299e575d",
        "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": "8decc645-51c3-4ba3-8495-26cb4ddfc255",
        "baseUrl": "",
        "baseUrls": {},
        "values": []
      },
      "parameter": {
        "header": [],
        "query": [],
        "body": [],
        "cookie": []
      }
    },
    "teamGlobals": {
      "baseUrls": {},
      "websocketBaseUrls": {},
      "socketioBaseUrls": {},
      "baseUrl": "",
      "variable": {
        "id": "35907a4b-f459-4ba5-b60e-bce20b765b85",
        "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": "13280066-3861-462c-8a54-eeff9837fbca",
    "name": "S08-菜品与留样人员（双库真实写入）"
  }
}