修复token刷新问题,添加postman测试文件

This commit is contained in:
macro 2019-03-12 10:18:36 +08:00
parent 03b225fd1b
commit efb540cb09
3 changed files with 517 additions and 1 deletions

View File

@ -0,0 +1,188 @@
{
"variables": [],
"info": {
"name": "mall-admin",
"_postman_id": "f4a4382c-ee6c-975f-99ac-7645532458ba",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "添加优惠券",
"request": {
"url": "{{admin.mall}}/coupon/add",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"amount\": 50,\r\n \"count\": 100,\r\n \"enableTime\": \"2018-08-27T08:40:46.973Z\",\r\n \"endTime\": \"2018-08-31T08:40:46.973Z\",\r\n \"minPoint\": 500,\r\n \"name\": \"T恤分类专用优惠券\",\r\n \"note\": \"满500减50\",\r\n \"perLimit\": 1,\r\n \"platform\": 0,\r\n \"publishCount\": 100,\r\n \"receiveCount\": 0,\r\n \"startTime\": \"2018-08-27T08:40:46.973Z\",\r\n \"type\": 0,\r\n \"useCount\": 0,\r\n \"useType\": 1,\r\n \"productCategoryRelationList\": [\r\n {\r\n \"productCategoryId\": 8\r\n }\r\n ]\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "删除指定优惠券",
"request": {
"url": "{{admin.mall}}/coupon/delete/6",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "修改指定优惠券",
"request": {
"url": "{{admin.mall}}/coupon/update/6",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"amount\": 300,\r\n \"count\": 100,\r\n \"enableTime\": \"2018-08-27T08:40:46.973Z\",\r\n \"endTime\": \"2018-08-31T08:40:46.973Z\",\r\n \"minPoint\": 2000,\r\n \"name\": \"满2000减200\",\r\n \"note\": \"手机分类专用优惠券\",\r\n \"perLimit\": 1,\r\n \"platform\": 0,\r\n \"publishCount\": 100,\r\n \"receiveCount\": 0,\r\n \"startTime\": \"2018-08-27T08:40:46.973Z\",\r\n \"type\": 0,\r\n \"useCount\": 0,\r\n \"useType\": 1,\r\n \"productCategoryRelationList\": [\r\n {\r\n \"productCategoryId\": 18\r\n }\r\n ]\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "登录",
"request": {
"url": "{{admin.mall}}/admin/login",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"password\": \"123456\",\r\n \"username\": \"admin\"\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "查看商品列表",
"request": {
"url": "{{admin.mall}}/product/list",
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImNyZWF0ZWQiOjE1Mzg5OTExNzkwODAsImV4cCI6MTUzOTU5NTk3OX0.u_fUHf09ONw6CCQW0ERufOgfuGUY1g7hu-o9thMl6wsFlBlkn1QmOZJwlU1ejsc65-N3p3k1pb11vTeqrVnYIw",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "批量修改商品的删除状态",
"request": {
"url": "{{admin.mall}}/product/update/deleteStatus",
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImNyZWF0ZWQiOjE1Mzg5OTExNzkwODAsImV4cCI6MTUzOTU5NTk3OX0.u_fUHf09ONw6CCQW0ERufOgfuGUY1g7hu-o9thMl6wsFlBlkn1QmOZJwlU1ejsc65-N3p3k1pb11vTeqrVnYIw",
"description": ""
},
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "ids",
"value": "1,2",
"description": "",
"type": "text"
},
{
"key": "deleteStatus",
"value": "1",
"description": "",
"type": "text"
}
]
},
"description": ""
},
"response": []
},
{
"name": "查询所有一级分类及子分类",
"request": {
"url": "{{admin.mall}}/productCategory/list/withChildren",
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImNyZWF0ZWQiOjE1Mzg5OTExNzkwODAsImV4cCI6MTUzOTU5NTk3OX0.u_fUHf09ONw6CCQW0ERufOgfuGUY1g7hu-o9thMl6wsFlBlkn1QmOZJwlU1ejsc65-N3p3k1pb11vTeqrVnYIw",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "获取全部品牌列表",
"request": {
"url": "{{admin.mall}}/brand/listAll",
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImNyZWF0ZWQiOjE1Mzg5OTExNzkwODAsImV4cCI6MTUzOTU5NTk3OX0.u_fUHf09ONw6CCQW0ERufOgfuGUY1g7hu-o9thMl6wsFlBlkn1QmOZJwlU1ejsc65-N3p3k1pb11vTeqrVnYIw",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
},
{
"name": "刷新token",
"request": {
"url": "{{admin.mall}}/admin/token/refresh",
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImNyZWF0ZWQiOjE1NTIzNTYzNzg0NjUsImV4cCI6MTU1Mjk2MTE3OH0.cxT6ULWfA17_QOh5nAcdU8FVldrSxLC2yi3y4fiHetCCrNzBBF9k6iRN-gfFmYa1_Ptav4WjgUAspZDBQa7SsA",
"description": ""
}
],
"body": {},
"description": ""
},
"response": []
}
]
}

View File

@ -0,0 +1,328 @@
{
"variables": [],
"info": {
"name": "mall-portal",
"_postman_id": "bb2ab4ed-fa53-9c01-9fe1-ef1568038701",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "会员登录",
"request": {
"url": "{{portal.mall}}/sso/login",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/x-www-form-urlencoded",
"description": ""
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "username",
"value": "test",
"description": "",
"type": "text"
},
{
"key": "password",
"value": "123",
"description": "",
"type": "text"
}
]
},
"description": ""
},
"response": []
},
{
"name": "获取购物车列表",
"request": {
"url": "{{portal.mall}}/cart/list",
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "清空购物车",
"request": {
"url": "{{portal.mall}}/cart/clear",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "加入购物车",
"request": {
"url": "{{portal.mall}}/cart/add",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"price\": 5499,\r\n \"productId\": 29,\r\n \"productName\": \"Apple iPhone 8 Plus\",\r\n \"productSkuCode\": \"201808270029001\",\r\n \"productSkuId\": 106,\r\n \"productSubTitle\": \"【限时限量抢购】Apple产品年中狂欢节好物尽享美在智慧速来 >> 勾选[保障服务][原厂保2年]获得AppleCare+全方位服务计划,原厂延保售后无忧。\",\r\n \"quantity\": 1,\r\n \"sp1\": \"金色\",\r\n \"sp2\": \"32G\",\r\n \"sp3\": null\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "获取购物车列表(包括促销信息)",
"request": {
"url": "{{portal.mall}}/cart/list/promotion",
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "修改购物车中商品数量",
"request": {
"url": {
"raw": "{{portal.mall}}/cart/update/quantity?id=15&quantity=1",
"host": [
"{{portal.mall}}"
],
"path": [
"cart",
"update",
"quantity"
],
"query": [
{
"key": "id",
"value": "15",
"equals": true,
"description": ""
},
{
"key": "quantity",
"value": "1",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "添加收货地址",
"request": {
"url": "{{portal.mall}}/member/address/add",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"defaultStatus\": 1,\r\n \"name\": \"大梨\",\r\n \"phoneNumber\": \"18033441849\",\r\n \"postCode\": \"518000\",\r\n \"city\": \"深圳市\",\r\n \"detailAddress\": \"东晓街道\",\r\n \"province\": \"广东省\",\r\n \"region\": \"福田区\"\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "删除收货地址",
"request": {
"url": "{{portal.mall}}/member/address/delete/2",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "查询指定收货地址",
"request": {
"url": "{{portal.mall}}/member/address/3",
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "修改收货地址",
"request": {
"url": "{{portal.mall}}/member/address/update/3",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\n \"id\": 3,\n \"memberId\": 1,\n \"name\": \"大梨\",\n \"phoneNumber\": \"18033441849\",\n \"defaultStatus\": 0,\n \"postCode\": \"518000\",\n \"province\": \"广东省\",\n \"city\": \"深圳市\",\n \"region\": \"福田区\",\n \"detailAddress\": \"清水河街道\"\n }"
},
"description": ""
},
"response": []
},
{
"name": "领取优惠券",
"request": {
"url": "{{portal.mall}}/member/coupon/add/7",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "获取会员优惠券列表",
"request": {
"url": "{{portal.mall}}/member/coupon/list",
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "获取购物车可用优惠券",
"request": {
"url": "{{portal.mall}}/member/coupon/list/cart/1",
"method": "GET",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "根据购物车信息生成确认单",
"request": {
"url": "{{portal.mall}}/order/confirmOrder",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "下单",
"request": {
"url": "{{portal.mall}}/order/generateOrder",
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"couponId\": 2,\r\n \"memberReceiveAddressId\": 4,\r\n \"payType\": 0\r\n}"
},
"description": ""
},
"response": []
},
{
"name": "订单支付成功回调",
"request": {
"url": {
"raw": "{{portal.mall}}/order/paySuccess?orderId=12",
"host": [
"{{portal.mall}}"
],
"path": [
"order",
"paySuccess"
],
"query": [
{
"key": "orderId",
"value": "12",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "取消超时订单",
"request": {
"url": "{{portal.mall}}/order/cancelTimeOutOrder",
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
},
{
"name": "取消单个超时订单",
"request": {
"url": {
"raw": "{{portal.mall}}/order/cancelOrder?orderId=13",
"host": [
"{{portal.mall}}"
],
"path": [
"order",
"cancelOrder"
],
"query": [
{
"key": "orderId",
"value": "13",
"equals": true,
"description": ""
}
],
"variable": []
},
"method": "POST",
"header": [],
"body": {},
"description": ""
},
"response": []
}
]
}

View File

@ -71,7 +71,7 @@ public class UmsAdminController {
return new CommonResult().failed();
}
Map<String, String> tokenMap = new HashMap<>();
tokenMap.put("token", token);
tokenMap.put("token", refreshToken);
tokenMap.put("tokenHead", tokenHead);
return new CommonResult().success(tokenMap);
}