@@ -68,9 +68,9 @@ public class ChatGroupDao extends AbstractCommunicationDao {
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(" 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)");
returnrawQueryGetStringList(sql.toString(),null);
}
...
...
@@ -82,11 +82,11 @@ public class ChatGroupDao extends AbstractCommunicationDao {
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 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 ");
sql.append(" FROM m_shop_member sm INNER JOIN r_shop_member_group rsmg ON sm.shop_member_id = rsmg.shop_member_id ");
@@ -156,11 +156,11 @@ public class ChatGroupDao extends AbstractCommunicationDao {
}
publicChatGroupDtogetGroup(intgroupId){
returnrawQueryGetDto("SELECT * from m_chat_group WHERE group_id = "+groupId,null,ChatGroupDto.class);
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);
returnrawQueryGetDtoList("SELECT * FROM m_chat_group WHERE favorite_register_date IS NOT NULL ORDER BY favorite_register_date ",null,ChatGroupDto.class);
returnrawQueryGetDto("SELECT parent.* from m_chat_group parent INNER JOIN m_chat_group child on child.parent_group_id = parent.group_id WHERE child.group_id = ?",newString[]{""+childGroupId},ChatGroupDto.class);
returnrawQueryGetDto("SELECT parent.* FROM m_chat_group parent INNER JOIN m_chat_group child ON child.parent_group_id = parent.group_id WHERE child.group_id = ?",newString[]{""+childGroupId},ChatGroupDto.class);
}
publicbooleanisExistParent(intbaseId){
...
...
@@ -217,7 +217,7 @@ public class ChatGroupDao extends AbstractCommunicationDao {
}
publicList<ChatGroupDto>getMyGroups(){
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);
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);
@@ -253,7 +253,7 @@ public class ShopMemberDao extends AbstractCommunicationDao {
sql.append(" m_shop_member AS sm ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append("WHERE rsmg.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("WHERE rsmg.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) ");