adminPackage - TimYi/FengHuang GitHub Wiki

请求URL

http://101.200.229.135:8080/api/admin/package

字段说明

字段分为显示和保存两部分。
保存字段会有一些关联实体的id,显示字段会把一些关联实体的内容扁平化显示。

显示字段

id:id
name:套餐名称
price:套餐价格
deposit:订金金额
description:套餐描述
inStock:库存
saleNumber:卖出套餐数量
decorate:装修方式,string
mainPic:主图
scrambleStartTime:抢购开始时间(yyyy-MM-dd hh:mm:ss)
scrambleEndTime:抢购截止时间(yyyy-MM-dd hh:mm:ss)
status:套餐状态,PREPARE,SCRAMBLE,FINISH; 
hasAppointed:用户是否预约
couldAppoint:是否可以预约
reasonForCantAppoint:不能预约原因        

传参字段

id:id
name:套餐名称
price:套餐价格
deposit:订金金额
description:套餐描述
inStock:库存
saleNumber:卖出套餐数量
decorate:装修方式,string
mainPicFile:主图,input type=file
scrambleStartTime:抢购开始时间(yyyy-MM-dd hh:mm:ss)
scrambleEndTime:抢购截止时间(yyyy-MM-dd hh:mm:ss)
status:套餐状态,PREPARE,SCRAMBLE,FINISH; 

返回示例

{
"result": {
    "totalCount": 1,
    "totalPages": 1,
    "page": 1,
    "size": 8,
    "result": [
        {
            "id": "404040e64d8fa9d4014d8fa9e2e10001",
            "menu": {
                "id": "404040e64d8f7405014d8f740fb40000",
                "name": "test",
                "description": null
            },
            "brand": {
                "id": "404040e64d8f7710014d8f771afb0000",
                "name": "test"
            },
            "title": null,
            "marketPrice": 12,
            "salePrice": 10,
            "housenum": 1,
            "housewarn": false,
            "warnnum": null,
            "description": null,
            "content": "test",
            "mainPic": {
                "id": "404040e64d8fa9d4014d8fa9e2150000",
                "url": "localhost:8080/fenghuangzhujia/image/bd285a0f-6694-47eb-8d63-b1cbc12d5207.png"
            },
            "thumbnails": null,
            "pics": [],
            "houseType": null,
            "decorateType": {
                "id": "404040e64d8f6dc0014d8f6dd8fa0014",
                "name": "新房到精装",
                "attr": null,
                "attr2": null,
                "type": "decorate"
            },
            "responseType": null,
            "workingDays": null,
            "keywrods": null,
            "details": [
                {
                    "ordernum": 1,
                    "position": null,
                    "meterial": "白银",
                    "count": "不限",
                    "description": null
                }
            ]
        }
    ]
},
"status": "OK"
}