### 物品 ###### 添加物品模板 URL: /goods/class/ METHOD: POST URL Parameters|TYPE: JSON ``` { "name":"瑞哪", "intro":"队长的报表", "npcClassId":13, "placeId":12, "placeName":"中国", "npcInstanceAttrVos":[ { "npcClassAttrId":1, "name":"杀伤力", "value":"1000", }, { "npcClassAttrId":2, "name":"年龄", "value":"18" } ] } data ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"id":12}} ``` ###### 删除物品模板 URL: /goods/class/{id}/ METHOD: DELETE URL Parameters | TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 更新物品模板信息 URL: /goods/class/{id}/ METHOD: PUT URL Parameters|TYPE: JSON ``` { "id": 12, "name": "急救包", "intro": "用来补充血量的物品", "goodsClassAttrVos": [{ "id": 39, "name": "使用度", "value": "50" }, { "id": 40, "name": "加血量", "value": "20" }], "projectId": 11 } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 查询物品模板信息 URL: /goods/class/{id}/ METHOD: GET URL Parameters|TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": { "id": 12, "name": "急救包", "intro": "用来补充血量", "goodsClassAttrVos": [{ "id": 35, "name": "重量", "value": "100" }, { "id": 36, "name": "药量", "value": "20" }, { "id": 39, "name": "使用度", "value": "50" }, { "id": 40, "name": "加血量", "value": "20" }], "projectId": 11 } } ``` ###### 查询当前工程下所有物品类信息 URL: /goods/class/ METHOD: GET URL Parameters|TYPE:Param Parameter | Type | Description | :----------- | :------: | ------------: | projectId | Long | 工程的id Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 11, "name": "武器", "intro": "角色的主要攻击手段", "goodsClassAttrVos": [{ "id": 32, "name": "", "value": "" }, { "id": 33, "name": "疗效", "value": "很快" }, { "id": 34, "name": "苦", "value": "一般" }], "projectId": 11 }, { "id": 15, "name": "急救包", "intro": "用来补充血量", "goodsClassAttrVos": [{ "id": 15, "name": "332234234", "value": "33" }, { "id": 45, "name": "使用度", "value": "50" }, { "id": 46, "name": "加血量", "value": "20" }], "projectId": 11 }] } ``` ###### 添加物品实例信息 URL: /goods/instance/ METHOD: POST URL Parameters|TYPE: JSON ``` { "name":"急救包", "intro":"用来补充血量", "placeId":13, "placeName":"中国", "npcId":11, "npcName":"瑞哪", "goodsClassId":"11", "goodsInstanceAttrVos":[ { "goodsClassAttrId":1, "name":"使用度", "value":"50" }, { "goodsClassAttrId":2, "name":"加血量", "value":"20" } ] } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"id":20}} ``` ###### 删除物品实例信息 URL: /goods/{id}/ METHOD: DELETE URL Parameters | TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 改变物品实例信息 URL: /goods/id/ METHOD: PUT URL Parameters|TYPE: JSON ``` { "id": 20, "name": "急救包", "intro": "用来补充血量的", "placeId": 13, "placeName": "中国", "npcId": 11, "npcName": "瑞哪", "goodsClassId": 11, "goodsInstanceAttrVos": [{ "id": 3, "name": "使用度", "value": "20", "goodsClassAttrId": 1, "goodsInstanceId": 20 }, { "id": 4, "name": "加血量", "value": "10", "goodsClassAttrId": 2, "goodsInstanceId": 20 },{ "name": "加血量1", "value": "100", "goodsClassAttrId": 2, "goodsInstanceId": 20 }] } ``` Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"id":3}} ``` ###### 获得物品实例信息 URL: /goods/instance/{id}/ METHOD: GET URL Parameters|TYPE: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": { "id": 20, "name": "急救包", "intro": "用来补充血量", "placeId": 13, "placeName": "中国", "npcId": 11, "npcName": "瑞哪", "goodsClassId": 11, "goodsInstanceAttrVos": [{ "id": 3, "name": "使用度", "value": "50", "goodsClassAttrId": 1, "goodsInstanceId": 20 }, { "id": 4, "name": "加血量", "value": "20", "goodsClassAttrId": 2, "goodsInstanceId": 20 }] } } ``` ###### 通过类获得所有物品实例信息 URL: /goods/instance/ METHOD: GET URL Parameters|TYPE:Param Parameter | Type | Description | :----------- | :------: | ------------: | goodsClassId | Long | 物品分类的id Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 17, "name": "急救包", "intro": "用来补充血量", "placeId": 13, "placeName": "中国", "npcId": 11, "npcName": "瑞哪", "goodsClassId": 11, "goodsInstanceAttrVos": [] }, { "id": 18, "name": "急救包", "intro": "用来补充血量", "placeId": 13, "placeName": "中国", "npcId": 11, "npcName": "瑞哪", "goodsClassId": 11, "goodsInstanceAttrVos": [] }, { "id": 19, "name": "急救包", "intro": "用来补充血量", "placeId": 13, "placeName": "中国", "npcId": 11, "npcName": "瑞哪", "goodsClassId": 11, "goodsInstanceAttrVos": [{ "id": 1, "name": "使用度", "value": "50", "goodsClassAttrId": 1 }, { "id": 2, "name": "加血量", "value": "20", "goodsClassAttrId": 2 }] }] }] } ``` ###### 搜索goods类 URL: /goods/class/search/ METHOD: POST URL Parameters|TYPE:Form Parameter | Type | Description | :----------- | :------: | ------------: | |projectId|Long|游戏工程id| |searchText|String|搜索的文本| content-type | application/x-www-form-urlencoded Result ``` { "code": 1, "msg": "成功", "data": [{ "id": 13, "name": "急救包", "intro": "用来补充血量", "goodsClassAttrVos": [{ "id": 41, "name": "使用度", "value": "50" }, { "id": 42, "name": "加血量", "value": "20" }], "projectId": 11 }, { "id": 14, "name": "急救包", "intro": "用来补充血量", "goodsClassAttrVos": [{ "id": 43, "name": "使用度", "value": "50" }, { "id": 44, "name": "加血量", "value": "20" }], "projectId": 11 }] } ``` ###### 搜索goods实例 URL: /goods/instance/search/ METHOD: POST URL Parameters|TYPE:Form Parameter | Type | Description | :----------- | :------: | ------------: | |goodsClassId|Long|物品类的id| |searchText|String|搜索的文本| content-type | application/x-www-form-urlencoded Result ``` { "code": 1, "msg": "成功", "data": [{ "id": 28, "name": "初级匕首", "intro": "初级匕首", "placeId": 13, "placeName": "", "npcId": 20, "npcName": "", "goodsClassId": 16, "goodsInstanceAttrVos": [{ "id": 19, "name": "攻击速度", "value": "110", "goodsClassAttrId": 49 }, { "id": 20, "name": "攻击力", "value": "1000", "goodsClassAttrId": 50 }] }, { "id": 31, "name": "二货匕首", "intro": "二货的专用匕首", "placeId": 13, "placeName": "匕首", "npcId": 20, "npcName": "匕首", "goodsClassId": 16, "goodsInstanceAttrVos": [{ "id": 17, "name": "攻击速度", "value": "222", "goodsClassAttrId": 49 }, { "id": 18, "name": "攻击力", "value": "222", "goodsClassAttrId": 50 }] }] } ``` ###### 获得游戏下的所有物品实例 URL: /goods/instance_by_project_id/{projectId}/ METHOD: GET Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 33, "name": "蓝色药水", "intro": "有100ml能量液", "placeId": 44, "placeName": "营地", "npcId": null, "npcName": "瑞娜", "goodsClassId": 20, "goodsInstanceAttrVos": [{ "id": 25, "name": "数量", "value": "2", "goodsClassAttrId": 55 }] }, { "id": 34, "name": "纱布", "intro": "能够进行简单包扎", "placeId": 44, "placeName": "营地", "npcId": null, "npcName": "", "goodsClassId": 20, "goodsInstanceAttrVos": [{ "id": 26, "name": "数量", "value": "1", "goodsClassAttrId": 55 }] }] } ```