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
cd300e10
Commit
cd300e10
authored
Feb 03, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コードレビュー対応。
parent
a368af94
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
42 deletions
+40
-42
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoomListJSON.java
+28
-29
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
+3
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatRoomDto.java
+3
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/CollaborationDetailDto.java
+3
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ShopMemberDto.java
+3
-3
ABVJE_Launcher_Android/assets/chat/public/js/chat.js
+0
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoomListJSON.java
View file @
cd300e10
...
...
@@ -39,40 +39,39 @@ public class RoomListJSON extends AcmsCommonJSON {
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
// ルーム一覧情報を取得
if
(
json
.
has
(
Body
))
{
JSONArray
roomListJsonArray
=
json
.
getJSONObject
(
Body
).
getJSONArray
(
ChatRoomInfoList
);
if
(
roomListJsonArray
!=
null
)
{
roomList
=
new
ArrayList
<
ChatRoomDto
>();
for
(
int
listCount
=
0
;
listCount
<
roomListJsonArray
.
length
();
listCount
++)
{
if
(
roomListJsonArray
.
getJSONObject
(
listCount
).
length
()
==
0
)
{
break
;
}
ChatRoomDto
chatRoomDto
=
new
ChatRoomDto
();
ChatMessageDto
chatMessageDto
=
new
ChatMessageDto
();
if
(!
json
.
has
(
Body
))
{
return
;
}
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
).
has
(
UnreadCount
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
UnreadCount
)
:
0
;
chatRoomDto
.
userCount
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONArray
(
AttendUsers
).
length
();
JSONArray
roomListJsonArray
=
json
.
getJSONObject
(
Body
).
getJSONArray
(
ChatRoomInfoList
);
if
(
roomListJsonArray
==
null
)
{
return
;
}
//最後メッセージ情報がある場合の処理
JSONObject
lastMessageInfoJSON
=
roomListJsonArray
.
getJSONObject
(
listCount
).
has
(
LastMessageInfo
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONObject
(
LastMessageInfo
)
:
null
;
if
(
lastMessageInfoJSON
!=
null
&&
lastMessageInfoJSON
.
has
(
MessageId
)
)
{
chatMessageDto
.
chatRoomId
=
chatRoomDto
.
chatRoomId
;
chatMessageDto
.
message
=
lastMessageInfoJSON
.
getString
(
Message
);
chatMessageDto
.
messageType
=
lastMessageInfoJSON
.
getInt
(
MessageType
);
if
(
lastMessageInfoJSON
.
has
(
InsertDate
))
{
chatMessageDto
.
insertDate
=
DateTimeUtil
.
millToDateString
(
lastMessageInfoJSON
.
getJSONObject
(
InsertDate
).
getLong
(
Time
));
}
chatMessageDto
.
shopMemberId
=
lastMessageInfoJSON
.
getInt
(
ShopMemberId
);
chatMessageDto
.
chatMessageId
=
lastMessageInfoJSON
.
getInt
(
MessageId
);
chatRoomDto
.
lastMessageInfo
=
chatMessageDto
;
}
roomList
=
new
ArrayList
<
ChatRoomDto
>();
for
(
int
listCount
=
0
;
listCount
<
roomListJsonArray
.
length
();
listCount
++)
{
if
(
roomListJsonArray
.
getJSONObject
(
listCount
).
length
()
==
0
)
{
break
;
}
ChatRoomDto
chatRoomDto
=
new
ChatRoomDto
(
);
ChatMessageDto
chatMessageDto
=
new
ChatMessageDto
();
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
).
has
(
UnreadCount
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
UnreadCount
)
:
0
;
chatRoomDto
.
userCount
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONArray
(
AttendUsers
).
length
();
roomList
.
add
(
chatRoomDto
);
//最後メッセージ情報がある場合の処理
JSONObject
lastMessageInfoJSON
=
roomListJsonArray
.
getJSONObject
(
listCount
).
has
(
LastMessageInfo
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONObject
(
LastMessageInfo
)
:
null
;
if
(
lastMessageInfoJSON
!=
null
&&
lastMessageInfoJSON
.
has
(
MessageId
))
{
chatMessageDto
.
chatRoomId
=
chatRoomDto
.
chatRoomId
;
chatMessageDto
.
message
=
lastMessageInfoJSON
.
getString
(
Message
);
chatMessageDto
.
messageType
=
lastMessageInfoJSON
.
getInt
(
MessageType
);
if
(
lastMessageInfoJSON
.
has
(
InsertDate
))
{
chatMessageDto
.
insertDate
=
DateTimeUtil
.
millToDateString
(
lastMessageInfoJSON
.
getJSONObject
(
InsertDate
).
getLong
(
Time
));
}
chatMessageDto
.
shopMemberId
=
lastMessageInfoJSON
.
getInt
(
ShopMemberId
);
chatMessageDto
.
chatMessageId
=
lastMessageInfoJSON
.
getInt
(
MessageId
);
chatRoomDto
.
lastMessageInfo
=
chatMessageDto
;
}
roomList
.
add
(
chatRoomDto
);
}
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatMessageDto.java
View file @
cd300e10
...
...
@@ -15,18 +15,17 @@ public class ChatMessageDto extends AbstractDto {
@Override
public
Object
[]
getInsertValues
()
{
Object
[]
test
=
new
Object
[]{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
};
return
new
Object
[]{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
};
return
new
Object
[]
{
chatMessageId
,
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
chatMessageId
};
return
new
Object
[]
{
chatRoomId
,
shopMemberId
,
message
,
messageType
,
imageName
,
downloadFileName
,
savePath
,
insertDate
,
chatMessageId
};
}
@Override
public
String
[]
getKeyValues
()
{
return
new
String
[]{
""
+
chatMessageId
};
return
new
String
[]{
""
+
chatMessageId
};
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatRoomDto.java
View file @
cd300e10
...
...
@@ -18,17 +18,17 @@ public class ChatRoomDto extends AbstractDto {
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
chatRoomId
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
favoriteRegisterDate
};
return
new
Object
[]
{
chatRoomId
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
favoriteRegisterDate
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
favoriteRegisterDate
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
chatRoomId
};
return
new
Object
[]
{
favoriteRegisterDate
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
chatRoomId
};
}
@Override
public
String
[]
getKeyValues
()
{
return
new
String
[]
{
""
+
chatRoomId
};
return
new
String
[]
{
""
+
chatRoomId
};
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/CollaborationDetailDto.java
View file @
cd300e10
...
...
@@ -8,17 +8,17 @@ public class CollaborationDetailDto extends AbstractDto {
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
collaborationDetialId
,
collaborationId
,
collaborationType
,
collaborationDuration
};
return
new
Object
[]
{
collaborationDetialId
,
collaborationId
,
collaborationType
,
collaborationDuration
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
collaborationDuration
,
collaborationId
,
collaborationType
,
collaborationDetialId
};
return
new
Object
[]
{
collaborationDuration
,
collaborationId
,
collaborationType
,
collaborationDetialId
};
}
@Override
public
String
[]
getKeyValues
()
{
return
new
String
[]{
""
+
collaborationDetialId
};
return
new
String
[]{
""
+
collaborationDetialId
};
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ShopMemberDto.java
View file @
cd300e10
...
...
@@ -10,17 +10,17 @@ public class ShopMemberDto extends AbstractDto {
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
shopMemberId
,
shopMemberName
,
profileUrl
,
favoriteRegisterDate
};
return
new
Object
[]
{
shopMemberId
,
shopMemberName
,
profileUrl
,
favoriteRegisterDate
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
shopMemberName
,
profileUrl
,
favoriteRegisterDate
,
shopMemberId
};
return
new
Object
[]
{
shopMemberName
,
profileUrl
,
favoriteRegisterDate
,
shopMemberId
};
}
@Override
public
String
[]
getKeyValues
()
{
return
new
String
[]{
""
+
shopMemberId
};
return
new
String
[]{
""
+
shopMemberId
};
}
}
ABVJE_Launcher_Android/assets/chat/public/js/chat.js
View file @
cd300e10
This diff is collapsed.
Click to expand it.
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