桃谷六仙分析 shopxo E-R 模型

桃谷六仙分析 shopxo E-R 模型,不足之处欢迎大家指正,共同交流进步

shopxo 商品入库的主要sql 


1.数据插入

2.插入之后进行数据列表



INSERT INTO `s_goods` (`title` , `title_color` , `simple_desc` , `model` , `place_origin` , `inventory_unit` , `give_integral` , `buy_min_number` , `buy_max_number` , `is_deduction_inventory` , `is_shelves` , `content_web` , `images` , `photo_count` , `is_home_recommended` , `home_recommended_images` , `brand_id` , `video` , `seo_title` , `seo_keywords` , `seo_desc` , `is_exist_many_spec` , `spec_base` , `fictitious_goods_value` , `add_time`) VALUES ('男士T恤' , '' , '男士T恤' , '' , 1 , '件' , 11 , 1 , 0 , 1 , 1 , '

\"Diagram

' , '/static/upload/images/goods/2020/07/11/1594481954257184.jpg' , 2 , 0 , '' , 4 , '/static/upload/video/goods/2019/01/14/1547458876723311.mp4' , '男士体恤' , '男士体恤keyword' , '男士体恤description' , 1 , '[{\"title\":\"\\u989c\\u8272\",\"value\":[\"\\u767d\\u8272\",\"\\u9ed1\\u8272\",\"\\u9ec4\\u8272\"]},{\"title\":\"\\u5c3a\\u7801\",\"value\":[\"S\",\"M\",\"L\"]}]' , '
买衣服送会员,推荐一个会员送一件衣服

' , 1594482254)
SHOW COLUMNS FROM `s_goods_category_join`

DELETE FROM `s_goods_category_join` WHERE `goods_id` = '57'

INSERT INTO `s_goods_category_join` (`goods_id` , `category_id` , `add_time`) VALUES ('57' , '907' , 1594482254)

SHOW COLUMNS FROM `s_goods_spec_type`

DELETE FROM `s_goods_spec_type` WHERE `goods_id` = '57'

SHOW COLUMNS FROM `s_goods_spec_value`

DELETE FROM `s_goods_spec_value` WHERE `goods_id` = '57'

SHOW COLUMNS FROM `s_goods_spec_base`

DELETE FROM `s_goods_spec_base` WHERE `goods_id` = '57'

INSERT INTO `s_goods_spec_type` (`name` , `value` , `goods_id` , `add_time`) VALUES ( '颜色','[{\"name\":\"\\u767d\\u8272\",\"images\":\"\\/static\\/upload\\/images\\/goods\\/2020\\/07\\/11\\/1594481970808819.png\"},{\"name\":\"\\u9ed1\\u8272\",\"images\":\"\\/static\\/upload\\/images\\/goods\\/2020\\/07\\/11\\/1594481989777377.jpg\"},{\"name\":\"\\u9ec4\\u8272\",\"images\":\"\\/static\\/upload\\/images\\/goods\\/2020\\/07\\/11\\/1594481999568739.png\"}]','57',1594482254 ) , ( '尺码','[{\"name\":\"S\",\"images\":\"\"},{\"name\":\"M\",\"images\":\"\"},{\"name\":\"L\",\"images\":\"\"}]','57',1594482254 )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '99' , '9' , '0.2' , '00000019' , '284511' , '150' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','白色',1594482254,'966' ) , ( '57','S',1594482254,'966' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '99' , '85' , '0.3' , '00000020' , '284512' , '158' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','白色',1594482254,'967' ) , ( '57','M',1594482254,'967' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '98' , '22' , '0.5' , '00000021' , '284513' , '159' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','白色',1594482254,'968' ) , ( '57','L',1594482254,'968' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '99' , '46' , '0.2' , '00000022' , '284514' , '160' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黑色',1594482254,'969' ) , ( '57','S',1594482254,'969' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '98' , '34' , '0.4' , '00000023' , '284515' , '161' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黑色',1594482254,'970' ) , ( '57','M',1594482254,'970' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '88' , '72' , '0.2' , '00000024' , '284516' , '162' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黑色',1594482254,'971' ) , ( '57','L',1594482254,'971' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '77' , '41' , '0.1' , '00000025' , '284517' , '163' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黄色',1594482254,'972' ) , ( '57','S',1594482254,'972' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '87' , '28' , '0.2' , '00000026' , '284518' , '164' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黄色',1594482254,'973' ) , ( '57','M',1594482254,'973' )

INSERT INTO `s_goods_spec_base` (`goods_id` , `add_time` , `price` , `inventory` , `weight` , `coding` , `barcode` , `original_price` , `extends`) VALUES ('57' , 1594482254 , '97' , '68' , '0.3' , '00000027' , '284519' , '165' , NULL)

INSERT INTO `s_goods_spec_value` (`goods_id` , `value` , `add_time` , `goods_spec_base_id`) VALUES ( '57','黄色',1594482254,'974' ) , ( '57','L',1594482254,'974' )

SELECT MIN(price) AS min_price, MAX(price) AS max_price, SUM(inventory) AS inventory, MIN(original_price) AS min_original_price, MAX(original_price) AS max_original_price FROM `s_goods_spec_base` WHERE `goods_id` = '57' LIMIT 1

UPDATE `s_goods` SET `min_price` = '77' , `max_price` = '99' , `inventory` = '405' , `min_original_price` = '150' , `max_original_price` = '165' , `price` = '77.00-99.00' , `original_price` = '150.00-165.00' , `upd_time` = 1594482254 WHERE `id` = '57'

SHOW COLUMNS FROM `s_goods_photo`

DELETE FROM `s_goods_photo` WHERE `goods_id` = '57'

INSERT INTO `s_goods_photo` (`goods_id` , `images` , `is_show` , `sort` , `add_time`) VALUES ('57' , '/static/upload/images/goods/2020/07/11/1594481954257184.jpg' , 1 , 0 , 1594482254)

INSERT INTO `s_goods_photo` (`goods_id` , `images` , `is_show` , `sort` , `add_time`) VALUES ('57' , '/static/upload/images/goods/2020/07/11/1594481955734320.png' , 1 , 1 , 1594482254)

SHOW COLUMNS FROM `s_goods_content_app`

DELETE FROM `s_goods_content_app` WHERE `goods_id` = '57'

INSERT INTO `s_goods_content_app` (`goods_id` , `images` , `content` , `sort` , `add_time`) VALUES ('57' , '/static/upload/images/goods/2020/07/11/1594479142664742.png' , '男士T恤' , 0 , 1594482254)

COMMIT

200711 23:44:16 235 Connect root@localhost on dituihelp_com

SHOW COLUMNS FROM `s_goods`

SELECT COUNT(*) AS tp_count FROM `s_goods` WHERE `is_delete_time` = 0 LIMIT 1

SELECT * FROM `s_goods` WHERE `is_delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10

SHOW COLUMNS FROM `s_region`

SELECT `name` FROM `s_region` WHERE `id` = 1 LIMIT 1

SHOW COLUMNS FROM `s_brand`

SELECT `name` FROM `s_brand` WHERE `id` = 4 LIMIT 1

SHOW COLUMNS FROM `s_goods_category_join`

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '57'

SHOW COLUMNS FROM `s_goods_category`

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('907')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '56'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '55'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `name` FROM `s_brand` WHERE `id` = 4 LIMIT 1

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '54'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '53'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '52'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60','902')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '51'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('58')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '50'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '49'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('60')

SELECT `name` FROM `s_brand` WHERE `id` = 4 LIMIT 1

SELECT `category_id` FROM `s_goods_category_join` WHERE `goods_id` = '48'

SELECT `name` FROM `s_goods_category` WHERE `id` IN ('58','911')

SHOW COLUMNS FROM `s_brand_category`

SELECT * FROM `s_brand_category` WHERE `is_enable` = 1

SELECT `id`,`name` FROM `s_brand` WHERE `is_enable` = 1 AND `brand_category_id` = '31' ORDER BY `sort` ASC

shopxo  E-Rattachments-2020-07-CGBGC8Fe5f09f102a6fc8.png

  • 发表于 2020-07-12 00:59
  • 阅读 ( 129 )
  • 分类:经验交流

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
taobao
taobao

php开发者

1 篇文章

作家榜 »

  1. admin 53 文章
  2. 穆尹飞 22 文章
  3. 蝈蝈 10 文章
  4. wujian 7 文章
  5. Alan Leung 4 文章
  6. BMCTeam 3 文章
  7. 提问 3 文章
  8. VeryQ 3 文章