Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
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
Plain Diff
Browse Files
Authored by
TANLING
5 years ago
Commit
c7f6a6e509286dccaced79e99722e0cb6fe7f690
2 parents
cd5d1ca5
e3720af9
Merge branch 'test6.9.22' of
http://git.yoho.cn/ufo/yohoufo-fore
into test6.9.22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
product/src/main/java/com/yohoufo/product/controller/ProductController.java
product/src/main/java/com/yohoufo/product/service/impl/ProductServiceImpl.java
product/src/main/java/com/yohoufo/product/controller/ProductController.java
View file @
c7f6a6e
...
...
@@ -1019,7 +1019,7 @@ public class ProductController {
@IgnoreSession
@Cachable
(
expire
=
300
)
public
ApiResponse
getSizeImage
(
@RequestParam
(
value
=
"product_id"
)
Integer
productId
,
@RequestParam
(
value
=
"brand_id"
)
Integer
brandId
)
{
@RequestParam
(
value
=
"brand_id"
,
required
=
false
)
Integer
brandId
)
{
LOG
.
info
(
"in method=ufo.product.sizeImage product_id is {}, brandId is {}"
,
productId
,
brandId
);
SizeImageResp
result
=
productService
.
getSizeImage
(
productId
,
brandId
);
return
new
ApiResponse
.
ApiResponseBuilder
().
code
(
200
).
data
(
result
).
message
(
"getSizeImage success"
).
build
();
...
...
product/src/main/java/com/yohoufo/product/service/impl/ProductServiceImpl.java
View file @
c7f6a6e
...
...
@@ -1984,7 +1984,11 @@ public class ProductServiceImpl implements ProductService {
SizeImageResp
resp
=
new
SizeImageResp
();
List
<
SizePoolDetail
>
list
=
sizePoolDetailMapper
.
queryByProductId
(
productId
,
1
,
null
);
//包括
if
(
CollectionUtils
.
isEmpty
(
list
))
{
list
=
sizePoolDetailMapper
.
queryByBrandId
(
brandId
);
if
(
null
==
brandId
)
{
Product
product
=
productHelpService
.
selectByIdCache
(
productId
);
brandId
=
null
==
product
?
null
:
product
.
getBrandId
();
}
list
=
sizePoolDetailMapper
.
queryByBrandId
(
brandId
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
List
<
SizePoolDetail
>
notIncludeList
=
sizePoolDetailMapper
.
queryByProductId
(
productId
,
0
,
list
.
get
(
0
).
getSizePoolId
());
//不包括
if
(!
CollectionUtils
.
isEmpty
(
notIncludeList
))
{
...
...
Please
register
or
login
to post a comment