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
4146f156
Commit
4146f156
authored
Apr 09, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/#487_ネームカードのグループパースが3件まで表示される。' into 'features/abcomm_sp6'
グループパース取得方法修正。 See merge request
!100
parents
6ac18d62
30a9c9da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
7 deletions
+28
-7
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatGroupDao.java
+11
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatGroupDto.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+13
-7
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ChatGroupDao.java
View file @
4146f156
...
...
@@ -49,6 +49,17 @@ public class ChatGroupDao extends AbstractDao {
return
rawQueryGetDtoList
(
sql
.
toString
(),
null
,
ChatGroupDto
.
class
);
}
public
List
<
ChatGroupDto
>
getUserGroups
(
Integer
shopMemberId
)
{
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT cg.group_id "
);
sql
.
append
(
" ,cg.parent_group_id "
);
sql
.
append
(
" ,cg.group_name "
);
sql
.
append
(
" ,cg.favorite_register_date "
);
sql
.
append
(
" FROM m_chat_group cg INNER JOIN r_shop_member_group rsmg ON cg.group_id = rsmg.group_id"
);
sql
.
append
(
" WHERE rsmg.shop_member_id = ?"
);
return
rawQueryGetDtoList
(
sql
.
toString
(),
new
String
[]
{
""
+
shopMemberId
},
ChatGroupDto
.
class
);
}
public
List
<
String
>
getMyGroupPathList
()
{
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" SELECT "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/ChatGroupDto.java
View file @
4146f156
...
...
@@ -39,4 +39,8 @@ public class ChatGroupDto extends AbstractDto {
public
String
[]
getKeyValues
()
{
return
new
String
[]{
""
+
groupId
};
}
public
String
getGroupName
()
{
return
groupName
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
4146f156
...
...
@@ -8,6 +8,7 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
...
...
@@ -147,19 +148,24 @@ public class CommunicationLogic extends AbstractLogic {
public
String
getNameCardInfo
(
Integer
shopMemberId
)
{
JSONObject
resultJson
=
new
JSONObject
();
ShopMemberDto
shopMemberDto
=
shopMemberDao
.
getShopMember
(
shopMemberId
);
List
<
ChatGroupDto
>
groupPathList
=
chatGroupDao
.
getUserGroupPathList
(
shopMemberId
);
JSONArray
groupPathArray
=
new
JSONArray
();
for
(
ChatGroupDto
chatGroupDto
:
groupPathList
){
List
<
ChatGroupDto
>
userGroupList
=
chatGroupDao
.
getUserGroups
(
shopMemberId
);
JSONArray
groupPathJsonArray
=
new
JSONArray
();
for
(
ChatGroupDto
userGroup
:
userGroupList
)
{
List
<
ChatGroupDto
>
gorupPathList
=
chatGroupDao
.
getGroupTree
(
userGroup
.
groupId
);
List
<
String
>
groupPathString
=
new
ArrayList
<
String
>();
for
(
ChatGroupDto
group
:
gorupPathList
)
{
groupPathString
.
add
(
group
.
groupName
);
}
Map
<
String
,
Object
>
groupMap
=
new
HashMap
<
String
,
Object
>();
groupMap
.
put
(
ABookCommConstants
.
KEY
.
GROUP_ID
,
chatGroupDto
.
groupId
);
groupMap
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH
,
chatGroupDto
.
groupPath
);
groupMap
.
put
(
ABookCommConstants
.
KEY
.
GROUP_ID
,
userGroup
.
groupId
);
groupMap
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH
,
StringUtil
.
join
(
" / "
,
groupPathString
)
);
JSONObject
jsonObject
=
new
JSONObject
(
groupMap
);
groupPathArray
.
put
(
jsonObject
);
groupPath
Json
Array
.
put
(
jsonObject
);
}
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
,
groupPathArray
);
resultJson
.
put
(
ABookCommConstants
.
KEY
.
GROUP_PATH_LIST
,
groupPath
Json
Array
);
boolean
hasRegisteredDate
=
StringUtil
.
isNullOrEmpty
(
shopMemberDto
.
favoriteRegisterDate
)
==
false
;
resultJson
.
put
(
ABookCommConstants
.
KEY
.
IS_FAVORITE
,
hasRegisteredDate
);
...
...
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