Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
590cade7
Commit
590cade7
authored
Nov 20, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页商品查询
parent
7cf2f683
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+2
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+1
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
590cade7
...
@@ -94,7 +94,8 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
...
@@ -94,7 +94,8 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
if
(
StringUtils
.
hasLength
(
dto
.
getName
()))
{
if
(
StringUtils
.
hasLength
(
dto
.
getName
()))
{
criteria
.
andNameLike
(
"%"
+
dto
.
getName
()
+
"%"
);
criteria
.
andNameLike
(
"%"
+
dto
.
getName
()
+
"%"
);
}
}
JdbcHelper
.
ifPresent
(
dto
.
getType
(),
criteria:
:
andTypeEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getTypeList
(),
criteria:
:
andTypeIn
);
// JdbcHelper.ifPresent(dto.getType(), criteria::andTypeEqualTo);
JdbcHelper
.
ifPresent
(
dto
.
getFilterType
(),
criteria:
:
andTypeNotIn
);
JdbcHelper
.
ifPresent
(
dto
.
getFilterType
(),
criteria:
:
andTypeNotIn
);
JdbcHelper
.
ifPresent
(
dto
.
getStock
(),
criteria:
:
andStockGreaterThan
);
JdbcHelper
.
ifPresent
(
dto
.
getStock
(),
criteria:
:
andStockGreaterThan
);
JdbcHelper
.
ifPresent
(
dto
.
getIsOnSale
(),
criteria:
:
andIsOnSaleEqualTo
);
JdbcHelper
.
ifPresent
(
dto
.
getIsOnSale
(),
criteria:
:
andIsOnSaleEqualTo
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
590cade7
...
@@ -237,6 +237,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
...
@@ -237,6 +237,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
}
}
//只需要从剩下的符合条件的数据中查询出20条随机数据,无需按照前端页码获取数据
//只需要从剩下的符合条件的数据中查询出20条随机数据,无需按照前端页码获取数据
dto
.
setPage
(
1
);
dto
.
setPage
(
1
);
dto
.
setTypeList
(
Arrays
.
asList
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
(),
DistributionEnum
.
DistributionTypeEnum
.
EXCHANGE
.
getCode
()));
List
<
SupplierItem
>
supplierItemList
=
supplierItemDao
.
findListForRandomSort
(
dto
);
List
<
SupplierItem
>
supplierItemList
=
supplierItemDao
.
findListForRandomSort
(
dto
);
PageInfo
pageInfo
=
new
PageInfo
(
supplierItemList
);
PageInfo
pageInfo
=
new
PageInfo
(
supplierItemList
);
List
<
Long
>
filterItemIds
=
supplierItemList
.
stream
().
map
(
SupplierItem:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
filterItemIds
=
supplierItemList
.
stream
().
map
(
SupplierItem:
:
getId
).
collect
(
Collectors
.
toList
());
...
...
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