sql.append(" CASE WHEN (grandparentgroup.group_name IS NOT NULL) THEN grandparentgroup.group_name || ' / ' || parentgroup.group_name || ' / ' || mygroup.group_name ");
sql.append(" WHEN (parentgroup.group_name IS NOT NULL) THEN parentgroup.group_name || ' / ' || mygroup.group_name ");
sql.append(" ELSE mygroup.group_name ");
sql.append(" END AS group_path_list ");
sql.append(" FROM m_chat_group mygroup ");
sql.append(" LEFT JOIN m_chat_group parentgroup on mygroup.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 mygroup.group_id IN (select group_id from m_shop_member sm inner join r_shop_member_group rmg on sm.shop_member_id = rmg.shop_member_id where sm.self_flg = 1)");
sql.append(" FROM group_loop inner join m_chat_group parent on parent.group_id = group_loop.parent_group_id ");
sql.append(" FROM group_loop inner join m_chat_group parent on parent.group_id = group_loop.parent_group_id ");
sql.append(" ) ");
sql.append(" ) ");
sql.append(" SELECT * FROM group_loop ORDER BY group_loop.rownum DESC ");
sql.append(" SELECT * FROM group_loop ORDER BY group_loop.rownum DESC ");
...
@@ -176,18 +205,18 @@ public class ChatGroupDao extends AbstractDao {
...
@@ -176,18 +205,18 @@ public class ChatGroupDao extends AbstractDao {
returnrawQueryGetInt("select * from m_chat_group where parent_group_id = "+baseId,null)>0;
returnrawQueryGetInt("select * from m_chat_group where parent_group_id = "+baseId,null)>0;
}
}
publicList<ChatGroupDto>getUserGroups(){
publicList<ChatGroupDto>getMyGroups(){
returnrawQueryGetDtoList("select * from m_chat_group where user_group_flg = 1 ORDER BY group_name",null,ChatGroupDto.class);
returnrawQueryGetDtoList("select * from m_chat_group where group_id IN (select group_id from m_shop_member sm inner join r_shop_member_group rmg on sm.shop_member_id = rmg.shop_member_id where sm.self_flg = 1) ORDER BY group_name ASC",null,ChatGroupDto.class);