去重总数据国家限定五国并优化筛选布局
- 国家仅保留德国/英国/法国/意大利/西班牙,移除美国及US映射 - 保留服务器已有 V90 迁移,新增 V91 添加 country 列及索引 - ASIN列表筛选区改为两行布局:查询条件+按钮在上,日期+导出在下
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- Register the existing legacy static page in the APP permission menu.
|
||||
-- The route_path is the menu slug; the page URL is /web_source/variant-collection.html.
|
||||
INSERT INTO `columns` (`name`, `column_key`, `menu_type`, `route_path`, `sort_order`, `parent_id`)
|
||||
SELECT 'ASIN变体采集', 'variant-collection', 'app', 'variant-collection', 118,
|
||||
(SELECT id FROM `columns` WHERE `column_key` = 'brand_front_tools' LIMIT 1)
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `columns` WHERE `column_key` = 'variant-collection'
|
||||
);
|
||||
|
||||
UPDATE `columns` AS child
|
||||
JOIN `columns` AS parent ON parent.`column_key` = 'brand_front_tools'
|
||||
SET child.`name` = 'ASIN变体采集',
|
||||
child.`menu_type` = 'app',
|
||||
child.`route_path` = 'variant-collection',
|
||||
child.`sort_order` = 118,
|
||||
child.`parent_id` = parent.`id`
|
||||
WHERE child.`column_key` = 'variant-collection';
|
||||
@@ -0,0 +1,33 @@
|
||||
SET @country_col_exists := (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'biz_dedupe_total_data'
|
||||
AND COLUMN_NAME = 'country'
|
||||
);
|
||||
|
||||
SET @sql_add_country := IF(
|
||||
@country_col_exists = 0,
|
||||
'ALTER TABLE biz_dedupe_total_data ADD COLUMN country VARCHAR(64) DEFAULT NULL COMMENT ''国家代码,逗号分隔,如 DE,UK'' AFTER data_value',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt_add_country FROM @sql_add_country;
|
||||
EXECUTE stmt_add_country;
|
||||
DEALLOCATE PREPARE stmt_add_country;
|
||||
|
||||
SET @country_idx_exists := (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.STATISTICS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'biz_dedupe_total_data'
|
||||
AND INDEX_NAME = 'idx_country'
|
||||
);
|
||||
|
||||
SET @sql_add_country_idx := IF(
|
||||
@country_idx_exists = 0,
|
||||
'ALTER TABLE biz_dedupe_total_data ADD INDEX idx_country (country)',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt_add_country_idx FROM @sql_add_country_idx;
|
||||
EXECUTE stmt_add_country_idx;
|
||||
DEALLOCATE PREPARE stmt_add_country_idx;
|
||||
Reference in New Issue
Block a user