【类 型】:feat 添加订单搜索功能
【原 因】:增加by_plane_id字字段搜索 执行飞机id 【过 程】: 【影 响】:
This commit is contained in:
parent
476c54f3b4
commit
42295647bb
@ -780,11 +780,18 @@ class AdminController extends PublicController
|
|||||||
'name' => 'receiver',
|
'name' => 'receiver',
|
||||||
'tel' => 'tel',
|
'tel' => 'tel',
|
||||||
'remark' => 'remark',
|
'remark' => 'remark',
|
||||||
|
'byPlaneId' => 'by_plane_id',
|
||||||
'desc' => 'describe'
|
'desc' => 'describe'
|
||||||
];
|
];
|
||||||
|
|
||||||
if (array_key_exists($field, $fieldMap) && !empty($value)) {
|
if (array_key_exists($field, $fieldMap) && !empty($value)) {
|
||||||
$where[$fieldMap[$field]] = array('like', '%' . $value . '%');
|
if ($field === 'byPlaneId') {
|
||||||
|
// 对于 byPlaneId 字段,使用精确匹配
|
||||||
|
$where[$fieldMap[$field]] = $value;
|
||||||
|
} else {
|
||||||
|
// 对于其他字段,使用模糊查询
|
||||||
|
$where[$fieldMap[$field]] = array('like', '%' . $value . '%');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user