Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
181ebe40
Commit
181ebe40
authored
Jan 21, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ルーム情報更新前にデータクリア
parent
ca1b03fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoomListJSON.java
+7
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
+2
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+5
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+1
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoomListJSON.java
View file @
181ebe40
...
...
@@ -50,16 +50,21 @@ public class RoomListJSON extends AcmsCommonJSON {
chatRoomDto
.
chatRoomId
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
RoomId
);
chatRoomDto
.
chatRoomName
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getString
(
RoomName
);
chatRoomDto
.
type
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
RoomType
);
chatRoomDto
.
unreadCount
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
UnreadCount
)
;
chatRoomDto
.
unreadCount
=
roomListJsonArray
.
getJSONObject
(
listCount
).
has
(
UnreadCount
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
UnreadCount
)
:
0
;
chatRoomDto
.
userCount
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONArray
(
AttendUsers
).
length
();
//最後メッセージ情報がある場合の処理
JSONObject
lastMessageInfoJSON
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONObject
(
LastMessageInfo
)
;
JSONObject
lastMessageInfoJSON
=
roomListJsonArray
.
getJSONObject
(
listCount
).
has
(
LastMessageInfo
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONObject
(
LastMessageInfo
)
:
null
;
if
(
lastMessageInfoJSON
!=
null
)
{
chatMessageDto
.
chatRoomId
=
chatRoomDto
.
chatRoomId
;
chatMessageDto
.
message
=
lastMessageInfoJSON
.
getString
(
Message
);
chatMessageDto
.
messageType
=
lastMessageInfoJSON
.
getInt
(
MessageType
);
lastMessageInfoJSON
.
getJSONObject
(
MessageInsertDate
);
//TODO Change InsertDate Type
chatMessageDto
.
insertDate
=
lastMessageInfoJSON
.
getString
(
MessageInsertDate
);
chatMessageDto
.
shopMemberId
=
lastMessageInfoJSON
.
getInt
(
ShopMemberId
);
chatMessageDto
.
chatMessageId
=
lastMessageInfoJSON
.
getInt
(
MessageId
);
chatRoomDto
.
lastMessageInfo
=
chatMessageDto
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
View file @
181ebe40
...
...
@@ -105,6 +105,8 @@ public class ChatRoomDao extends AbstractDao {
try
{
beginTransaction
();
delete
(
"t_chat_room"
,
null
,
null
);
delete
(
"r_chat_room_shop_member"
,
null
,
null
);
delete
(
"t_chat_message"
,
null
,
null
);
commit
();
}
catch
(
Exception
e
)
{
rollback
();
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
181ebe40
...
...
@@ -91,4 +91,9 @@ public class CommunicationLogic extends AbstractLogic {
chatMessageDao
.
insertChatMessage
(
chatRoomDto
.
lastMessageInfo
);
}
}
public
void
deleteChatRoomList
()
{
chatRoomDao
.
deleteChatRoom
();
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
181ebe40
...
...
@@ -695,6 +695,7 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
public
void
updateRoomList
()
throws
NetworkDisconnectedException
,
AcmsException
{
Map
<
String
,
Object
>
chatRoomList
;
RoomListJSON
resultJson
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
getRoomList
(
sid
);
communicationLogic
.
deleteChatRoomList
();
communicationLogic
.
insertChatRoomList
(
resultJson
.
roomList
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment