def after_deal_get(self):
    comments = g.result.get('data')
    user_id = (g.flask_httpauth_user.get('id', None) if g.flask_httpauth_user else None)
    comment_licks_dict = dict()
    if (user_id is not None):
        sql_query = table_module_map['bloglikelog'].sql_query_default
        sql_query = f'{sql_query} where bll_userid={user_id}'
        user_likes = SqlExecute.query_sql_data(sql_query)
        comment_licks_dict = {like['bll_blogcommentid']: like['bll_status'] for like in user_likes}
    new_comments = []
    for comment in comments:
        comment['is_like'] = (comment_licks_dict.get(comment['id']) or 0)
        if (not comment['bc_commentupid']):
            new_comments.append(comment)
    for comment in new_comments:
        comment['sub'] = [sub for sub in comments if (sub['bc_commentupid'] == comment['id'])]
    g.result['data'] = new_comments
def after_deal_get(self):
    comments = g.result.get('data')
    user_id = (g.flask_httpauth_user.get('id', None) if g.flask_httpauth_user else None)
    comment_licks_dict = dict()
    if (user_id is not None):
        sql_query = table_module_map['bloglikelog'].sql_query_default
        sql_query = f'{sql_query} where bll_userid={user_id}'
        user_likes = SqlExecute.query_sql_data(sql_query)
        comment_licks_dict = {like['bll_blogcommentid']: like['bll_status'] for like in user_likes}
    new_comments = []
    for comment in comments:
        comment['is_like'] = (comment_licks_dict.get(comment['id']) or 0)
        if (not comment['bc_commentupid']):
            new_comments.append(comment)
    for comment in new_comments:
        comment['sub'] = [sub for sub in comments if (sub['bc_commentupid'] == comment['id'])]
    g.result['data'] = new_comments