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
441a1ab6
Commit
441a1ab6
authored
Aug 10, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
9153f78b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
ClerkSearchDTO.java
...e-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
+9
-0
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+7
-16
No files found.
gic-store-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
View file @
441a1ab6
...
...
@@ -16,6 +16,7 @@ public class ClerkSearchDTO implements Serializable {
private
String
searchJson
;
private
Integer
enterpriseId
;
private
String
storeIds
;
private
String
storeInfoIds
;
private
Integer
currentPage
=
1
;
private
Integer
pageSize
=
20
;
private
Integer
clerkType
;
...
...
@@ -121,4 +122,12 @@ public class ClerkSearchDTO implements Serializable {
public
void
setClerkType
(
Integer
clerkType
)
{
this
.
clerkType
=
clerkType
;
}
public
String
getStoreInfoIds
()
{
return
storeInfoIds
;
}
public
void
setStoreInfoIds
(
String
storeInfoIds
)
{
this
.
storeInfoIds
=
storeInfoIds
;
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
441a1ab6
...
...
@@ -306,7 +306,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdsBySearch
))
{
String
storeInfoIds
=
storeInfoIdsBySearch
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
" "
));
clerkSearchDTO
.
setStoreIds
(
storeInfoIds
);
clerkSearchDTO
.
setStoreI
nfoI
ds
(
storeInfoIds
);
}
}
...
...
@@ -360,25 +360,15 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return
ServiceResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
.
getCode
(),
ErrorCode
.
MISS_PARAMETER
.
getMsg
());
}
}
// 分组的id
List
<
TabStoreGroup
>
groupList
=
storeGroupService
.
listStoreGroupAndChildren
(
clerkSearchDTO
.
getStoreGroupId
());
List
<
Integer
>
groupIds
=
groupList
.
stream
().
map
(
TabStoreGroup:
:
getStoreGroupId
).
collect
(
Collectors
.
toList
());
// 查询条件对应的storeId
String
storeIdByClerkSearch
;
if
(
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getSearch
()))
{
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
storeIdByClerkSearch
=
""
;
}
else
{
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
null
);
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdsBySearch
))
{
String
storeInfoIds
=
storeInfoIdsBySearch
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
" "
));
clerkSearchDTO
.
setStoreInfoIds
(
storeInfoIds
);
}
}
else
{
storeIdByClerkSearch
=
""
;
}
clerkSearchDTO
.
setEnterpriseId
(
enterpriseId
);
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
());
...
...
@@ -425,6 +415,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
storeSearchDTO
.
setStoreGroupId
(
clerkSearchDTO
.
getStoreGroupId
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSearchJson
());
storeSearchDTO
.
setStoreIds
(
clerkSearchDTO
.
getStoreIds
());
storeSearchDTO
.
setStoreInfoIds
(
clerkSearchDTO
.
getStoreInfoIds
());
return
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
,
"storeId,storeName,storeCode,storeInfoId,ownType"
);
...
...
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