etrade_shop_1.0.12_data_kangtian.sql
3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 '%干调%';