From fe005e31aa8db6f5e61863a7b1653b7c34525f14 Mon Sep 17 00:00:00 2001 From: tom1484 Date: Sat, 23 Mar 2024 02:03:35 +0800 Subject: [PATCH] fix bulbs color order --- editor-server/src/utils/data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor-server/src/utils/data.rs b/editor-server/src/utils/data.rs index 3d646b155..a208b05ef 100644 --- a/editor-server/src/utils/data.rs +++ b/editor-server/src/utils/data.rs @@ -71,7 +71,7 @@ pub async fn init_redis_control( ON ControlData.effect_id = LEDEffect.id LEFT JOIN LEDBulb ON ControlData.id = LEDBulb.control_id - ORDER BY ControlData.frame_id, Dancer.id ASC, Part.id ASC; + ORDER BY ControlData.frame_id, Dancer.id ASC, Part.id ASC, LEDBulb.position ASC; "#, ) .fetch_all(mysql_pool) @@ -311,7 +311,7 @@ pub async fn update_redis_control( LEFT JOIN LEDBulb ON ControlData.id = LEDBulb.control_id WHERE ControlData.frame_id = ? - ORDER BY Dancer.id ASC, Part.id ASC; + ORDER BY Dancer.id ASC, Part.id ASC, LEDBulb.position ASC; "#, frame.id )