etrade_shop_1.0.12_data_kangtian.sql 3.08 KB



INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 1, '蔬菜', 1, 1, '蔬菜', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%蔬菜%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 601, '其他商品', 1, 601, '其他商品', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%其他%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 620, '肉类', 1, 620, '肉类', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%肉类%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 1023, '水果', 1, 1023, '水果', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%水果%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 1851, '水产品', 1, 1851, '水产品', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%水产%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 2259, '粮油类', 1, 2259, '粮油类', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%粮油%';


INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 1779, '调味品', 1, 1779, '调味品', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%干调%';

INSERT INTO `dili_etrade`.`shop_main_product` (shop_id, market_id, category_id, category_name, level, top_category_id, top_category_name, created_time, creater, creater_id, modified_time, modifier, modifier_id)
SELECT s.id, s.market_id, 2374, '干货', 1, 2374, '干货', NOW(), '数据导入', 1, NOW(), '数据导入', 1
FROM `dili_etrade`.`shop` s
WHERE s.main_products LIKE '%干调%';