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
00d90361
Commit
00d90361
authored
Mar 26, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getLoginParameter修正。
parent
540a5369
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
+38
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+14
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+24
-3
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
00d90361
...
...
@@ -79,6 +79,20 @@ public class CommunicationLogic extends AbstractLogic {
return
roomListToStr
;
}
public
String
getUsersInRoom
(
Integer
roomId
)
{
List
<
ShopMemberDto
>
userList
=
shopMemberDao
.
getUserInRoom
(
roomId
);
JSONArray
attendUsers
=
new
JSONArray
();
for
(
ShopMemberDto
user
:
userList
)
{
Map
<
String
,
Object
>
userMap
=
new
HashMap
<
String
,
Object
>();
userMap
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_ID
,
user
.
shopMemberId
);
userMap
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
user
.
profileUrl
);
userMap
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
user
.
shopMemberName
);
JSONObject
jsonObject
=
new
JSONObject
(
userMap
);
attendUsers
.
put
(
jsonObject
);
}
String
attendUsersStr
=
attendUsers
.
toString
();
return
attendUsersStr
;
}
public
String
getMessages
(
Integer
roomId
)
{
List
<
ChatMessageDto
>
chatMessageDtoList
=
chatMessageDao
.
getChatMessage
(
roomId
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
00d90361
...
...
@@ -85,6 +85,8 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
private
final
String
NETWORK_ERROR_PLACE_HOLDER
=
"file:///android_asset/chat/public_new/chat.html"
;
//private final String NETWORK_ERROR_PLACE_HOLDER = "file:///android_asset/chat/public/networkError.html";
private
final
String
CHAT_PAGE_URL
=
"file:///android_asset/chat/public_new/chat.html"
;
private
final
String
CHAT_ROOM_PAGE_URL
=
"file:///android_asset/chat/public_new/chat_room.html"
;
private
final
String
DEFAULT_CHECKSUM
=
"0000000000"
;
//AISDevelop
...
...
@@ -539,12 +541,12 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
// 最後のチャットのルーム
PreferenceUtil
.
putUserPref
(
getApplicationContext
(),
AppDefType
.
UserPrefKey
.
CHAT_LAST_ROOMID
,
String
.
valueOf
(
roomId
));
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', '%s', '%s', '%s'
);"
,
sid
,
loginId
,
shopName
,
roomId
,
roomName
,
localLanguage
));
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', '%s', '%s', '%s'
, '%s');"
,
sid
,
loginId
,
shopName
,
roomId
,
roomName
,
localLanguage
,
shopMemberId
));
}
else
{
if
(
lastRoomName
.
length
()
>
0
&&
lastRoomId
.
length
()
>
0
)
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', '%s', '%s', '%s'
);"
,
sid
,
loginId
,
shopName
,
lastRoomId
,
lastRoomName
,
localLanguage
));
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', '%s', '%s', '%s'
, '%s');"
,
sid
,
loginId
,
shopName
,
lastRoomId
,
lastRoomName
,
localLanguage
,
shopMemberId
));
}
else
{
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', undefined, undefined, '%s'
);"
,
sid
,
loginId
,
shopName
,
localLanguage
));
mChatWebView
.
loadUrl
(
String
.
format
(
"javascript:getLoginParameter('%s', '%s', '%s', undefined, undefined, '%s'
, '%s');"
,
sid
,
loginId
,
shopName
,
localLanguage
,
shopMemberId
));
}
}
}
...
...
@@ -767,12 +769,31 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
@JavascriptInterface
public
void
joinRoom
(
String
joinRoomId
,
String
joinRoomName
)
{
roomId
=
Long
.
parseLong
(
joinRoomId
);
roomName
=
joinRoomName
;
System
.
out
.
println
(
"-----------joinROOM ON android-------"
+
roomId
+
"-"
+
roomName
);
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
CHAT_ROOM_PAGE_URL
);
}
});
}
@JavascriptInterface
public
String
getMyInfo
()
{
String
myInfoStr
=
communicationLogic
.
getMyInfo
();
return
myInfoStr
;
}
@JavascriptInterface
public
String
getUsersInRoom
(
String
roomId
)
{
String
attendUsers
=
communicationLogic
.
getUsersInRoom
(
Integer
.
parseInt
(
roomId
));
return
attendUsers
;
}
@JavascriptInterface
public
String
getMyGroupUsers
()
{
String
myGroupUsersStr
=
communicationLogic
.
getMyGroupUsers
();
return
myGroupUsersStr
;
...
...
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