| | |
| | | SELECT |
| | | grp.id AS groupId, |
| | | grp.group_code AS groupCode, |
| | | IF(NOW() < sche.start_time, 2, |
| | | IF(NOW() > sche.start_time AND NOW() < DATE_ADD(sche.start_time, INTERVAL sche.duration MINUTE), 3, 4)) AS state, |
| | | IF(sche.current_state = 2, 5, |
| | | IF(NOW() < sche.start_time, 2, |
| | | IF(NOW() > sche.start_time AND NOW() < DATE_ADD(sche.start_time, INTERVAL sche.duration MINUTE), 3, 4))) AS state, |
| | | sche.start_time AS startTime, |
| | | DATE_ADD(sche.start_time, INTERVAL sche.duration MINUTE) AS stopTime, |
| | | sche.duration, |