v1.0.30: companies 表删除 name_en(英文名称)字段及全部关联 - 迁移SQL+helpers白名单+add/import/export/list+person关联查询(companies/company_options/products)+completeness核心层与标签+company.js搜索/筛选/列表/详情
This commit is contained in:
@@ -23,7 +23,7 @@ $active = isset($_REQUEST['is_active']) && $_REQUEST['is_active'] !== '' ? (int
|
||||
|
||||
// 可指定筛选的字段白名单(下拉选项来自前端「筛选」)
|
||||
$searchableFields = [
|
||||
'name_zh', 'name_en', 'registration_number', 'legal_representative',
|
||||
'name_zh', 'registration_number', 'legal_representative',
|
||||
'address', 'industry', 'industry_subdivision', 'website',
|
||||
'source_channel', 'source_detail', 'business_scope', 'stock_code',
|
||||
];
|
||||
@@ -109,7 +109,7 @@ if ($keyword !== '') {
|
||||
$params[] = "%$keyword%";
|
||||
} else {
|
||||
// 全部字段:匹配常用字段
|
||||
$where[] = '(name_zh LIKE ? OR name_en LIKE ? OR display_name LIKE ? OR registration_number LIKE ? OR legal_representative LIKE ? OR industry LIKE ? OR industry_subdivision LIKE ? OR website LIKE ? OR source_detail LIKE ? OR stock_code LIKE ?)';
|
||||
$where[] = '(name_zh LIKE ? OR display_name LIKE ? OR registration_number LIKE ? OR legal_representative LIKE ? OR industry LIKE ? OR industry_subdivision LIKE ? OR website LIKE ? OR source_detail LIKE ? OR stock_code LIKE ?)';
|
||||
$like = "%$keyword%";
|
||||
array_push($params, $like, $like, $like, $like, $like, $like, $like, $like, $like, $like);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ $total = (int)$stmt->fetchColumn();
|
||||
|
||||
$offset = ($page - 1) * $limit;
|
||||
$stmt = $pdo->prepare(
|
||||
"SELECT id, name_zh, name_en, display_name, business_role, legal_form, country, registration_number,
|
||||
"SELECT id, name_zh, display_name, business_role, legal_form, country, registration_number,
|
||||
address, legal_representative, industry, industry_subdivision, website,
|
||||
latest_employee_count, latest_annual_revenue, is_listed, stock_code,
|
||||
source_channel, source_detail, is_active, created_at, updated_at
|
||||
|
||||
Reference in New Issue
Block a user