从零到企业级SSM电商项目验收测试(五)收货地址管理模块测试

1.添加地址

/shipping/add.do

http://localhost:8080/shipping/add.do?userId=1&receiverName=geely&receiverPhone=010&receiverMobile=18688888888&receiverProvince=四川省&receiverCity=成都市&receiverAddress=锦江区&receiverZip=100000

[v_act]request[/v_act]

userId=1
receiverName=geely
receiverPhone=010
receiverMobile=18688888888
receiverProvince=北京
receiverCity=北京市
receiverAddress=中关村
receiverZip=100000

[v_act]response[/v_act]
success

{
    "status": 0,
    "msg": "新建地址成功",
    "data": {
        "shippingId": 28
    }
}

fail

{
    "status": 1,
    "msg": "新建地址失败"
}

2.删除地址

/shipping/del.do
[v_act]request[/v_act]

shippingId

[v_act]response[/v_act]
success

{
    "status": 0,
    "msg": "删除地址成功"
}


fail

{
    "status": 1,
    "msg": "删除地址失败"
}

3.登录状态更新地址

/shipping/update.do

[v_act]request[/v_act]

id=1
receiverName=geely
receiverPhone=010
receiverMobile=18688888888
receiverProvince=北京
receiverCity=北京市
receiverAddress=中关村
receiverZip=100000

http://localhost:8080/shipping/update.do?id=31&receiverName=geekerstar&receiverPhone=010&receiverMobile=18688888888&receiverProvince=四川省&receiverCity=成都市&receiverAddress=锦江区&receiverZip=100000

[v_act]response[/v_act]

success

{
    "status": 0,
    "msg": "更新地址成功"
}

fail

{
    "status": 1,
    "msg": "更新地址失败"
}

4.选中查看具体的地址

/shipping/select.do
[v_act]request[/v_act]

shippingId

[v_act]response[/v_act]
success

{
    "status": 0,
    "data": {
        "id": 4,
        "userId": 13,
        "receiverName": "geely",
        "receiverPhone": "010",
        "receiverMobile": "18688888888",
        "receiverProvince": "北京",
        "receiverCity": "北京市",
        "receiverAddress": "中关村",
        "receiverZip": "100000",
        "createTime": 1485066385000,
        "updateTime": 1485066385000
    }
}


fail

{
    "status": 1,
    "msg": "请登录之后查询"
}

5.地址列表

/shipping/list.do

http://localhost:8080/shipping/list.do

[v_act]request[/v_act]

pageNum(默认1),pageSize(默认10)

[v_act]response[/v_act]
success

{
    "status": 0,
    "data": {
        "pageNum": 1,
        "pageSize": 10,
        "size": 2,
        "orderBy": null,
        "startRow": 1,
        "endRow": 2,
        "total": 2,
        "pages": 1,
        "list": [
            {
                "id": 4,
                "userId": 13,
                "receiverName": "geely",
                "receiverPhone": "010",
                "receiverMobile": "18688888888",
                "receiverProvince": "北京",
                "receiverCity": "北京市",
                "receiverAddress": "中关村",
                "receiverZip": "100000",
                "createTime": 1485066385000,
                "updateTime": 1485066385000
            },
            {
                "id": 5,
                "userId": 13,
                "receiverName": "AAA",
                "receiverPhone": "010",
                "receiverMobile": "18688888888",
                "receiverProvince": "北京",
                "receiverCity": "北京市",
                "receiverAddress": "中关村",
                "receiverZip": "100000",
                "createTime": 1485066392000,
                "updateTime": 1485075875000
            }
        ],
        "firstPage": 1,
        "prePage": 0,
        "nextPage": 0,
        "lastPage": 1,
        "isFirstPage": true,
        "isLastPage": true,
        "hasPreviousPage": false,
        "hasNextPage": false,
        "navigatePages": 8,
        "navigatepageNums": [
            1
        ]
    }
}


fail

{
    "status": 1,
    "msg": "请登录之后查询"
}
本站所有文章均由网友分享,仅用于参考学习用,请勿直接转载,如有侵权,请联系网站客服删除相关文章。若由于商用引起版权纠纷,一切责任均由使用者承担
极客文库 » 从零到企业级SSM电商项目验收测试(五)收货地址管理模块测试

欢迎加入「极客文库」,成为原创作者从这里开始!

立即加入 了解更多