sql.append(" CASE WHEN (grandparentgroup.group_name IS NOT NULL) THEN grandparentgroup.group_name || ' / ' || parentgroup.group_name || ' / ' || usergroup.group_name ");
sql.append(" WHEN (parentgroup.group_name IS NOT NULL) THEN parentgroup.group_name || ' / ' || usergroup.group_name ");
sql.append(" ELSE usergroup.group_name ");
sql.append(" END AS group_path, usergroup.group_id ");
sql.append(" FROM m_chat_group usergroup ");
sql.append(" LEFT JOIN m_chat_group parentgroup on usergroup.parent_group_id = parentgroup.group_id ");
sql.append(" LEFT JOIN m_chat_group grandparentgroup on parentgroup.parent_group_id = grandparentgroup.group_id ");
sql.append(" WHERE usergroup.group_id IN ");
sql.append(" (SELECT group_id ");
sql.append(" FROM m_shop_member sm INNER JOIN r_shop_member_group rsmg on sm.shop_member_id = rsmg.shop_member_id ");
returnrawQueryGetDto("select * from m_chat_group where group_id = "+groupId,null,ChatGroupDto.class);
}
publicList<ChatGroupDto>getFavoriteGroup(){
returnrawQueryGetDtoList("select * from m_chat_group where favorite_register_date IS NOT NULL ORDER BY favorite_register_date ",null,ChatGroupDto.class);
list=rawQueryGetDtoList("select * from m_chat_group mg where (mg.parent_group_id = ?) ORDER BY group_name",newString[]{""+parentId},ChatGroupDto.class);
returnlist;
}
publicChatGroupDtogetRootGroup(){
returnrawQueryGetDto("select * from m_chat_group mg where (mg.parent_group_id = 0)",null,ChatGroupDto.class);