Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
90c5135a
Commit
90c5135a
authored
Sep 25, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购bug
parent
f5a989c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+14
-7
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
90c5135a
...
...
@@ -108,15 +108,22 @@ public class ClerkApiServiceImpl implements ClerkApiService {
// 如果门店下没有导购是店长,将当前导购设置成店长
// 这里并发会出错 加个锁
TabClerk
clerkLeader
=
clerkService
.
getClerkLeaderByStoreInfoId
(
clerkDTO
.
getEnterpriseId
(),
clerkDTO
.
getStoreInfoId
());
if
(
clerkLeader
!=
null
&&
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
.
equals
(
clerkDTO
.
getPositionId
()))
{
clerkLeader
.
setPositionId
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_POSITION_ID
);
clerkLeader
.
setPositionName
(
"导购"
);
clerkService
.
update
(
clerkLeader
);
clerkDTO
.
setPositionId
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
);
}
else
if
(
clerkLeader
==
null
||
clerkLeader
.
getClerkId
().
equals
(
clerkDTO
.
getClerkId
()))
{
if
(
clerkLeader
!=
null
)
{
// 已经有了店长
if
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
.
equals
(
clerkDTO
.
getPositionId
()))
{
// 要把当前的导购改成店长
clerkLeader
.
setPositionId
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_POSITION_ID
);
clerkLeader
.
setPositionName
(
"导购"
);
clerkService
.
update
(
clerkLeader
);
clerkDTO
.
setPositionId
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
);
}
else
if
(
clerkLeader
.
getClerkId
().
equals
(
clerkDTO
.
getClerkId
())
&&
!
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
.
equals
(
clerkDTO
.
getPositionId
()))
{
// 当前导购就是店长 要改成不是店长 不能改
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"门店下必须有一个店长"
);
}
}
else
if
(
clerkLeader
==
null
)
{
clerkDTO
.
setPositionId
(
com
.
gic
.
store
.
constant
.
Constants
.
CLERK_LEADER_POSITION_ID
);
}
if
(
StringUtils
.
isNotBlank
(
clerkDTO
.
getPhoneNumber
()))
{
String
nationcode
=
clerkDTO
.
getNationcode
();
if
(
StringUtils
.
isBlank
(
nationcode
))
{
...
...
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