苍穹外卖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,最好不要随意修改属性名称。

相关推荐
Cc_Debugger1 天前
【饿了么plus-table】开启多选时,点击下面的单选按钮,页面显示是全选的样子,bug
bug
龙卷风卷云1 天前
【BUG】Nginx使用upstream后端接口报 400
运维·nginx·bug
jiayi_19992 天前
[bug] unsupported GNU version! gcc versions later than 12 are not supported!
服务器·bug·gnu
管二狗赶快去工作!3 天前
体系结构论文(九十三):LLM-Aided Compilation for Tensor Accelerators
人工智能·语言模型·自然语言处理·bug·体系结构
查古穆3 天前
LLM的“小bug”:聊聊幻觉是什么,以及如何有效规避免
人工智能·bug
程序员 沐阳3 天前
Git 二分法精准定位 Bug:从原理到实战,让调试效率起飞
git·elasticsearch·bug
软泡芙3 天前
【Bug】ReactiveUI WPF绑定中依赖属性不更新的问题分析与解决方案
java·bug·wpf
Yiyi_Coding4 天前
BUG列表:如何定位线上 OOM ?
java·linux·bug
csdn_aspnet6 天前
Git二分法精准定位Bug,分享用git bisect快速锁定引入缺陷的提交,提升调试效率
git·bug·二分查找
R6bandito_6 天前
自实现FLASH读取函数中的隐式类型转换bug踩坑记录
c语言·开发语言·经验分享·stm32·单片机·mcu·bug