Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fileServe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
fileServe
Commits
1df4d559
Commit
1df4d559
authored
Jun 16, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权星相关接口修复
parent
5a2dace9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
PmsProductAttributeCategoryController.java
...oller/quanxing/PmsProductAttributeCategoryController.java
+2
-0
PmsProductAttributeCategoryServiceImpl.java
...quanxing/impl/PmsProductAttributeCategoryServiceImpl.java
+2
-2
No files found.
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsProductAttributeCategoryController.java
View file @
1df4d559
...
...
@@ -38,4 +38,6 @@ public class PmsProductAttributeCategoryController {
public
CommonResult
<
List
<
PmsProductAttributeCategory
>>
getAttributeCategoryListByName
(
@ApiParam
(
"分类名称"
)
@RequestParam
(
"name"
)
String
name
){
return
CommonResult
.
success
(
this
.
productAttributeCategoryService
.
getAtributeCategoryListByName
(
name
));
}
}
mall-service/src/main/java/com/macro/mall/service/quanxing/impl/PmsProductAttributeCategoryServiceImpl.java
View file @
1df4d559
...
...
@@ -178,9 +178,9 @@ public class PmsProductAttributeCategoryServiceImpl implements PmsProductAttribu
if
(
ppac
!=
null
&&
ppac
.
getId
()
!=
null
&&
ppac
.
getParentId
()
!=
null
){
//将查询的结果判断 父级Id是否为0 如果为0 则是1级分类 否则继续下查
list
.
add
(
ppac
);
if
(
ppac
.
getParentId
()
!=
null
&&
ppac
.
getParentId
()
!=
0
){
//如果父级id不为空 并且不为0 则根据父级id查询
this
.
productAttributeCategoryMapper
.
selectByPrimaryKey
(
ppac
.
getParentId
());
PmsProductAttributeCategory
ppac2
=
this
.
productAttributeCategoryMapper
.
selectByPrimaryKey
(
ppac
.
getParentId
());
//还要继续判断 如果还存在 递归调用
this
.
getRecursiongList
(
list
,
ppac
);
this
.
getRecursiongList
(
list
,
ppac
2
);
}
else
{
return
list
;
}
...
...
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