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
323d5742
Commit
323d5742
authored
May 25, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店限制
parent
a4ab5db7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+6
-4
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
323d5742
...
...
@@ -254,10 +254,12 @@ public class StoreApiServiceImpl implements StoreApiService {
ServiceResponse
<
List
<
EnterpriseLicenseDTO
>>
listEnterpriseLicense
=
this
.
enterpriseApiService
.
listEnterpriseLicense
(
enterpriseId
);
if
(
listEnterpriseLicense
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
listEnterpriseLicense
.
getResult
()))
{
if
(
listEnterpriseLicense
.
getResult
().
size
()
==
4
)
{
Integer
currCount
=
this
.
storeService
.
countByOverflowStatus
(
enterpriseId
,
1
);
Integer
currCount
=
this
.
storeService
.
countByOverflowStatus
(
enterpriseId
,
0
);
Integer
upperLimit
=
listEnterpriseLicense
.
getResult
().
get
(
3
).
getUpperLimit
();
if
(
currCount
+
storeIds
.
split
(
","
).
length
>
upperLimit
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
UNKNOWN_ERROR
.
getCode
(),
String
.
format
(
"本商户剩余门店数量为%s家, 请重新勾选正确的数量!"
,
upperLimit
));
// 剩余数量
int
remainingCount
=
upperLimit
-
currCount
;
if
(
storeIds
.
split
(
","
).
length
>
remainingCount
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
UNKNOWN_ERROR
.
getCode
(),
String
.
format
(
"本商户剩余门店数量为%s家, 请重新勾选正确的数量!"
,
remainingCount
));
}
List
<
Integer
>
storeIdList
;
if
(
"all"
.
equals
(
storeIds
))
{
...
...
@@ -268,7 +270,7 @@ public class StoreApiServiceImpl implements StoreApiService {
for
(
Integer
storeId
:
storeIdList
)
{
StoreDTO
store
=
this
.
getStoreById
(
enterpriseId
,
storeId
).
getResult
();
if
(
store
!=
null
)
{
store
.
setOverflowStatus
(
1
);
store
.
setOverflowStatus
(
0
);
saveOrUpdate
(
store
);
}
}
...
...
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