| | |
| | | @Param("orderCutoffAt") LocalDateTime orderCutoffAt); |
| | | |
| | | @Update("UPDATE guide_receiving_session SET receiving_mode = 'PRIVATE', status = 'ASSIGNED', current_people_count = #{peopleCount}, " + |
| | | "first_order_at = #{now}, service_start_at = #{now}, order_cutoff_at = #{now}, updated_at = NOW() " + |
| | | "first_order_at = #{now}, service_start_at = #{serviceStartAt}, order_cutoff_at = #{now}, updated_at = NOW() " + |
| | | "WHERE id = #{id} AND deleted = 0 AND status = 'RECEIVING'") |
| | | int assignPrivate(@Param("id") Long id, @Param("peopleCount") Integer peopleCount, @Param("now") LocalDateTime now); |
| | | int assignPrivate(@Param("id") Long id, @Param("peopleCount") Integer peopleCount, |
| | | @Param("now") LocalDateTime now, @Param("serviceStartAt") LocalDateTime serviceStartAt); |
| | | |
| | | @Update("UPDATE guide_receiving_session SET status = 'IN_SERVICE', updated_at = NOW() " + |
| | | "WHERE id = #{id} AND deleted = 0 AND status = 'RECEIVING' AND service_start_at <= NOW()") |
| | |
| | | "WHERE id = #{id} AND guide_id = #{guideId} AND deleted = 0 AND status IN ('RECEIVING', 'ASSIGNED')") |
| | | int startSession(@Param("id") Long id, @Param("guideId") Long guideId); |
| | | |
| | | @Update("UPDATE guide_receiving_session SET status = 'STOPPED', updated_at = NOW() " + |
| | | "WHERE id = #{id} AND guide_id = #{guideId} AND deleted = 0 AND status = 'IN_SERVICE'") |
| | | int stopServiceSession(@Param("id") Long id, @Param("guideId") Long guideId); |
| | | |
| | | @Update("UPDATE guide_receiving_session SET reminder_pushed_at = #{now}, updated_at = NOW() " + |
| | | "WHERE id = #{id} AND deleted = 0 AND status = 'RECEIVING' AND reminder_pushed_at IS NULL") |
| | | int claimServiceReminder(@Param("id") Long id, @Param("now") LocalDateTime now); |