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
8e99a874
Commit
8e99a874
authored
Mar 15, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ネームカード修正
parent
9daff9e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
0 deletions
+65
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/UserUpdateJSON.java
+38
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+20
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+6
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/UserUpdateJSON.java
0 → 100644
View file @
8e99a874
package
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
;
import
org.json.adf.JSONArray
;
import
org.json.adf.JSONObject
;
import
java.util.ArrayList
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.JSONValidationException
;
import
jp.agentec.abook.abv.bl.dto.ShopMemberDto
;
public
class
UserUpdateJSON
extends
AcmsCommonJSON
{
public
ShopMemberDto
shopMemberDto
;
public
UserUpdateJSON
(
String
jsonString
)
throws
AcmsException
{
super
(
jsonString
);
}
@Override
protected
void
parse
(
JSONObject
json
)
throws
JSONValidationException
{
if
(!
json
.
has
(
ABookCommConstants
.
KEY
.
BODY
))
{
return
;
}
JSONObject
UserInfoJson
=
json
.
getJSONObject
(
ABookCommConstants
.
KEY
.
BODY
);
if
(
UserInfoJson
==
null
)
{
return
;
}
shopMemberDto
=
new
ShopMemberDto
();
ArrayList
<
Integer
>
groupIdList
=
new
ArrayList
<
Integer
>();
JSONArray
groupIdJsonArray
=
(
JSONArray
)
UserInfoJson
.
get
(
ABookCommConstants
.
KEY
.
GROUP_IDS
);
for
(
int
i
=
0
;
i
<
groupIdJsonArray
.
length
();
i
++)
{
groupIdList
.
add
(
groupIdJsonArray
.
getInt
(
i
));
}
shopMemberDto
.
groupIdList
=
groupIdList
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookCommConstants.java
View file @
8e99a874
...
...
@@ -27,6 +27,7 @@ public interface ABookCommConstants {
String
GROUP_ID
=
"groupId"
;
String
GROUP_IDS
=
"groupIds"
;
String
GROUP_PATH_LIST
=
"groupPathList"
;
String
IS_FAVORITE
=
"isFavorite"
;
String
CHILD_GROUP_LIST
=
"childGroupList"
;
String
GROUP_USER_LIST
=
"groupUserList"
;
String
BODY
=
"body"
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
8e99a874
...
...
@@ -18,6 +18,7 @@ import jp.agentec.abook.abv.bl.dto.ChatMessageDto;
import
jp.agentec.abook.abv.bl.dto.ChatRoomDto
;
import
jp.agentec.abook.abv.bl.dto.GroupDto
;
import
jp.agentec.abook.abv.bl.dto.ShopMemberDto
;
import
jp.agentec.adf.util.StringUtil
;
/**
* @author Lee-mk
...
...
@@ -71,6 +72,7 @@ public class CommunicationLogic extends AbstractLogic {
Map
<
String
,
Object
>
chatMessageMap
=
new
HashMap
<
String
,
Object
>();
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
CHAT_ROOM_ID
,
chatMessageDto
.
chatRoomId
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
LOGIN_ID
,
chatMessageDto
.
shopMemberName
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_ID
,
chatMessageDto
.
shopMemberId
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
MESSAGE
,
chatMessageDto
.
message
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
MESSAGE_TYPE
,
chatMessageDto
.
messageType
);
chatMessageMap
.
put
(
ABookCommConstants
.
KEY
.
INSERT_DATE
,
chatMessageDto
.
insertDate
);
...
...
@@ -83,6 +85,22 @@ public class CommunicationLogic extends AbstractLogic {
return
messageListStr
;
}
public
String
getNameCardInfo
(
Integer
shopMemberId
)
{
JSONObject
resultJson
=
new
JSONObject
();
ShopMemberDto
shopMemberDto
=
shopMemberDao
.
getShopMember
(
shopMemberId
);
List
<
String
>
groupPathList
=
groupDao
.
getUserGroupPathList
(
shopMemberId
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_ID
,
shopMemberDto
.
shopMemberId
);
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
);
}
return
resultJson
.
toString
();
}
public
String
getMyInfo
()
{
ShopMemberDto
myInfo
=
shopMemberDao
.
getMyInfo
();
...
...
@@ -214,12 +232,14 @@ public class CommunicationLogic extends AbstractLogic {
groupSearchData
.
put
(
ABookCommConstants
.
KEY
.
CHILD_GROUP_LIST
,
childGroupJSONArray
);
List
<
ShopMemberDto
>
shopMemberList
=
shopMemberDao
.
getUserListByGroupId
(
targetGroupId
);
JSONArray
shopMemberJSONArray
=
new
JSONArray
();
for
(
ShopMemberDto
shopMember
:
shopMemberList
)
{
Map
<
String
,
Object
>
shopMemberMap
=
new
HashMap
<
String
,
Object
>();
shopMemberMap
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_ID
,
shopMember
.
shopMemberId
);
shopMemberMap
.
put
(
ABookCommConstants
.
KEY
.
SHOP_MEMBER_NAME
,
shopMember
.
shopMemberName
);
shopMemberMap
.
put
(
ABookCommConstants
.
KEY
.
PROFILE_URL
,
shopMember
.
profileUrl
);
shopMemberMap
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupDao
.
getUserGroupPathList
(
shopMember
.
shopMemberId
));
JSONObject
jsonObject
=
new
JSONObject
(
shopMemberMap
);
shopMemberJSONArray
.
put
(
jsonObject
);
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
8e99a874
...
...
@@ -787,6 +787,12 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
String
groupInfoStr
=
communicationLogic
.
getGroupSearchData
(
Integer
.
parseInt
(
groupId
));
return
groupInfoStr
;
}
@JavascriptInterface
public
String
getNameCardData
(
String
shopMemberId
)
{
String
nameCardStr
=
communicationLogic
.
getNameCardInfo
(
Integer
.
parseInt
(
shopMemberId
));
return
nameCardStr
;
}
}
/**
...
...
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