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 {
...
@@ -39,40 +39,39 @@ public class RoomListJSON extends AcmsCommonJSON {
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
// ルーム一覧情報を取得
// ルーム一覧情報を取得
if
(
json
.
has
(
Body
))
{
if
(!
json
.
has
(
Body
))
{
return
;
}
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
();
chatRoomDto
.
chatRoomId
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
RoomId
);
JSONArray
roomListJsonArray
=
json
.
getJSONObject
(
Body
).
getJSONArray
(
ChatRoomInfoList
);
chatRoomDto
.
chatRoomName
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getString
(
RoomName
);
if
(
roomListJsonArray
==
null
)
{
return
;
}
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
=
new
ArrayList
<
ChatRoomDto
>();
JSONObject
lastMessageInfoJSON
=
roomListJsonArray
.
getJSONObject
(
listCount
).
has
(
LastMessageInfo
)
?
roomListJsonArray
.
getJSONObject
(
listCount
).
getJSONObject
(
LastMessageInfo
)
:
null
;
for
(
int
listCount
=
0
;
listCount
<
roomListJsonArray
.
length
();
listCount
++)
{
if
(
lastMessageInfoJSON
!=
null
&&
lastMessageInfoJSON
.
has
(
MessageId
)
)
{
if
(
roomListJsonArray
.
getJSONObject
(
listCount
).
length
()
==
0
)
{
chatMessageDto
.
chatRoomId
=
chatRoomDto
.
chatRoomId
;
break
;
chatMessageDto
.
message
=
lastMessageInfoJSON
.
getString
(
Message
);
}
chatMessageDto
.
messageType
=
lastMessageInfoJSON
.
getInt
(
MessageType
);
ChatRoomDto
chatRoomDto
=
new
ChatRoomDto
(
);
if
(
lastMessageInfoJSON
.
has
(
InsertDate
))
{
ChatMessageDto
chatMessageDto
=
new
ChatMessageDto
();
chatMessageDto
.
insertDate
=
DateTimeUtil
.
millToDateString
(
lastMessageInfoJSON
.
getJSONObject
(
InsertDate
).
getLong
(
Time
));
}
chatRoomDto
.
chatRoomId
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
RoomId
);
chatMessageDto
.
shopMemberId
=
lastMessageInfoJSON
.
getInt
(
ShopMemberId
);
chatRoomDto
.
chatRoomName
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getString
(
RoomName
);
chatMessageDto
.
chatMessageId
=
lastMessageInfoJSON
.
getInt
(
MessageId
);
chatRoomDto
.
type
=
roomListJsonArray
.
getJSONObject
(
listCount
).
getInt
(
RoomType
);
chatRoomDto
.
lastMessageInfo
=
chatMessageDto
;
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 {
...
@@ -15,18 +15,17 @@ public class ChatMessageDto extends AbstractDto {
@Override
@Override
public
Object
[]
getInsertValues
()
{
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
@Override
public
Object
[]
getUpdateValues
()
{
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
@Override
public
String
[]
getKeyValues
()
{
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 {
...
@@ -18,17 +18,17 @@ public class ChatRoomDto extends AbstractDto {
@Override
@Override
public
Object
[]
getInsertValues
()
{
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
chatRoomId
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
favoriteRegisterDate
};
return
new
Object
[]
{
chatRoomId
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
favoriteRegisterDate
};
}
}
@Override
@Override
public
Object
[]
getUpdateValues
()
{
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
favoriteRegisterDate
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
chatRoomId
};
return
new
Object
[]
{
favoriteRegisterDate
,
chatRoomName
,
type
,
unreadCount
,
userCount
,
chatRoomId
};
}
}
@Override
@Override
public
String
[]
getKeyValues
()
{
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 {
...
@@ -8,17 +8,17 @@ public class CollaborationDetailDto extends AbstractDto {
@Override
@Override
public
Object
[]
getInsertValues
()
{
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
collaborationDetialId
,
collaborationId
,
collaborationType
,
collaborationDuration
};
return
new
Object
[]
{
collaborationDetialId
,
collaborationId
,
collaborationType
,
collaborationDuration
};
}
}
@Override
@Override
public
Object
[]
getUpdateValues
()
{
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
collaborationDuration
,
collaborationId
,
collaborationType
,
collaborationDetialId
};
return
new
Object
[]
{
collaborationDuration
,
collaborationId
,
collaborationType
,
collaborationDetialId
};
}
}
@Override
@Override
public
String
[]
getKeyValues
()
{
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 {
...
@@ -10,17 +10,17 @@ public class ShopMemberDto extends AbstractDto {
@Override
@Override
public
Object
[]
getInsertValues
()
{
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
shopMemberId
,
shopMemberName
,
profileUrl
,
favoriteRegisterDate
};
return
new
Object
[]
{
shopMemberId
,
shopMemberName
,
profileUrl
,
favoriteRegisterDate
};
}
}
@Override
@Override
public
Object
[]
getUpdateValues
()
{
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
shopMemberName
,
profileUrl
,
favoriteRegisterDate
,
shopMemberId
};
return
new
Object
[]
{
shopMemberName
,
profileUrl
,
favoriteRegisterDate
,
shopMemberId
};
}
}
@Override
@Override
public
String
[]
getKeyValues
()
{
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