Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
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
赵啸非
enterprise-platform
Commits
69714e81
Commit
69714e81
authored
Dec 11, 2024
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改h5产品列表接口
parent
61762e91
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
...in/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
+4
-0
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/ProductApiController.java
...m/mortals/xhx/busiz/applets/web/ProductApiController.java
+2
-1
No files found.
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/req/ProductReq.java
View file @
69714e81
...
@@ -18,5 +18,9 @@ public class ProductReq extends BaseReq {
...
@@ -18,5 +18,9 @@ public class ProductReq extends BaseReq {
* 分类id
* 分类id
*/
*/
private
Long
categoryId
;
private
Long
categoryId
;
/**
* 是否热门(0.否,1.是)
*/
private
Integer
hot
;
}
}
enterprise-manager/src/main/java/com/mortals/xhx/busiz/applets/web/ProductApiController.java
View file @
69714e81
...
@@ -84,12 +84,13 @@ public class ProductApiController extends AbstractBaseController<ProductReq>{
...
@@ -84,12 +84,13 @@ public class ProductApiController extends AbstractBaseController<ProductReq>{
if
(!
ObjectUtils
.
isEmpty
(
productReq
.
getCategoryId
())){
if
(!
ObjectUtils
.
isEmpty
(
productReq
.
getCategoryId
())){
query
.
setCategoryId
(
String
.
valueOf
(
productReq
.
getCategoryId
()));
query
.
setCategoryId
(
String
.
valueOf
(
productReq
.
getCategoryId
()));
}
}
query
.
setHot
(
productReq
.
getHot
());
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"createTime"
,
OrderCol
.
DESCENDING
)));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"createTime"
,
OrderCol
.
DESCENDING
)));
Result
<
ProductEntity
>
result
=
productService
.
find
(
query
,
pageInfo
,
context
);
Result
<
ProductEntity
>
result
=
productService
.
find
(
query
,
pageInfo
,
context
);
List
<
ProductEntity
>
collect
=
result
.
getList
().
stream
().
map
(
item
->
{
List
<
ProductEntity
>
collect
=
result
.
getList
().
stream
().
map
(
item
->
{
ProductEntity
productEntity
=
new
ProductEntity
();
ProductEntity
productEntity
=
new
ProductEntity
();
BeanUtils
.
copyProperties
(
item
,
productEntity
,
BeanUtil
.
getNullPropertyNames
(
item
));
BeanUtils
.
copyProperties
(
item
,
productEntity
,
BeanUtil
.
getNullPropertyNames
(
item
));
productEntity
.
setProductDetail
(
null
);
return
productEntity
;
return
productEntity
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
model
.
put
(
KEY_RESULT_DATA
,
collect
);
...
...
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