苍穹外卖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 天前
我把 5 个 Python bug 投进 CubeSandbox 当沙盘 —— 从 envd 协议反编译到一键 RED→GREEN
bug·issue
zh_xuan2 天前
诡异Bug:输入框删除字符,却越删越多
android·bug
绘梨衣5473 天前
采集基类设计遇到的描述符bug
爬虫·python·bug
不吃鱼的羊3 天前
达芬奇工具Bug
bug
油炸自行车3 天前
【bug】Qt 6 Q_NAMESPACE 跨 DLL 链接错误:LNK2019 无法解析 staticMetaObject
数据库·c++·qt·bug·link2019·q_namespace_exp·namespaceexport
sxd20014 天前
Debian #1135514 bug引发的思考
网络·debian·bug
疏狂难除5 天前
X86-64 Assembly中printf 打印 float 和 double的bug的解决
bug·assembly
nashane7 天前
HarmonyOS 6学习:指南针“文图反向”Bug修复——从“北偏东”变“北偏西”的坐标系纠错
学习·华为·bug·harmonyos
雨季mo浅忆7 天前
记录Vue3项目中的各类问题
前端·bug·vue3
hust_a8 天前
利用AI定位BUG的体验
bug