### 工程 ###### 创建游戏 URL: /project/ METHOD: POST URL Parameters:TYPE: JSON Parameter | Type | Description | :----------- | :------: | ------------: | ``` { "name":游戏的名陈, // String "intro":游戏简介, // String "startNum":开始的剧情id // String "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", } ``` name | String | 工程名称 intro | String | 工程介绍 userId | Long | 用户id Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":状态码, "msg":提示, "data":插入id} ``` ###### 删除游戏 URL: /project/{id}/ METHOD: DELETE URL Parameters:(NULL) Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 改变游戏信息 URL: /project/{id}/ METHOD: PUT URL Parameters:TYPE: JSON Parameter | Type | Description | :----------- | :------: | ------------: | id | Long | 工程id name | String | 工程名称 intro | String | 工程介绍 userId | Long | 用户id startNum | String | 开始的剧情id botId | Long | bot id botAccount | String | bot account nickname | String | 用户别名 applyStatus | String | 审核状态码, applySuggestion | String | 审核意见 Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 查询游戏信息 URL: /project/{id}/ METHOD: GET URL Parameters:(NULL) Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code":1, "msg":"成功", "data":{ "id":22, "name":"nihao", "intro":"wohenhao", "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "gmtGenerate":"1543469935000" "applyStatus":"1", "applySuggestion":"写错联网" } } ``` ###### 通过用户id获得所有的游戏信息 URL: /project/ METHOD: GET URL Parameters:(param) Parameter | Type | Description | :----------- | :------: | ------------: | userId | Long| Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [ { "id": 22, "name": "nihao", "intro": "wohenhao", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "gmtGenerate":"1543469935000" "applyStatus":"1", "applySuggestion":"写错联网" }, { "id": 23, "name": "超级玛丽", "intro": "别摸我的头,我的头是用来顶蘑菇的", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "gmtGenerate":"1543469935000" "applyStatus":"1", "applySuggestion":"写错联网" }, { "id": 24, "name": "超级玛丽", "intro": "别摸我的头,我的头是用来顶蘑菇的", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "gmtGenerate":"1543469935000" "applyStatus":"1", "applySuggestion":"写错联网" }] } ``` ###### 通过用户名获得所有的游戏信息 URL: /project/by_username/ METHOD: GET URL Parameters:(param) Parameter | Type | Description | :----------- | :------: | ------------: | username | String| Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [ { "id": 22, "name": "nihao", "intro": "wohenhao", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "applyStatus":"1", "applySuggestion":"写错联网" }, { "id": 23, "name": "超级玛丽", "intro": "别摸我的头,我的头是用来顶蘑菇的", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "applyStatus":"1", "applySuggestion":"写错联网" }, { "id": 24, "name": "超级玛丽", "intro": "别摸我的头,我的头是用来顶蘑菇的", "userId": 7 "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "applyStatus":"1", "applySuggestion":"写错联网" }] } ``` ###### 获取开始剧情编号 URL: /project/{id}/start_num METHOD: GET URL Parameters: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"stratNum":"1-1"}} ``` ###### 设置开始剧情编号 URL: /project/{id}/start_num METHOD: POST URL Parameters:param startNum String Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":{"stratNum":"1-2"}} ``` ###### 获取开始剧情编号 URL: /generate_json/{id}/ METHOD: GET URL Parameters: Parameter | Type | Description | :----------- | :------: | ------------: | Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ###### 通过botId删除游戏 URL: /project/ METHOD: DELETE URL Parameters:(param) botId Long Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` {"code":50001,"msg":"botid对应的游戏不存在","data":null} {"code":1,"msg":"成功","data":null} ``` ###### 查询游戏信息 URL: /project/ METHOD: GET URL Parameters:(params) botId Long Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code":1, "msg":"成功", "data":{ "id":22, "name":"内部测试", "intro":"这是内部测试的", "botId":2709, "botId": // Long "botAccount": // String "userId": // Long "username" // String "nickname":"hai", "generateStatus":"1", "applyStatus":"1", "applySuggestion":"写错联网" } } {"code":50001,"msg":"bot id 错误!","data":null} ``` ###### 管理员查询所有的游戏 URL: /project/all/ METHOD: GET URL Parameters:(params) botId Long Headers: Parameter | Type | Description | :----------- | :------: | ------------: | content-type | application/json;charset=utf-8 ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 11, "name": "王者荣耀!", "intro": "是兄弟就出来砍我两刀!", "startNum": null, "botId": null, "botAccount": null, "userId": 0, "username": null, "nickname": null, "generateStatus": null, "applyStatus": "0", "applySuggestion": null }, { "id": 25, "name": "游戏", "intro": "游戏简介", "startNum": null, "botId": null, "botAccount": null, "userId": 0, "username": null, "nickname": null, "generateStatus": null, "applyStatus": "0", "applySuggestion": null }] } ``` ###### 更新访问次数 URL: /project/{id}/watch/ METHOD: PUT URL Parameters: | name | type | description | sendWay | | :----| :---- | :---- | :---- | | id | Number | 作品的id | pathVariable | ResponseBody: ``` {"code":1,"msg":"成功","data":null} ``` ``` apply_status: 0:未审核 1:审核通过 -1:审核未通过 2: 审核中 ``` ###### 获取用户审核通过的作品 URL: /project/ URL Parameters: | name | type | description | sendWay | | :----| :---- | :---- | :---- | | username | String | 作者姓名 | requestParam | | applyStatus | Number | 审核状态 | requestParam | ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 180, "name": "李进峰测试", "intro": "李进峰测试", "botId": 2879, "botAccount": "1779383837", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 1, "applyStatus": 1, "applySuggestion": null, "watch": 0 }, { "id": 216, "name": "数据测试", "intro": "数据测试", "botId": 3002, "botAccount": "7101929085", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 0, "applyStatus": 1, "applySuggestion": "", "watch": 0 }, { "id": 233, "name": "我的一天", "intro": "我的一天", "botId": 3093, "botAccount": "4096611751", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 1, "applyStatus": 1, "applySuggestion": "", "watch": 0 }, { "id": 235, "name": "特殊", "intro": "特殊", "botId": 3105, "botAccount": "6309871697", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 0, "applyStatus": 1, "applySuggestion": "", "watch": 0 }] } ``` ###### 获取所有审核通过的作品 URL: /project/ URL Parameters: | name | type | description | sendWay | | :----| :---- | :---- | :---- | | applyStatus | Number | 审核状态 | requestParam | | orderBy = watch ResponseBody: ``` { "code": 1, "msg": "成功", "data": [{ "id": 180, "name": "李进峰测试", "intro": "李进峰测试", "botId": 2879, "botAccount": "1779383837", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 1, "applyStatus": 1, "applySuggestion": null, "watch": 0 }, { "id": 212, "name": "三国演义", "intro": "东汉末年,三国统治中展开精彩的演绎", "botId": 2973, "botAccount": "7520330582", "userId": null, "username": "Bella123", "nickname": "Bella123", "generateStatus": 0, "applyStatus": 1, "applySuggestion": "", "watch": 0 }, { "id": 216, "name": "数据测试", "intro": "数据测试", "botId": 3002, "botAccount": "7101929085", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 0, "applyStatus": 1, "applySuggestion": "", "watch": 0 }, { "id": 233, "name": "我的一天", "intro": "我的一天", "botId": 3093, "botAccount": "4096611751", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 1, "applyStatus": 1, "applySuggestion": "", "watch": 0 }, { "id": 235, "name": "特殊", "intro": "特殊", "botId": 3105, "botAccount": "6309871697", "userId": null, "username": "jinfengli", "nickname": "李进峰", "generateStatus": 0, "applyStatus": 1, "applySuggestion": "", "watch": 0 }] } ```