苍穹外卖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 天前
修复服务端500相应,修复客户端上传文件.tmp 服务端接受不到文件bug
bug
qq_401700411 天前
Qt开发过程中遇到哪些经典的bug
qt·bug
0白露4 天前
关闭搜狗输入法右下角广告,可以适用于大多数应用系统通知的广告
windows·bug
一只自律的鸡4 天前
【Linux驱动】bug处理 ens33找不到IP
linux·运维·bug
Lichenpar6 天前
Springboot采用FastJson2作为MessageConverter时,配置的全局日期类型序列化转换BUG
java·开发语言·bug
Irene19916 天前
AI 找 bug 的局限性 和 Deepseek 优势明显
bug
癫狂的兔子7 天前
【bug】【Python】pandas中的DataFrame.to_excel()和ExcelWriter的区别
python·bug
癫狂的兔子7 天前
【BUG】【Python】【Spider】Compound class names are not allowed.
开发语言·python·bug
netkiller-BG7NYT7 天前
阿里云语音合成CosyVoice重大BUG被我发现了
bug
马猴烧酒.8 天前
【Mybatis出现bug】应为 <statement> 或 DELIMITER,得到 ‘id‘
java·bug·mybatis