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 {
}
public
void
insertChatRoomUsers
(
List
<
Integer
>
attendUsers
,
Integer
chatRoomId
)
{
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
});
}
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
});
}
}
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 {
}
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
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
9816e8e3
...
...
@@ -109,11 +109,8 @@ public class CommunicationLogic extends AbstractLogic {
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
shopMemberDto
.
shopMemberName
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
shopMemberDto
.
profileUrl
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupPathList
);
if
(
StringUtil
.
isNullOrEmpty
(
shopMemberDto
.
favoriteRegisterDate
))
{
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
false
);
}
else
{
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
true
);
}
boolean
hasRegisteredDate
=
StringUtil
.
isNullOrEmpty
(
shopMemberDto
.
favoriteRegisterDate
)
==
false
;
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
hasRegisteredDate
);
return
resultJson
.
toString
();
}
...
...
@@ -304,10 +301,10 @@ public class CommunicationLogic extends AbstractLogic {
GroupDto
parentGroup
=
groupDao
.
getParentGroup
(
targetGroupId
);
if
(
parentGroup
!=
null
)
{
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
PARENT_GROUP_ID
,
parentGroup
.
groupId
);
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
PARENT_GROUP_ID
,
parentGroup
.
groupId
);
}
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 {
@JavascriptInterface
public
void
addFavoriteUser
(
String
shopMemberId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
insertFavoriteUser
(
shopMemberId
);
if
(
result
)
{
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
"javascript:CHAT_UI.refreshContactScreen();"
);
}
});
}
if
(!
result
)
{
return
;
}
mChatWebView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
mChatWebView
.
loadUrl
(
"javascript:CHAT_UI.refreshContactScreen();"
);
}
});
}
@JavascriptInterface
...
...
@@ -901,17 +900,20 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
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
);
}
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
;
}
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
)
{
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
shopMemberId
));
...
...
@@ -921,18 +923,21 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
}
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
;
}
private
boolean
deleteFavoriteGroup
(
String
groupId
)
throws
NetworkDisconnectedException
,
AcmsException
{
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
).
deleteFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
if
(
result
)
{
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
groupId
));
communicationLogic
.
deleteavoriteGroup
(
deleteFavoriteList
);
}
return
result
;
boolean
result
=
AcmsClient
.
getInstance
(
ABVEnvironment
.
getInstance
().
networkAdapter
)
.
deleteFavoriteGroup
(
sid
,
Integer
.
parseInt
(
groupId
));
if
(!
result
)
{
return
false
;
}
List
<
Integer
>
deleteFavoriteList
=
new
ArrayList
<
Integer
>();
deleteFavoriteList
.
add
(
Integer
.
parseInt
(
groupId
));
communicationLogic
.
deleteavoriteGroup
(
deleteFavoriteList
);
return
true
;
}
private
void
updateGroupInfoFromServer
(
String
groupIds
)
throws
NetworkDisconnectedException
,
AcmsException
{
...
...
@@ -950,10 +955,10 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
SharedPreferences
.
Editor
editor
=
pref
.
edit
();
communicationLogic
.
updateGroup
(
resultJson
.
groupList
);
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
{
for
(
GroupDto
groupDto
:
resultJson
.
groupList
)
{
editor
.
putString
(
Integer
.
toString
(
groupDto
.
groupId
),
groupDto
.
updateDate
);
editor
.
putString
(
Integer
.
toString
(
groupDto
.
groupId
),
groupDto
.
updateDate
);
}
}
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