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
9816e8e3
Commit
9816e8e3
authored
Mar 26, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コードレビュー対応。
parent
ec675abc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
32 deletions
+34
-32
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
+3
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/GroupDao.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+4
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+26
-21
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatRoomDao.java
View file @
9816e8e3
...
@@ -114,9 +114,9 @@ public class ChatRoomDao extends AbstractDao {
...
@@ -114,9 +114,9 @@ public class ChatRoomDao extends AbstractDao {
}
}
public
void
insertChatRoomUsers
(
List
<
Integer
>
attendUsers
,
Integer
chatRoomId
)
{
public
void
insertChatRoomUsers
(
List
<
Integer
>
attendUsers
,
Integer
chatRoomId
)
{
for
(
Integer
attendUserId
:
attendUsers
)
{
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
});
insert
(
"insert or replace into r_chat_room_shop_member (chat_room_id, shop_member_id) values (?,?)"
,
new
Integer
[]{
chatRoomId
,
attendUserId
});
}
}
}
}
public
boolean
updateChatRoom
(
ChatRoomDto
dto
)
{
public
boolean
updateChatRoom
(
ChatRoomDto
dto
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/GroupDao.java
View file @
9816e8e3
...
@@ -555,7 +555,7 @@ public class GroupDao extends AbstractDao {
...
@@ -555,7 +555,7 @@ public class GroupDao extends AbstractDao {
}
}
public
GroupDto
getParentGroup
(
Integer
childGroupId
)
{
public
GroupDto
getParentGroup
(
Integer
childGroupId
)
{
return
rawQueryGetDto
(
"select parent.* from m_group parent inner join m_group child on child.parent_group_id = parent.group_id where child.group_id = ?"
,
new
String
[]{
""
+
childGroupId
},
GroupDto
.
class
);
return
rawQueryGetDto
(
"select parent.* from m_group parent inner join m_group child on child.parent_group_id = parent.group_id where child.group_id = ?"
,
new
String
[]{
""
+
childGroupId
},
GroupDto
.
class
);
}
}
public
boolean
isExistParent
(
int
baseId
)
{
public
boolean
isExistParent
(
int
baseId
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
9816e8e3
...
@@ -109,11 +109,8 @@ public class CommunicationLogic extends AbstractLogic {
...
@@ -109,11 +109,8 @@ public class CommunicationLogic extends AbstractLogic {
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
shopMemberDto
.
shopMemberName
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
shopMemberDto
.
shopMemberName
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
shopMemberDto
.
profileUrl
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
shopMemberDto
.
profileUrl
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupPathList
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupPathList
);
if
(
StringUtil
.
isNullOrEmpty
(
shopMemberDto
.
favoriteRegisterDate
))
{
boolean
hasRegisteredDate
=
StringUtil
.
isNullOrEmpty
(
shopMemberDto
.
favoriteRegisterDate
)
==
false
;
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
false
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
hasRegisteredDate
);
}
else
{
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
true
);
}
return
resultJson
.
toString
();
return
resultJson
.
toString
();
}
}
...
@@ -304,10 +301,10 @@ public class CommunicationLogic extends AbstractLogic {
...
@@ -304,10 +301,10 @@ public class CommunicationLogic extends AbstractLogic {
GroupDto
parentGroup
=
groupDao
.
getParentGroup
(
targetGroupId
);
GroupDto
parentGroup
=
groupDao
.
getParentGroup
(
targetGroupId
);
if
(
parentGroup
!=
null
)
{
if
(
parentGroup
!=
null
)
{
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
PARENT_GROUP_ID
,
parentGroup
.
groupId
);
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
PARENT_GROUP_ID
,
parentGroup
.
groupId
);
}
}
if
(
rootGroup
!=
null
)
{
if
(
rootGroup
!=
null
)
{
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
ROOT_GROUP_ID
,
rootGroup
.
groupId
);
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
ROOT_GROUP_ID
,
rootGroup
.
groupId
);
}
}
//グループ
//グループ
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
9816e8e3
...
@@ -828,14 +828,13 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -828,14 +828,13 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
@JavascriptInterface
@JavascriptInterface
public
void
addFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
public
void
addFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
insertFavoriteUser
(
shopMemberId
);
boolean
result
=
insertFavoriteUser
(
shopMemberId
);
if
(
result
)
{
if
(!
result
)
{
return
;
}
mChatWebView
.
post
(
new
Runnable
()
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
mChatWebView
.
loadUrl
(
"javascript:CHAT_UI.refreshContactScreen();"
);
mChatWebView
.
loadUrl
(
"javascript:CHAT_UI.refreshContactScreen();"
);
}
}
});
});
}
}
}
@JavascriptInterface
@JavascriptInterface
...
@@ -901,17 +900,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -901,17 +900,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
}
private
void
updateUserInfoFromServer
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
void
updateUserInfoFromServer
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
MyInfoJSON
resultJson
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
getNameCard
(
sid
,
shopMemberId
);
MyInfoJSON
resultJson
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
getNameCard
(
sid
,
shopMemberId
);
communicationLogic
.
insertShopMember
(
resultJson
.
shopMemberDto
);
communicationLogic
.
insertShopMember
(
resultJson
.
shopMemberDto
);
}
}
private
boolean
insertFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
boolean
insertFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
insertFavoriteUser
(
sid
,
Integer
.
parseInt
(
shopMemberId
));
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
insertFavoriteUser
(
sid
,
Integer
.
parseInt
(
shopMemberId
));
return
result
;
return
result
;
}
}
private
boolean
deleteFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
boolean
deleteFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
deleteFavoriteUser
(
sid
,
Integer
.
parseInt
(
shopMemberId
));
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
deleteFavoriteUser
(
sid
,
Integer
.
parseInt
(
shopMemberId
));
if
(
result
)
{
if
(
result
)
{
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
shopMemberId
));
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
shopMemberId
));
...
@@ -921,18 +923,21 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -921,18 +923,21 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
}
private
boolean
insertFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
boolean
insertFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
insertFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
insertFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
return
result
;
return
result
;
}
}
private
boolean
deleteFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
boolean
deleteFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
deleteFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
if
(
result
)
{
.
deleteFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
groupId
));
if
(!
result
)
{
return
false
;
}
communicationLogic
.
deleteavoriteGroup
(
deleteFavoriteList
);
}
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
return
result
;
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
groupId
));
communicationLogic
.
deleteavoriteGroup
(
deleteFavoriteList
);
return
true
;
}
}
private
void
updateGroupInfoFromServer
(
String
groupIds
)
throws
NetworkDisconnectedException
,
AcmsException
{
private
void
updateGroupInfoFromServer
(
String
groupIds
)
throws
NetworkDisconnectedException
,
AcmsException
{
...
@@ -950,10 +955,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
...
@@ -950,10 +955,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
SharedPreferences
.
Editor
editor
=
pref
.
edit
();
SharedPreferences
.
Editor
editor
=
pref
.
edit
();
communicationLogic
.
updateGroup
(
resultJson
.
groupList
);
communicationLogic
.
updateGroup
(
resultJson
.
groupList
);
if
(
groupIds
.
equals
(
ABookCommConstants
.
FLAG
.
GROUP_REQUEST_ALL
.
toString
()))
{
if
(
groupIds
.
equals
(
ABookCommConstants
.
FLAG
.
GROUP_REQUEST_ALL
.
toString
()))
{
editor
.
putString
(
ABookCommConstants
.
FLAG
.
GROUP_REQUEST_ALL
.
toString
(),
resultJson
.
allGroupLastUpdateDate
);
editor
.
putString
(
ABookCommConstants
.
FLAG
.
GROUP_REQUEST_ALL
.
toString
(),
resultJson
.
allGroupLastUpdateDate
);
}
else
{
}
else
{
for
(
GroupDto
groupDto
:
resultJson
.
groupList
)
{
for
(
GroupDto
groupDto
:
resultJson
.
groupList
)
{
editor
.
putString
(
Integer
.
toString
(
groupDto
.
groupId
),
groupDto
.
updateDate
);
editor
.
putString
(
Integer
.
toString
(
groupDto
.
groupId
),
groupDto
.
updateDate
);
}
}
}
}
editor
.
commit
();
editor
.
commit
();
...
...
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