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
1
Merge Requests
1
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
bf44e19e
Commit
bf44e19e
authored
Sep 20, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
如果新门店未关联好办,进行解绑
parent
ceeda59a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
StoreRangeService.java
.../gic/haoban/manage/service/service/StoreRangeService.java
+2
-0
StoreRangeServiceImpl.java
...an/manage/service/service/impl/StoreRangeServiceImpl.java
+24
-0
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+8
-6
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StoreRangeService.java
View file @
bf44e19e
...
...
@@ -113,4 +113,6 @@ public interface StoreRangeService {
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
;
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StoreRangeServiceImpl.java
View file @
bf44e19e
...
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
...
...
@@ -45,6 +47,8 @@ public class StoreRangeServiceImpl implements StoreRangeService {
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
@Autowired
private
StoreGroupService
storeGroupService
;
@Override
...
...
@@ -267,4 +271,24 @@ public class StoreRangeServiceImpl implements StoreRangeService {
public
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
{
return
tabHaobanStoreRelationMapper
.
listStoreIdByName
(
wxEnterpriseId
,
enterpriseId
,
storeName
);
}
@Override
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
{
List
<
String
>
storeGroupIds
=
this
.
listStoreGroupIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeGroupIds
))
{
logger
.
info
(
"好办门店分组id为空"
);
return
false
;
}
String
[]
array
=
storeGroupIds
.
toArray
(
new
String
[
0
]);
List
<
StoreGroupDTO
>
storeGroupDTOS
=
storeGroupService
.
listStoreGroup
(
array
,
enterpriseId
);
List
<
String
>
parentGroupIds
=
storeGroupDTOS
.
stream
().
map
(
StoreGroupDTO:
:
getParentGroupId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
parentGroupIds
)
&&
parentGroupIds
.
contains
(
"0"
))
{
logger
.
info
(
"企微包含所有门店"
,
wxEnterpriseId
);
return
true
;
}
if
(
isFlagByStoreId
(
storeId
,
wxEnterpriseId
,
enterpriseId
))
{
return
true
;
}
return
false
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
bf44e19e
...
...
@@ -75,7 +75,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Autowired
private
HmQrcodeService
hmQrcodeService
;
@Autowired
private
Config
config
;
private
StoreRangeService
storeRangeService
;
@Override
public
void
bindLogMq
(
String
params
)
{
...
...
@@ -513,11 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger
.
info
(
"导购未关联成员,oldClerkId={}"
,
oldClerkId
);
return
;
}
/* StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getByClerkId(oldClerkId);
if (null == oldRelationDTO) {
logger.info("导购未关联成员,clerkCode={}", clerkCode);
return;
}*/
// 如果新门店未关联好办,进行解绑
boolean
hasFlag
=
this
.
storeRangeService
.
hasStore
(
oldRelationDTO
.
getWxEnterpriseId
(),
enterpriseId
,
clerkDTO
.
getStoreId
())
;
if
(!
hasFlag
)
{
logger
.
info
(
"新门店未关联好办,storeId={}"
,
clerkDTO
.
getStoreId
());
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
,
null
);
return
;
}
logger
.
info
(
"导购门店转移,老的绑定导购id={}"
,
oldRelationDTO
.
getClerkId
());
this
.
moveOrAddClerk
(
clerkSyncQDTO
,
oldRelationDTO
);
}
else
if
(
type
==
3
)
{
...
...
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