Actions
개선(improvement) #307
closed[Improvement] Replace orders of list - add Drag/Drop
Part:
Build env.:
Prod
Description
Description:
1. The ability to change the order with drag and drop should only be applied within the same city. Items within the same city can only be changed.
2. If you change the order by drag and drop and save it, it means that the same order will be applied to the B2C site as well.
If you swap the positions of product 1 and product 2 in the admin, it will appear in the 2-1 order in the admin, and the B2C site will also show the 2-1 order.

Script update ranking_order product hotel:
UPDATE BS_EVENT_PRODUCT ep
JOIN (
SELECT
PRODUCT_CODE,
EVENT_MASTER_SEQ,
ROW_NUMBER() OVER (
PARTITION BY EVENT_CITY_GROUP_SEQ
ORDER BY RANKING_ORDER
) AS new_rank
FROM BS_EVENT_PRODUCT
) ranked ON ep.PRODUCT_CODE = ranked.PRODUCT_CODE
AND ep.EVENT_MASTER_SEQ = ranked.EVENT_MASTER_SEQ
SET ep.RANKING_ORDER = ranked.new_rank;
Script update ranking_order product group hotel:
UPDATE BS_EVENT_CITY_GROUP ep
JOIN (
SELECT
EVENT_CITY_GROUP_SEQ,
EVENT_MASTER_SEQ,
ROW_NUMBER() OVER (
PARTITION BY EVENT_MASTER_SEQ
ORDER BY RANKING_ORDER
) AS new_rank
FROM BS_EVENT_CITY_GROUP
) ranked ON ep.EVENT_MASTER_SEQ = ranked.EVENT_MASTER_SEQ
AND ep.EVENT_CITY_GROUP_SEQ = ranked.EVENT_CITY_GROUP_SEQ
SET ep.RANKING_ORDER = ranked.new_rank;
Files
Actions