苍穹外卖day9前端订单分页查询后订单菜品不展示(已解决)

前端约定好返回结果示例如下:

复制代码
{ 
    "code": 0, 
    "msg": null, 
    "data": { 
        "total": 0, 
        "records": [ 
            { 
                "id": 0, 
                "number": "string", 
                "status": 0, 
                "userId": 0, 
                "addressBookId": 0, 
                "orderTime": "string", 
                "checkoutTime": null, 
                "payMethod": 0, 
                "payStatus": 0, 
                "amount": 0, 
                "remark": "string", 
                "userName": "string", 
                "phone": "string", 
                "address": "string", 
                "consignee": "string", 
                "cancelReason": "string", 
                "rejectionReason": "string", 
                "cancelTime": "string", 
                "estimatedDeliveryTime": "string", 
                "deliveryStatus": 0, "deliveryTime": 
                "string", "packAmount": 0, 
                "tablewareNumber": 0, 
                "tablewareStatus": 0, 
                "orderDishes": "string" 
            } 
        ] 
    } 
}

可以发现,前端已经规定好data-records的订单菜品属性名为orderDishes,而我由于追求命名准确性,将OrderVO的属性

复制代码
private String orderDishes;

修改为

复制代码
private String orderFoodsInfo;

而这样会导致前端无法从OrderVO中解析出orderDishes属性的值,从而导致前端订单菜品没有展示出来。

启示:

对于要返回给前端展示的VO,最好不要随意修改属性名称。

相关推荐
北数云1 天前
北数云内测|AI 需求发布区 + Bug/建议长期征
bug·模型·智能体
天上掉下个牛霸天2 天前
Bug悬案:技术侦探如何破案
bug
f***24112 天前
Bug悬案:程序员破案指南
bug
e***98572 天前
Bug破案现场:技术团队的悬疑推理秀
bug
数字芯片实验室2 天前
边界值测试:一个”==”引发的芯片bug
fpga开发·bug
e***98573 天前
Bug悬案侦破大会:高效解决技术难题
bug
f***24113 天前
Bug悬案侦破:技术团队的破案指南
bug
Lxinccode3 天前
BUG(20) : response.text耗时很久, linux耗时十几秒, Windows耗时零点几秒
python·bug·requests·response.text·response.text慢
深念Y3 天前
夸克网盘 应用程序无法启动,因为应用程序的并行配置不正确。有关详细信息,请参阅应用程序事件日志,或使用命令行sxstrace.exe 工具。
windows·bug·报错·系统·更新·网盘·夸克