Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
4c27b8e9
Commit
4c27b8e9
authored
Jan 13, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:好办群发bug修改
parent
a13a9080
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
33 deletions
+52
-33
StaffClerkRelationDTO.java
.../com/gic/haoban/manage/api/dto/StaffClerkRelationDTO.java
+10
-0
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+11
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+1
-1
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+2
-2
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+18
-18
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-7
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+8
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffClerkRelationDTO.java
View file @
4c27b8e9
...
@@ -32,6 +32,8 @@ public class StaffClerkRelationDTO implements Serializable {
...
@@ -32,6 +32,8 @@ public class StaffClerkRelationDTO implements Serializable {
private
String
storeName
;
private
String
storeName
;
private
String
staffName
;
private
String
staffName
;
private
String
wxOpenUserId
;
public
String
getStaffClerkRelationId
()
{
public
String
getStaffClerkRelationId
()
{
return
staffClerkRelationId
;
return
staffClerkRelationId
;
}
}
...
@@ -135,4 +137,12 @@ public class StaffClerkRelationDTO implements Serializable {
...
@@ -135,4 +137,12 @@ public class StaffClerkRelationDTO implements Serializable {
public
void
setStaffName
(
String
staffName
)
{
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
this
.
staffName
=
staffName
;
}
}
public
String
getWxOpenUserId
()
{
return
wxOpenUserId
;
}
public
void
setWxOpenUserId
(
String
wxOpenUserId
)
{
this
.
wxOpenUserId
=
wxOpenUserId
;
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
4c27b8e9
...
@@ -77,6 +77,17 @@ public interface MemberUnionidRelatedApiService {
...
@@ -77,6 +77,17 @@ public interface MemberUnionidRelatedApiService {
Page
<
MemberUnionidRelatedDTO
>
pageMemberUnionByParams
(
List
<
String
>
userIdList
,
List
<
String
>
sendMemberIds
,
Page
<
MemberUnionidRelatedDTO
>
pageMemberUnionByParams
(
List
<
String
>
userIdList
,
List
<
String
>
sendMemberIds
,
String
enterpriseId
,
BasePageInfo
pageInfo
);
String
enterpriseId
,
BasePageInfo
pageInfo
);
/**
* 群发助手发送企业微信消息
*
* @param wxEnterpriseId
* @param userId
* @param extendUserList
* @param materialId
* @return {@link String }
* @author mozhu
* @date 2022-01-13 10:50:44
*/
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
String
sendMessage
(
String
wxEnterpriseId
,
String
userId
,
List
<
String
>
extendUserList
,
String
materialId
);
/**
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
4c27b8e9
...
@@ -56,7 +56,7 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -56,7 +56,7 @@ public interface TabHaobanStaffClerkRelationMapper {
void
delByStoreIdAndCode
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkCode"
)
String
clerkCode
);
void
delByStoreIdAndCode
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkCode"
)
String
clerkCode
);
List
<
TabHaobanStaffClerkRelation
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
4c27b8e9
...
@@ -234,10 +234,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -234,10 +234,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkList
)
{
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkList
)
{
if
(
clerkList
==
null
||
clerkList
.
isEmpty
(
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
Collections
.
EMPTY_LIST
;
return
Collections
.
EMPTY_LIST
;
}
}
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listByClerkIds
(
clerkList
)
);
return
mapper
.
listByClerkIds
(
clerkList
);
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
4c27b8e9
...
@@ -218,7 +218,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -218,7 +218,7 @@ public class StaffApiServiceImpl implements StaffApiService {
// 当前部门的所有员工id列表
// 当前部门的所有员工id列表
Set
<
String
>
staffIdSet
=
list
.
stream
().
map
(
TabHaobanStaffDepartmentRelated:
:
getStaffId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
staffIdSet
=
list
.
stream
().
map
(
TabHaobanStaffDepartmentRelated:
:
getStaffId
).
collect
(
Collectors
.
toSet
());
// 查询当前部门所有已关联导购的员工id列表
// 查询当前部门所有已关联导购的员工id列表
List
<
String
>
relationsStaffIdList
=
staffClerkRelationService
.
listRelationsStaffId
(
staffIdSet
);
List
<
String
>
relationsStaffIdList
=
staffClerkRelationService
.
listRelationsStaffId
(
staffIdSet
);
Set
<
String
>
relationStaffSet
=
new
HashSet
<>(
relationsStaffIdList
);
Set
<
String
>
relationStaffSet
=
new
HashSet
<>(
relationsStaffIdList
);
...
@@ -235,19 +235,19 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -235,19 +235,19 @@ public class StaffApiServiceImpl implements StaffApiService {
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
Page
<
StaffDTO
>
page
=
PageUtil
.
changePageHelperToCurrentPage
(
staffService
.
pageStaff
(
queryStaffSet
,
activeFlag
,
""
),
StaffDTO
.
class
);
Page
<
StaffDTO
>
page
=
PageUtil
.
changePageHelperToCurrentPage
(
staffService
.
pageStaff
(
queryStaffSet
,
activeFlag
,
""
),
StaffDTO
.
class
);
if
(
CollectionUtils
.
isEmpty
(
page
.
getResult
()))
{
if
(
CollectionUtils
.
isEmpty
(
page
.
getResult
()))
{
return
new
Page
<>();
return
new
Page
<>();
}
}
Map
<
String
,
TabHaobanStaffDepartmentRelated
>
map
=
list
.
stream
()
Map
<
String
,
TabHaobanStaffDepartmentRelated
>
map
=
list
.
stream
()
.
collect
(
Collectors
.
toMap
(
TabHaobanStaffDepartmentRelated:
:
getStaffId
,
Function
.
identity
(),
(
s1
,
s2
)
->
s2
));
.
collect
(
Collectors
.
toMap
(
TabHaobanStaffDepartmentRelated:
:
getStaffId
,
Function
.
identity
(),
(
s1
,
s2
)
->
s2
));
page
.
getResult
().
forEach
(
one
->
{
page
.
getResult
().
forEach
(
one
->
{
TabHaobanStaffDepartmentRelated
related
=
map
.
get
(
one
.
getStaffId
());
TabHaobanStaffDepartmentRelated
related
=
map
.
get
(
one
.
getStaffId
());
one
.
setDepartmentIds
(
Objects
.
isNull
(
related
)
?
null
:
related
.
getDepartmentId
());
one
.
setDepartmentIds
(
Objects
.
isNull
(
related
)
?
null
:
related
.
getDepartmentId
());
// 关联状态
// 关联状态
one
.
setRelationFlag
(
relationStaffSet
.
contains
(
one
.
getStaffId
())
?
1
:
0
);
one
.
setRelationFlag
(
relationStaffSet
.
contains
(
one
.
getStaffId
())
?
1
:
0
);
});
});
return
page
;
return
page
;
}
}
...
@@ -1399,23 +1399,23 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -1399,23 +1399,23 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
@Override
public
List
<
String
>
listBindClerkUserId
(
String
storeId
)
{
public
List
<
String
>
listBindClerkUserId
(
String
storeId
)
{
// TabHaobanDepartment department = departmentService.selectByRelatedId(storeId);
// if(department == null){
// return Collections.EMPTY_LIST;
// }
// List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedService.listByDepartmentId(department.getDepartmentId());
// List<String> userIdList = list.stream().filter(s->StringUtils.isNotBlank(s.getClerkCode())).map(s->s.getWxUserId()).collect(Collectors.toList());
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
storeIds
=
new
ArrayList
<
String
>();
List
<
String
>
storeIds
=
new
ArrayList
<
String
>();
storeIds
.
add
(
storeId
);
storeIds
.
add
(
storeId
);
List
<
String
>
clerkList
=
clerkService
.
getclerkListByStoreIds
(
storeIds
);
List
<
String
>
clerkList
=
clerkService
.
getclerkListByStoreIds
(
storeIds
);
List
<
StaffClerkRelationDTO
>
staffRelationList
=
staffClerkRelationService
.
listByClerkIds
(
clerkList
);
List
<
StaffClerkRelationDTO
>
staffRelationList
=
staffClerkRelationService
.
listByClerkIds
(
clerkList
);
Map
<
String
,
StaffClerkRelationDTO
>
clerkIdMap
=
staffRelationList
.
stream
().
filter
(
s
->
s
.
getClerkId
()
!=
null
).
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
s
->
s
));
Map
<
String
,
StaffClerkRelationDTO
>
clerkIdMap
=
staffRelationList
.
stream
().
filter
(
s
->
s
.
getClerkId
()
!=
null
).
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
s
->
s
));
Set
<
String
>
keySet
=
clerkIdMap
.
keySet
();
Set
<
String
>
keySet
=
clerkIdMap
.
keySet
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
staffRelationList
.
get
(
0
).
getWxEnterpriseId
());
String
corpid
=
wxEnterpriseDTO
.
getCorpid
();
for
(
String
clerkId
:
clerkList
)
{
for
(
String
clerkId
:
clerkList
)
{
if
(
keySet
.
contains
(
clerkId
))
{
if
(
keySet
.
contains
(
clerkId
))
{
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxUserId
());
if
(
corpid
.
length
()
>
20
)
{
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxOpenUserId
());
}
else
{
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxUserId
());
}
}
}
}
}
return
userIdList
;
return
userIdList
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
4c27b8e9
...
@@ -234,15 +234,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -234,15 +234,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
)
{
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkIds
)
{
if
(
clerkIds
==
null
||
clerkIds
.
isEmpty
(
))
{
if
(
CollectionUtil
.
isEmpty
(
clerkIds
))
{
return
Collections
.
EMPTY_LIST
;
return
Collections
.
EMPTY_LIST
;
}
}
List
<
TabHaobanStaffClerkRelation
>
list
=
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
);
return
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIds
);
if
(
CollectionUtil
.
isEmpty
(
list
))
{
return
new
ArrayList
<
StaffClerkRelationDTO
>();
}
List
<
StaffClerkRelationDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
return
result
;
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
4c27b8e9
...
@@ -156,15 +156,18 @@
...
@@ -156,15 +156,18 @@
and status_flag = 1
and status_flag = 1
</update>
</update>
<select
id=
"listByClerkIds"
result
Map=
"BaseResultMap
"
parameterType=
"java.lang.String"
>
<select
id=
"listByClerkIds"
result
Type=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
"
parameterType=
"java.lang.String"
>
select
select
<include
refid=
"Base_Column_List"
/>
a.*,
from tab_haoban_staff_clerk_relation
b.wx_open_user_id
where status_flag=1
from tab_haoban_staff_clerk_relation a
and clerk_id in
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
group by b.staff_id
</select>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
...
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