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
b2dd9ac7
Commit
b2dd9ac7
authored
Feb 22, 2021
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码结构调整
parent
c8fb17c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
ClerkServiceImpl.java
...ain/java/com/gic/store/service/impl/ClerkServiceImpl.java
+12
-4
No files found.
gic-store-service/src/main/java/com/gic/store/service/impl/ClerkServiceImpl.java
View file @
b2dd9ac7
...
...
@@ -9,6 +9,7 @@ import com.gic.store.entity.TabClerk;
import
com.gic.store.service.ClerkService
;
import
com.gic.store.service.StoreService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.dubbo.common.utils.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -101,8 +102,11 @@ public class ClerkServiceImpl implements ClerkService {
@Override
public
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoIdList
,
String
search
)
{
// list 如果太大, 让 mybatis 解析 会打满内存
String
storeInfoIds
=
storeInfoIdList
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
));
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
"("
+
storeInfoIds
+
")"
,
search
,
null
,
1
);
String
storeInfoIds
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdList
))
{
storeInfoIds
=
"("
+
storeInfoIdList
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
))
+
")"
;
}
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
storeInfoIds
,
search
,
null
,
1
);
}
@Override
...
...
@@ -112,8 +116,12 @@ public class ClerkServiceImpl implements ClerkService {
@Override
public
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoIdList
,
String
search
,
Integer
clerkType
)
{
String
storeInfoIds
=
storeInfoIdList
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
));
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
"("
+
storeInfoIds
+
")"
,
search
,
clerkType
,
null
);
// list 如果太大, 让 mybatis 解析 会打满内存
String
storeInfoIds
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdList
))
{
storeInfoIds
=
"("
+
storeInfoIdList
.
stream
().
map
(
Object:
:
toString
).
collect
(
Collectors
.
joining
(
","
))
+
")"
;
}
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
storeInfoIds
,
search
,
clerkType
,
null
);
}
@Override
...
...
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