feat(catalog): Montvale 전 상품+리뷰 완전 적재 (신규 시즌 디자이너 상품 3종 id71-73 + 실제 고객 리뷰 63건)

This commit is contained in:
GUARDiA 2026-06-13 23:03:34 +09:00
parent 18e674c8da
commit 736b479239
7 changed files with 122 additions and 0 deletions

View File

@ -333,6 +333,41 @@ INSERT INTO mall_product_option (product_id, option_name, option_value, extra_pr
SELECT p.id, 'Card','Personalized Card Message', 0.00, 999, 'CARD_MESSAGE' FROM mall_product p
WHERE p.id BETWEEN 38 AND 70 AND NOT EXISTS (SELECT 1 FROM mall_product_option o WHERE o.product_id=p.id AND o.option_type='CARD_MESSAGE');
-- ---------------------------------------------------------------------------
-- 실데이터 보강: Montvale Florist 시즌 디자이너 상품 (id 71~73)
-- 크롤링: montvalefloristnj.com /flowers-over-80 · /flowers-60-to-80 (전 카탈로그 대조 후 신규만)
-- brand='Montvale Florist'. 이미지 캡쳐 그대로(/img/products/<slug>.<ext>, 원본 Cloudinary). price=사이트 Standard.
-- ---------------------------------------------------------------------------
INSERT INTO mall_product (id, category_id, sku, name, brand, description, price, sale_price, status, stock, thumbnail, occasion, flower_type, shelf_life_days, rating_avg, review_count, sales_count) VALUES
(71,31,'MV-MOTHERS-DAY-DESIGNER','Mother''s Day Designer Bouquet','Montvale Florist','Give this truly special gift to the woman who has done so much. Using only the freshest and most beautiful flowers, our experts will create a one-of-a-kind arrangement just for her. Mom''s gorgeous flowers will include the designer''s choice of fresh blooms. Measures 10"-20" H (size will vary). 100% Florist-Designed and Hand-Delivered.',249.95,NULL,'ON_SALE',30,'/img/products/mothers-day-designer-bouquet.png','ANNIVERSARY','MIXED',6,4.00,3,40),
(72,7,'MV-VALENTINES-SPECIAL','Valentine''s Day Special Bouquet','Montvale Florist','Your Valentine deserves the best. And nothing says "I love you" like a one-of-a-kind bouquet. Just leave it up to our floral designers — they''ll select from our most beautiful blooms to create a romantic showstopper for your sweetheart. Your special arrangement will include the designer''s choice of fresh blooms. Measures 10"-20" H (size will vary).',399.99,NULL,'ON_SALE',20,'/img/products/valentines-day-special-bouquet.png','ROMANCE','MIXED',6,5.00,3,60),
(73,35,'MV-VERY-MERRY-XMAS','Very Merry Christmas Artist''s Design','Montvale Florist','Celebrate the season with a festive holiday arrangement personally crafted by our designers using the designer''s choice of fresh seasonal blooms. Each Very Merry Christmas design is uniquely arranged for your recipient with Christmassy cheer. Measures 10"-20" H (size will vary).',79.95,NULL,'ON_SALE',45,'/img/products/very-merry-christmas-artists-design.jpg','JUSTBECAUSE','MIXED',6,5.00,3,80)
ON CONFLICT (id) DO NOTHING;
SELECT setval(pg_get_serial_sequence('mall_product','id'), GREATEST((SELECT MAX(id) FROM mall_product),1));
INSERT INTO mall_product_image (product_id, url, sort_order, is_main)
SELECT p.id, p.thumbnail, 0, TRUE FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND p.thumbnail IS NOT NULL
AND NOT EXISTS (SELECT 1 FROM mall_product_image i WHERE i.product_id=p.id);
INSERT INTO mall_product_size (product_id, size_code, label, price, stem_count, sort_order)
SELECT p.id, 'ORIGINAL','Standard', p.price, 12, 1 FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_size s WHERE s.product_id=p.id AND s.size_code='ORIGINAL');
INSERT INTO mall_product_size (product_id, size_code, label, price, stem_count, sort_order)
SELECT p.id, 'DELUXE','Deluxe', ROUND(p.price*1.4,2), 18, 2 FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_size s WHERE s.product_id=p.id AND s.size_code='DELUXE');
INSERT INTO mall_product_size (product_id, size_code, label, price, stem_count, sort_order)
SELECT p.id, 'GRAND','Premium', ROUND(p.price*1.9,2), 24, 3 FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_size s WHERE s.product_id=p.id AND s.size_code='GRAND');
INSERT INTO mall_product_option (product_id, option_name, option_value, extra_price, stock, option_type)
SELECT p.id, 'Vase','Glass Vase Upgrade', 12.00, 999, 'VASE' FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_option o WHERE o.product_id=p.id AND o.option_type='VASE');
INSERT INTO mall_product_option (product_id, option_name, option_value, extra_price, stock, option_type)
SELECT p.id, 'Wrap','Premium Gift Wrap', 6.00, 999, 'WRAP' FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_option o WHERE o.product_id=p.id AND o.option_type='WRAP');
INSERT INTO mall_product_option (product_id, option_name, option_value, extra_price, stock, option_type)
SELECT p.id, 'Card','Personalized Card Message', 0.00, 999, 'CARD_MESSAGE' FROM mall_product p
WHERE p.id BETWEEN 71 AND 73 AND NOT EXISTS (SELECT 1 FROM mall_product_option o WHERE o.product_id=p.id AND o.option_type='CARD_MESSAGE');
-- ---------------------------------------------------------------------------
-- 4. 매장별 재고 ON/OFF (Store_Inventory)
-- ---------------------------------------------------------------------------
@ -487,6 +522,93 @@ INSERT INTO mall_review (product_id, author, rating, title, content, store_id) V
(14,'jane',4,'Brought a smile','Full of Smiles really did brighten the whole room.',1)
ON CONFLICT DO NOTHING;
-- 실데이터: Montvale Florist 상품 상세 페이지 실제 고객 리뷰 (Lovingly 검증 리뷰, montvalefloristnj.com)
-- 멱등: 동일 (product_id, author, content) 존재 시 INSERT 생략. store_id=1. created_at=사이트 표기일.
DO $$
DECLARE r RECORD;
BEGIN
FOR r IN
SELECT * FROM (VALUES
('Florist''s Choice Daily Deal','Natalie',5,'absolutely wonderful! i''ve been ordering bouquets for my mom''s birthday every year from here and they''ve always delivered the most beautiful flowers. thank you montvale florist!','2025-09-30'),
('Florist''s Choice Daily Deal','Nickoletta',5,'Beautiful, fresh flowers and excellent customer service - thank you!','2025-07-02'),
('Florist''s Choice Daily Deal','Maria',5,'Flowers were very fresh and beautifully arranged. Never disappointed with my orders! Great florist- I''ll continue to use them!','2025-03-29'),
('Radiant Rainbow™','shilpa',5,'Flowers are beautiful!! Staff is always wonderful!! This is the place to go in Bergen County!','2026-03-27'),
('Radiant Rainbow™','Anonymous',5,'Excellent prompt same day service. Like ordering a pizza to be delivered. Great job!','2026-03-04'),
('Radiant Rainbow™','James',5,'It was so easy to work online with Montvale Florist. Great selection, Great delivery. Overall very pleased. Thank you.','2025-09-14'),
('12 Classic Red Roses','Robert',5,'They were absolutely beautiful!','2026-02-19'),
('12 Classic Red Roses','Louis',5,'The roses and style of arrangement with Baby Breathe was perfect. The delivery time was also perfect... thanks again','2026-02-18'),
('12 Classic Red Roses','Dave',5,'Once again you ''delivered''- the red roses are spectacular! My girlfriend Sarah loved the bouquet!','2025-05-28'),
('Breathtaking Beauty™','Nikki',5,'I ordered flowers for my moms birthday and they are absolutely gorgeous and the vase itself is stunning. We couldn''t believe how big the arrangement was! Exceeded expectations and will be ordering again.','2026-03-28'),
('Breathtaking Beauty™','Kathy',5,'Our Aunt Joan loved the flowers and said they were beautiful!!','2026-03-02'),
('Breathtaking Beauty™','Gaddy',5,'Absolutely beautiful arrangements and exceptional service! I ordered a birthday bouquet for my wife from Montvale Florist, and they went above and beyond. The arrangement was stunning, fresh, vibrant, and full of color. It''s not just flowers, it''s an experience. I''ll definitely be ordering from them again for every special occasion.','2025-11-13'),
('Full of Smiles','Karen',5,'Very good service. Flowers looked beautiful and were delivered on time.','2018-03-13'),
('Full of Smiles','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Full of Smiles','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Dozen White Roses','Kate',5,'So happy with Montvale Florist and the beautiful white roses delivered for my grandmother''s wake. Easy to work with and happy with the results. Would recommend!','2021-12-19'),
('Dozen White Roses','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Dozen White Roses','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Blooming Daydream','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Blooming Daydream','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Blooming Daydream','Linda',5,'Fiftieth Anniversary bouquet stunning and delivered right on time.','2026-04-20'),
('Halcyon Heart™','Brittany',5,'great experience ordering from here! was super easy and quick .. will definitely repeat.. my sister loved the flowers too they look super duper beautiful!! thanks for making gift-giving easy :D -britt','2022-08-31'),
('Halcyon Heart™','Jody',5,'Five stars! Thank you so much! You hit this one out the park!','2022-01-15'),
('Halcyon Heart™','Josette',5,'My People said they were beautiful thank you for a great job I will be happy to use you again','2021-05-25'),
('Peace Lily Plant','Roseann',5,'Exceeded expectations - great work!','2020-05-28'),
('Peace Lily Plant','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Peace Lily Plant','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Joyful Thanks™','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Joyful Thanks™','Maria',5,'absolutely gorgeous flowers. helpful staff.','2026-02-26'),
('Joyful Thanks™','Susan',5,'She said they were absolutely gorgeous ! Thank you!','2024-08-21'),
('Spring Serenade','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Spring Serenade','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Spring Serenade','Linda',5,'Fiftieth Anniversary bouquet stunning and delivered right on time.','2026-04-20'),
('Sweetest Roses™','JosephCallahan',5,'Joe and his staff have once again done a fantastic job creating a beautiful piece. I highly recommend Montvale Florist','2025-08-31'),
('Sweetest Roses™','Joseph',5,'Everything was perfect and looked even better than we could have imagined. You did the most amazing job and can''t thank you enough.','2023-09-01'),
('Sweetest Roses™','Joseph',5,'All I can say is ''Wow'' My girlfriend loved her flowers. She sent me a picture right away, and they were gorgeous. I called at 1130 am, and they were delivered. Great job!!!','2023-06-17'),
('Strawberry Blush','Judith',5,'The flowers were beautiful as usual. We love your arrangements!','2022-05-03'),
('Strawberry Blush','Roxanne',5,'Yes princess kim was very happy! I will continue to use Montvale florist! I give you five stars. Thanks again foxy','2022-04-19'),
('Strawberry Blush','Joan',5,'she loved her flowers and I loved that you were able to get them to her so quickly. thanks again.','2021-12-26'),
('Hydrangea Highlight','Judith',5,'Yes she did those are her favorite flowers Next week I''ll be ordering for Christmas you guys are so great thank you','2025-12-19'),
('Hydrangea Highlight','Mamie',5,'The lovely floral arrangement that I chose for delivery from their website was spot on. I live out of state and often with online floral orders you may not get what you ordered. Montvale Florist proved to be trustworthy. I was so pleased and so was the recipient!','2021-10-14'),
('Hydrangea Highlight','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Green Grace','Ethan',5,'Thank you for your fast and wonderful service. I ordered a plant arrangement for my family who moved into their new home and it came within hours of the order fresh and lovely arranged. Thank you.','2026-01-31'),
('Green Grace','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Green Grace','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Graceful Embrace','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Graceful Embrace','Tracey',5,'Thank you arrangement was lovely and delivered same day! Will definitely order from here again!','2024-07-31'),
('Graceful Embrace','Kristine',5,'Highly recommend. Delivered a beautiful flower arrangement on short notice.','2023-06-17'),
('In Loving Memory','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('In Loving Memory','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('In Loving Memory','Linda',5,'Fiftieth Anniversary bouquet stunning and delivered right on time.','2026-04-20'),
('Lavender Lust','Andrew',5,'Timely delivery, beautiful flowers!','2024-02-18'),
('Lavender Lust','Barbara',5,'Flowers were delivered on time and were beautiful. My cousin was delighted with the arrangement.','2026-05-13'),
('Lavender Lust','Patricia',5,'My daughter in law loved the arrangement. Thank you so much.','2026-05-13'),
('Mother''s Day Designer Bouquet','Joseph',5,'I would like to thank you for such an excellent service that you provided as florist for our big day. Your arrangements blew us away. Thank you so much as it was an amazing surprise and they were delivered on time as I asked for.','2023-05-12'),
('Mother''s Day Designer Bouquet','Christian',5,'Very good.','2022-05-21'),
('Mother''s Day Designer Bouquet','Josh',2,'I was disappointed by this bouquet. I spent on the deluxe version of the Mother''s Day Designer bouquet, and what was delivered was a smaller bouquet than expected. Customer service confirmed it was their Deluxe size.','2022-05-11'),
('Valentine''s Day Special Bouquet','Stephan',5,'Valentine gifts was great my girl loved the flowers & chocolate','2024-02-19'),
('Valentine''s Day Special Bouquet','Joseph',5,'I want to thank you for the excellent service that you provided as a florist for surprising my love. Your arrangements blew us away. The arrangement looked beautiful, and everything you did looked magical. Thank you for helping us make our day so perfect.','2024-01-17'),
('Valentine''s Day Special Bouquet','Annalise',5,'Montvale florist always makes the most beautiful arrangements. They have always been reliable and accommodating. Everyone we have encountered who works there is friendly and hardworking. I am very pleased with the service.','2023-02-18'),
('Very Merry Christmas Artist''s Design','David',5,'My mom loved the Christmas flower arrangement you delivered! We weren''t able to celebrate with her due to Covid, but your arrangement let her know we were thinking about her, thank you!','2020-12-30'),
('Very Merry Christmas Artist''s Design','Jan',5,'Thank you for the lovely flowers you did for our family friends in New Jersey they were very nice and Christmassy','2020-12-26'),
('Very Merry Christmas Artist''s Design','Karen',5,'Flowers were beautiful! I''ll definitely order from them again. Great job!!!','2020-12-25')
) AS t(pname, author, rating, content, rdate)
LOOP
INSERT INTO mall_review (product_id, author, rating, title, content, store_id, created_at)
SELECT p.id, r.author, r.rating, NULL, r.content, 1, r.rdate::timestamp
FROM mall_product p
WHERE p.name = r.pname
AND NOT EXISTS (SELECT 1 FROM mall_review v WHERE v.product_id=p.id AND v.author=r.author AND v.content=r.content);
END LOOP;
END $$;
-- 리뷰에 맞춰 상품 통계 갱신: 기존(1~70) review_count는 마케팅 집계 수치 → 실제행수가 클 때만 상향, 신규(71~73)는 실제값.
UPDATE mall_product p SET
review_count = CASE WHEN p.id BETWEEN 71 AND 73 THEN sub.cnt ELSE GREATEST(p.review_count, sub.cnt) END,
rating_avg = sub.avg_rating
FROM (SELECT product_id, COUNT(*) AS cnt, ROUND(AVG(rating)::numeric,2) AS avg_rating FROM mall_review GROUP BY product_id) sub
WHERE p.id = sub.product_id;
CREATE TABLE IF NOT EXISTS mall_member (
id BIGSERIAL PRIMARY KEY, username VARCHAR(200) UNIQUE, display_name VARCHAR(200),
email VARCHAR(200), phone VARCHAR(60), default_zip VARCHAR(10), default_address VARCHAR(600),

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB