订单地址读取优化,减少 sql 查询次数

This commit is contained in:
Devil 2021-08-27 13:57:15 +08:00
parent af087e5307
commit 0608bb9f04

View File

@ -1289,7 +1289,7 @@ class OrderService
$v['client_type_name'] = isset($common_platform_type[$v['client_type']]) ? $common_platform_type[$v['client_type']]['name'] : ''; $v['client_type_name'] = isset($common_platform_type[$v['client_type']]) ? $common_platform_type[$v['client_type']]['name'] : '';
// 状态 // 状态
$v['status_name'] = ($v['order_model'] == 2 && $v['status'] == 2) ? '待取货' : $order_status_list[$v['status']]['name']; $v['status_name'] = ($v['order_model'] == 2 && $v['status'] == 2) ? '待取货' : (array_key_exists($v['status'], $order_status_list) ? $order_status_list[$v['status']]['name'] : '未知');
// 支付状态 // 支付状态
$v['pay_status_name'] = $order_pay_status[$v['pay_status']]['name']; $v['pay_status_name'] = $order_pay_status[$v['pay_status']]['name'];