{ "info": { "_postman_id": "3fab44b6-d4fb-4afd-81ad-31f1ec49c8c4", "name": "兰州铜箔LMS系统接口", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "手持请求LMS", "description": "", "item": [], "event": [ { "listen": "prerequest", "script": { "id": "49a0ac7b-36e4-4dd8-8a13-2abd34b2b4e0", "type": "text/javascript", "exec": [ "var data = {", "\"username\":\"admin\",", "\"password\":\"uefvHbyUCADkudW1MV+/yw9XBWR2Z+KDyq+dqQ+ozr1loClUgqm4XQPsUl87IsXetYBWRDLo7HC++20VHlW80g==\"", "}", "var url='http://127.0.0.1:8010'", "const echoPostRequest = {", "  url: url+'/mobile/auth/login',", "  method: 'POST',", "  header: 'Content-Type:application/json',", "  body: {", "    mode: 'raw',", "    raw: JSON.stringify(data)", "  }", "};", "pm.sendRequest(echoPostRequest, function (err, res) {", "  console.log(err ? err : res.json());", "  console.log(res.json());", "});" ] } }, { "listen": "test", "script": { "id": "91ab2f46-03b4-4418-9784-1e21f402e4eb", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "LMS请求MES", "description": "", "item": [ { "name": "http://localhost:8010/api/param/getStageCodeByCode", "request": { "method": "GET", "header": [], "body": {}, "url": { "raw": "http://localhost:8010/api/param/getStageCodeByCode", "protocol": "http", "host": [ "localhost" ], "port": "8010", "path": [ "api", "param", "getStageCodeByCode" ] } }, "response": [] } ] }, { "name": "MES请求LMS", "description": "", "item": [], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI2ZjI2OGMxZjAyOTE0MTNiOWU3YThmMTM2ZTc2MWJkYSIsImF1dGgiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.lKxY3Wc_efzmBXXAS_dDC_Sfh32kZInxYmaxBzg83e5gviSJPPKolNt4IlCCaGM8HOc_yKByiIu8YFlgQif01Q", "type": "string" } ] } }, { "name": "LMS请求CRM", "description": "", "item": [] }, { "name": "CRM请求MES", "description": "", "item": [] }, { "name": "ACS请求LMS", "description": "", "item": [], "event": [ { "listen": "prerequest", "script": { "id": "2f9e1cf4-d33b-4c2c-85fb-546f276da5b7", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "d7ddf3ac-5ecf-4a01-ae1c-c491bd7b645b", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "LMS请求ACS", "description": "", "item": [], "event": [ { "listen": "prerequest", "script": { "id": "2f9e1cf4-d33b-4c2c-85fb-546f276da5b7", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "d7ddf3ac-5ecf-4a01-ae1c-c491bd7b645b", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "SAP请求LMS", "description": "", "item": [] }, { "name": "LMS请求SAP", "description": "", "item": [] }, { "name": "示例", "description": "", "item": [ { "name": "LMS登录", "event": [ { "listen": "prerequest", "script": { "id": "56672d9d-9bac-4f23-b77e-809647ef5df4", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "48d9e766-7014-4243-80de-81d63be07da5", "type": "text/javascript", "exec": [ "//postman使用:https://blog.csdn.net/wangyiyan315/article/details/122441791", "", "var JsonData = JSON.parse(responseBody); //定义一个变量,并且将请求返回的内容赋给该变量", "pm.globals.set(\"lms_token\", JsonData.token.slice(7)); //7代表去掉token前面的Bearer加空格", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n\t\n\t\"username\":\"admin\",\n\t\"password\":\"uefvHbyUCADkudW1MV+/yw9XBWR2Z+KDyq+dqQ+ozr1loClUgqm4XQPsUl87IsXetYBWRDLo7HC++20VHlW80g==\"\n}" }, "url": { "raw": "{{lms_url}}/mobile/auth/login", "host": [ "{{lms_url}}" ], "path": [ "mobile", "auth", "login" ] }, "description": "LMS登录并设置返回的token" }, "response": [] }, { "name": "系统参数分页查询-示例", "event": [ { "listen": "prerequest", "script": { "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{lms_token}}", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "/api/param" }, "url": { "raw": "{{lms_url}}/api/param?sort=id,desc&size=10&page=0", "host": [ "{{lms_url}}" ], "path": [ "api", "param" ], "query": [ { "key": "sort", "value": "id,desc" }, { "key": "size", "value": "10" }, { "key": "page", "value": "0" }, { "key": null, "value": null }, { "key": null, "value": null } ] }, "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" }, "response": [] }, { "name": "根据编码获取值-示例", "event": [ { "listen": "prerequest", "script": { "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{lms_token}}", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "IS_CONNECT_ACS" }, "url": { "raw": "{{lms_url}}/api/param/getValueByCode", "host": [ "{{lms_url}}" ], "path": [ "api", "param", "getValueByCode" ] }, "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" }, "response": [] }, { "name": "删除参数-示例", "event": [ { "listen": "prerequest", "script": { "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{lms_token}}", "type": "string" } ] }, "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "[\"0c1d96d335cd4dd6aa0a4bee4b1c45fe\"]" }, "url": { "raw": "{{lms_url}}/api/param", "host": [ "{{lms_url}}" ], "path": [ "api", "param" ] }, "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" }, "response": [] }, { "name": "新增参数-示例", "event": [ { "listen": "prerequest", "script": { "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{lms_token}}", "type": "string" } ] }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"code\":\"test22\",\"is_active\":\"1\",\"remark\":\"test11\",\"name\":\"test11\",\"value\":\"test11\"}" }, "url": { "raw": "{{lms_url}}/api/param", "host": [ "{{lms_url}}" ], "path": [ "api", "param" ] }, "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" }, "response": [] }, { "name": "修改参数-示例", "event": [ { "listen": "prerequest", "script": { "id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{lms_token}}", "type": "string" } ] }, "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"code\":\"test22\",\"is_active\":\"8\",\"create_time\":\"2022-10-14 13:33:52\",\"remark\":\"888\",\"update_time\":\"2022-10-14 13:33:52\",\"update_optname\":\"管理员\",\"create_id\":1,\"name\":\"888\",\"id\":\"3f1901b5814d40908bad602854b22aa6\",\"value\":\"8888\",\"update_optid\":1,\"create_name\":\"管理员\"}" }, "url": { "raw": "{{lms_url}}/api/param", "host": [ "{{lms_url}}" ], "path": [ "api", "param" ] }, "description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}" }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "id": "bea134f1-29ee-4ea7-8450-66c01dce0cf5", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "6d0b3712-c0bd-4190-b567-90695243bd0e", "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "id": "254153fe-2272-4cc8-af50-1dcfe5b7cad2", "key": "lms_url", "value": "http://localhost:8010", "type": "string", "description": "" }, { "id": "573a2380-1342-41a5-bb29-dbb830a86a55", "key": "acs_url", "value": "http://localhost:8010", "type": "string", "description": "" }, { "id": "1388a0e2-20e0-4da8-a84e-6604694ad4a5", "key": "mes_url", "value": "http://localhost:8010", "type": "string", "description": "" }, { "id": "a0d1ff39-8d91-4636-8d5d-34ba2906b15b", "key": "sap_url", "value": "http://localhost:8010", "type": "string", "description": "" }, { "id": "1e6fff53-e106-4875-aacf-8b39e8d2a577", "key": "crm_url", "value": "http://localhost:8010", "type": "string", "description": "" } ] }