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
f83957f5
Commit
f83957f5
authored
Apr 30, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
8a15369a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
12 deletions
+17
-12
ClerkSearchDTO.java
...e-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
+5
-5
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+12
-7
No files found.
gic-store-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
View file @
f83957f5
...
...
@@ -13,7 +13,7 @@ public class ClerkSearchDTO implements Serializable {
private
static
final
long
serialVersionUID
=
7888454039825986790L
;
private
String
search
;
private
Integer
storeGroupId
;
private
String
se
lect
Json
;
private
String
se
arch
Json
;
private
Integer
enterpriseId
;
private
String
storeIds
;
private
Integer
currentPage
=
1
;
...
...
@@ -41,12 +41,12 @@ public class ClerkSearchDTO implements Serializable {
this
.
storeGroupId
=
storeGroupId
;
}
public
String
getSe
lect
Json
()
{
return
se
lect
Json
;
public
String
getSe
arch
Json
()
{
return
se
arch
Json
;
}
public
void
setSe
lectJson
(
String
select
Json
)
{
this
.
se
lectJson
=
select
Json
;
public
void
setSe
archJson
(
String
search
Json
)
{
this
.
se
archJson
=
search
Json
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
f83957f5
...
...
@@ -237,8 +237,12 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@Override
public
ServiceResponse
<
Integer
>
getTotalClerk
(
Integer
enterpriseId
,
ClerkSearchDTO
clerkSearchDTO
)
{
if
(
clerkSearchDTO
.
getStoreGroupId
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
.
getCode
(),
ErrorCode
.
MISS_PARAMETER
.
getMsg
());
boolean
hasStoreIds
=
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getStoreIds
());
//如果有门店数据条件,则不判断门店分组数据,因为分店分组数据也是为了获取门店
if
(!
hasStoreIds
)
{
if
(
clerkSearchDTO
.
getStoreGroupId
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
.
getCode
(),
ErrorCode
.
MISS_PARAMETER
.
getMsg
());
}
}
// 分组的id
List
<
TabStoreGroup
>
groupList
=
storeGroupService
.
listStoreGroupAndChildren
(
clerkSearchDTO
.
getStoreGroupId
());
...
...
@@ -246,18 +250,19 @@ public class ClerkApiServiceImpl implements ClerkApiService {
// 查询条件对应的storeId
String
storeIdByClerkSearch
;
if
(
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getSearch
()))
{
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
storeIdByClerkSearch
=
""
;
}
else
{
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
clerkSearchDTO
.
getSearch
()
);
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
null
);
}
}
else
{
storeIdByClerkSearch
=
""
;
}
clerkSearchDTO
.
setEnterpriseId
(
enterpriseId
);
clerkSearchDTO
.
setStoreIds
(
storeIdByClerkSearch
);
if
(!
hasStoreIds
)
{
clerkSearchDTO
.
setStoreIds
(
storeIdByClerkSearch
);
}
ServiceResponse
<
Page
<
StoreDTO
>>
serviceResponse
=
listStoreIds
(
clerkSearchDTO
,
1
,
Integer
.
MAX_VALUE
);
if
(!
serviceResponse
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -292,7 +297,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
clerkSearchDTO
.
getEnterpriseId
());
storeSearchDTO
.
setStoreGroupId
(
clerkSearchDTO
.
getStoreGroupId
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSe
lect
Json
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSe
arch
Json
());
storeSearchDTO
.
setStoreIds
(
clerkSearchDTO
.
getStoreIds
());
return
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
,
...
...
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