Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
b7493531
Commit
b7493531
authored
Apr 01, 2018
by
Junling Bu
Browse files
update[litemall-wx-api]:查询商品时返回商品所属类目
parent
09221552
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java
View file @
b7493531
...
...
@@ -186,8 +186,19 @@ public class WxGoodsController {
List
<
LitemallGoods
>
goodsList
=
goodsService
.
querySelective
(
categoryId
,
brandId
,
keyword
,
isHot
,
isNew
,
page
,
size
,
sortWithOrder
);
int
total
=
goodsService
.
countSelective
(
categoryId
,
brandId
,
keyword
,
isHot
,
isNew
,
page
,
size
,
sortWithOrder
);
List
<
Integer
>
cats
=
new
ArrayList
<
Integer
>();
for
(
LitemallGoods
goods
:
goodsList
){
cats
.
add
(
goods
.
getCategoryId
());
}
List
<
LitemallCategory
>
categoryList
=
null
;
if
(
cats
.
size
()
!=
0
)
{
categoryList
=
categoryService
.
queryL2ByIds
(
cats
);
}
Map
<
String
,
Object
>
data
=
new
HashMap
();
data
.
put
(
"goodsList"
,
goodsList
);
data
.
put
(
"filterCategory"
,
categoryList
);
data
.
put
(
"count"
,
total
);
return
ResponseUtil
.
ok
(
data
);
}
...
...
Write
Preview
Supports
Markdown
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