Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
ufo-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mali
6 years ago
Commit
37606ce51951a91d4786b17f6fd7e6856e40270f
1 parent
6313f86d
二手库存优化
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
dal/src/main/java/com/yoho/product/dal/SecondhandFlawMapper.java
dal/src/main/resources/META-INF/mybatis/SecondhandFlawMapper.xml
product/src/main/java/com/yoho/ufo/service/impl/SecondhandProductService.java
dal/src/main/java/com/yoho/product/dal/SecondhandFlawMapper.java
View file @
37606ce
...
...
@@ -11,4 +11,6 @@ public interface SecondhandFlawMapper {
List
<
SecondhandFlaw
>
selectByIds
(
@Param
(
"ids"
)
String
ids
);
List
<
SecondhandFlaw
>
selectBatchByIds
(
@Param
(
"idList"
)
List
<
Integer
>
idList
);
List
<
SecondhandFlaw
>
selectAllFlaw
();
}
\ No newline at end of file
...
...
dal/src/main/resources/META-INF/mybatis/SecondhandFlawMapper.xml
View file @
37606ce
...
...
@@ -32,4 +32,9 @@
</select>
<select
id=
"selectAllFlaw"
resultMap=
"BaseResultMap"
>
select id, type, name, attr, order_by
from secondhand_flaw limit 1000
</select>
</mapper>
\ No newline at end of file
...
...
product/src/main/java/com/yoho/ufo/service/impl/SecondhandProductService.java
View file @
37606ce
...
...
@@ -142,8 +142,8 @@ public class SecondhandProductService implements ISecondhandProductService{
Map
<
Integer
,
Product
>
productMap
=
productList
.
stream
().
collect
(
Collectors
.
toMap
(
Product:
:
getId
,
Function
.
identity
()));
//查询secondhand_flaw
List
<
String
>
flawIdStrList
=
infoList
.
stream
().
map
(
SecondhandInfo:
:
getFlawId
).
collect
(
Collectors
.
toList
());
List
<
SecondhandFlaw
>
flawList
=
secondhandFlawMapper
.
selectBatchByIds
(
getFlawIdList
(
flawIdStrList
));
//List<String> flawIdStrList = infoList.stream().map(SecondhandInfo::getFlawId).collect(Collectors.toList());
List
<
SecondhandFlaw
>
flawList
=
secondhandFlawMapper
.
selectAllFlaw
();
Map
<
Integer
,
String
>
flawMap
=
flawList
.
stream
().
collect
(
Collectors
.
toMap
(
SecondhandFlaw:
:
getId
,
SecondhandFlaw:
:
getName
));
//查询goods_images
...
...
Please
register
or
login
to post a comment