@@ -565,7 +565,11 @@ public class GroupDao extends AbstractDao {
...
@@ -565,7 +565,11 @@ public class GroupDao extends AbstractDao {
publicList<GroupDto>getUserGroups(){
publicList<GroupDto>getUserGroups(){
returnrawQueryGetDtoList("select * from m_group where user_group_flg = 1 ORDER BY group_name",null,GroupDto.class);
returnrawQueryGetDtoList("select * from m_group where user_group_flg = 1 ORDER BY group_name",null,GroupDto.class);
}
}
publicList<GroupDto>getMyGroups(){
returnrawQueryGetDtoList("select * from m_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,GroupDto.class);
@@ -189,7 +189,7 @@ public class ShopMemberDao extends AbstractDao {
...
@@ -189,7 +189,7 @@ public class ShopMemberDao extends AbstractDao {
sql.append(" m_shop_member AS sm ");
sql.append(" m_shop_member AS sm ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" WHERE rsmg.group_id IN (SELECT group_id FROM m_group WHERE user_group_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)");
sql.append(" AND sm.self_flg != 1");
sql.append(" AND sm.self_flg != 1");
sql.append(" AND sm.shop_member_name LIKE '%"+shopMemberName+"%' ");
sql.append(" AND sm.shop_member_name LIKE '%"+shopMemberName+"%' ");
sql.append(" ORDER BY sm.shop_member_name DESC ");
sql.append(" ORDER BY sm.shop_member_name DESC ");
...
@@ -208,7 +208,7 @@ public class ShopMemberDao extends AbstractDao {
...
@@ -208,7 +208,7 @@ public class ShopMemberDao extends AbstractDao {
sql.append(" m_shop_member AS sm ");
sql.append(" m_shop_member AS sm ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" INNER JOIN r_shop_member_group AS rsmg ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" ON sm.shop_member_id = rsmg.shop_member_id ");
sql.append(" WHERE rsmg.group_id IN (SELECT group_id FROM m_group WHERE user_group_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)");
sql.append(" AND sm.self_flg != 1");
sql.append(" AND sm.self_flg != 1");
sql.append(" AND sm.shop_member_id NOT IN (SELECT shop_member_id FROM r_chat_room_shop_member WHERE chat_room_id = ?)");
sql.append(" AND sm.shop_member_id NOT IN (SELECT shop_member_id FROM r_chat_room_shop_member WHERE chat_room_id = ?)");
sql.append(" AND sm.shop_member_name LIKE '%"+shopMemberName+"%' ");
sql.append(" AND sm.shop_member_name LIKE '%"+shopMemberName+"%' ");