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
9cbe1780
Commit
9cbe1780
authored
Apr 17, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店分组绑定校验
parent
3891599d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
+54
-0
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+9
-0
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+10
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+20
-0
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+15
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
9cbe1780
...
...
@@ -100,6 +100,15 @@ public interface TabHaobanStaffClerkRelationMapper {
List
<
TabHaobanStaffClerkRelation
>
listBindByStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
/**
* 授权绑定的列表
*
* @param wxEnterpriseId
* @param storeIds
* @return
*/
List
<
TabHaobanStaffClerkRelation
>
listBindNotInStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
/**
* 删除绑定根据门店
*
* @param storeIds
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
9cbe1780
...
...
@@ -35,6 +35,16 @@ public interface StaffClerkRelationService {
public
boolean
delBindByStoreIds
(
String
wxEnterpriseId
,
Set
<
String
>
storeIds
,
String
optStaffId
,
int
chanelCode
);
/**
* 删除绑定
*
* @param wxEnterpriseId 可以不传
* @param enterpriseId
* @param storeIds 解除除了这些门店之外的绑定的门店
* @return
*/
public
boolean
delBindNotInStoreIds
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
storeIds
,
String
optStaffId
,
int
chanelCode
);
/**
* 绑定
* @param dto
* @return
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
9cbe1780
...
...
@@ -113,6 +113,26 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
return
true
;
}
@Override
public
boolean
delBindNotInStoreIds
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
storeIds
,
String
optStaffId
,
int
chanelCode
)
{
if
(
CollectionUtils
.
isEmpty
(
storeIds
))
{
logger
.
info
(
"没有传门店列表:{}"
,
wxEnterpriseId
);
return
true
;
}
List
<
TabHaobanStaffClerkRelation
>
needUnbind
=
mapper
.
listBindNotInStoreIds
(
wxEnterpriseId
,
enterpriseId
,
storeIds
);
if
(
CollectionUtils
.
isEmpty
(
needUnbind
))
{
logger
.
info
(
"没有门店绑定了需要解绑的:{}"
,
wxEnterpriseId
);
}
Set
<
String
>
needDelStoreIds
=
needUnbind
.
stream
().
map
(
tab
->
tab
.
getStoreId
()).
collect
(
Collectors
.
toSet
());
//清除绑定
mapper
.
delByStoreIds
(
needDelStoreIds
);
List
<
String
>
need
=
needUnbind
.
stream
().
map
(
tab
->
tab
.
getStaffClerkRelationId
()).
collect
(
Collectors
.
toList
());
//放入队列
staffClerkBindLogService
.
pushToMqBatch
(
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
need
);
return
true
;
}
private
void
delSetMainStore
(
TabHaobanStaffClerkRelation
staffClerkRelation
)
{
if
(
staffClerkRelation
==
null
)
{
logger
.
info
(
"staffClerkRelation为空"
);
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
9cbe1780
...
...
@@ -397,6 +397,21 @@
</if>
and status_flag =1
</select>
<select
id=
"listBindNotInStoreIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where store_id NOT in
<foreach
collection=
"storeIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and enterprise_id=#{enterpriseId}
and status_flag =1
</select>
<update
id=
"delByStoreIds"
>
UPDATE
tab_haoban_staff_clerk_relation
...
...
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