Commit 9e5c597c by Lee Munkyeong

Merge branch 'features/1.3.100_#635_ユーザを招待すると参加リストの既存ユーザがなくなる。' into 'features/1.3.100'

バグ修正

See merge request !135
parents fec89e5f 6c99b668
......@@ -175,6 +175,7 @@ public class ChatRoomDao extends AbstractCommunicationDao {
for (ChatRoomDto chatRoomDto : chatRoomDtoList) {
roomIdList.add(chatRoomDto.chatRoomId);
insertChatRoom(chatRoomDto);
deleteChatRoomUsers(chatRoomDto.chatRoomId);
insertChatRoomUsers(chatRoomDto.attendUsers, chatRoomDto.chatRoomId);
}
update("delete from t_chat_room where chat_room_id NOT IN (" + StringUtil.join(" , ", roomIdList) + ")", null);
......@@ -187,12 +188,15 @@ public class ChatRoomDao extends AbstractCommunicationDao {
}
public void insertChatRoomUsers(List<Integer> attendUsers, Integer chatRoomId) {
update("delete from r_chat_room_shop_member where chat_room_id = ?", new Integer[]{chatRoomId});
for (Integer attendUserId : attendUsers) {
insert("insert or replace into r_chat_room_shop_member (chat_room_id, shop_member_id) values (?,?)", new Integer[]{chatRoomId, attendUserId});
}
}
public void deleteChatRoomUsers(Integer chatRoomId){
update("delete from r_chat_room_shop_member where chat_room_id = ?", new Integer[]{chatRoomId});
}
public boolean updateChatRoom(ChatRoomDto dto) {
long count = update("update t_chat_room set chat_room_name=?, type=?, unread_count=?, user_count=?, favorite_register_date=? where chat_room_id=?", dto.getUpdateValues());
return count > 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment