def confirm_out(account_id, current_date, create_time, callback): contents, success = yield deal_confirm_out(account_id, create_time, callback) yield push_messages(account_id, contents) if success: set_status_by_user_date(account_id, current_date, status="out_done", process="sign_out_done")
def start(account_id, _, __, ___): """ Handle the user start using robots. Send the robot's self introduction information, and the chat room is bound with rich menu. :param account_id: user account id. """ contents = yield start_content(account_id) yield push_messages(account_id, contents)
def manual_sign_out(account_id, current_date, _, __): """ Handle the user's manual check-out. :param account_id: user account id. :param current_date: current date by local time. :param _: no use :param __: no use """ contents = yield manual_sign_out_content(account_id, current_date) yield push_messages(account_id, contents)
def confirm_out(account_id, current_date, create_time, callback): """ This function is triggered when the user clicks confirm check-out. will be linked with the calendar internally. :param account_id: user account id. :param current_date: current date by local time. :param create_time: Time the request arrived at the server. :param callback: User triggered callback. :return: None """ contents, success = yield deal_confirm_out(account_id, create_time, callback) yield push_messages(account_id, contents) if success: set_status_by_user_date(account_id, current_date, status="out_done", process="sign_out_done")
def manual_sign_out(account_id, current_date, _, __): contents = yield manual_sign_out_content(account_id, current_date) yield push_messages(account_id, contents)
def start(account_id, _, __, ___): contents = yield start_content(account_id) yield push_messages(account_id, contents)