Commit 1df4d559 by XiaHou

权星相关接口修复

parent 5a2dace9
...@@ -38,4 +38,6 @@ public class PmsProductAttributeCategoryController { ...@@ -38,4 +38,6 @@ public class PmsProductAttributeCategoryController {
public CommonResult<List<PmsProductAttributeCategory>> getAttributeCategoryListByName(@ApiParam("分类名称") @RequestParam("name")String name){ public CommonResult<List<PmsProductAttributeCategory>> getAttributeCategoryListByName(@ApiParam("分类名称") @RequestParam("name")String name){
return CommonResult.success(this.productAttributeCategoryService.getAtributeCategoryListByName(name)); return CommonResult.success(this.productAttributeCategoryService.getAtributeCategoryListByName(name));
} }
} }
...@@ -178,9 +178,9 @@ public class PmsProductAttributeCategoryServiceImpl implements PmsProductAttribu ...@@ -178,9 +178,9 @@ public class PmsProductAttributeCategoryServiceImpl implements PmsProductAttribu
if( ppac != null && ppac.getId() != null && ppac.getParentId() != null){//将查询的结果判断 父级Id是否为0 如果为0 则是1级分类 否则继续下查 if( ppac != null && ppac.getId() != null && ppac.getParentId() != null){//将查询的结果判断 父级Id是否为0 如果为0 则是1级分类 否则继续下查
list.add(ppac); list.add(ppac);
if(ppac.getParentId() != null && ppac.getParentId() != 0 ){ //如果父级id不为空 并且不为0 则根据父级id查询 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,ppac2);
}else{ }else{
return list; return list;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment