mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
refactor: 部门增删改查接口优化
This commit is contained in:
parent
a4c53439f6
commit
f0ba8d48c9
@ -1,15 +1,19 @@
|
|||||||
package com.youlai.admin.controller;
|
package com.youlai.admin.controller;
|
||||||
|
|
||||||
import com.youlai.admin.pojo.entity.SysDept;
|
import com.youlai.admin.pojo.form.DeptForm;
|
||||||
import com.youlai.admin.pojo.query.DeptQuery;
|
import com.youlai.admin.pojo.query.DeptQuery;
|
||||||
|
import com.youlai.admin.pojo.vo.dept.DeptDetailVO;
|
||||||
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
||||||
import com.youlai.admin.service.SysDeptService;
|
import com.youlai.admin.service.SysDeptService;
|
||||||
import com.youlai.common.result.Result;
|
import com.youlai.common.result.Result;
|
||||||
import com.youlai.common.web.domain.Option;
|
import com.youlai.common.web.domain.Option;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,44 +30,53 @@ public class SysDeptController {
|
|||||||
|
|
||||||
private final SysDeptService deptService;
|
private final SysDeptService deptService;
|
||||||
|
|
||||||
@ApiOperation(value = "部门列表")
|
@ApiOperation(value = "获取部门列表")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public Result<List<DeptVO>> listDepts(DeptQuery queryParams) {
|
public Result<List<DeptVO>> listDepts(DeptQuery queryParams) {
|
||||||
List<DeptVO> list = deptService.listDepts(queryParams);
|
List<DeptVO> list = deptService.listDepts(queryParams);
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "部门下拉列表")
|
@ApiOperation(value = "获取部门下拉选项")
|
||||||
@GetMapping("/select_list")
|
@GetMapping("/options")
|
||||||
public Result lisetDeptOptions() {
|
public Result<List<Option>> lisetDeptOptions() {
|
||||||
List<Option> list = deptService.lisetDeptOptions();
|
List<Option> list = deptService.lisetDeptOptions();
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "部门表单数据")
|
@ApiOperation(value = "获取部门详情")
|
||||||
@GetMapping("/{deptId}/form_data")
|
@GetMapping("/{deptId}")
|
||||||
public Result getDeptDetail(@ApiParam("部门ID") @PathVariable Long deptId) {
|
public Result<DeptDetailVO> getDeptDetail(
|
||||||
SysDept sysDept = deptService.getById(deptId);
|
@ApiParam("部门ID") @PathVariable Long deptId
|
||||||
return Result.success(sysDept);
|
) {
|
||||||
|
DeptDetailVO deptDetail = deptService.getDeptDetail(deptId);
|
||||||
|
return Result.success(deptDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增部门")
|
@ApiOperation(value = "新增部门")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result addDept(@RequestBody SysDept dept) {
|
public Result saveDept(
|
||||||
Long id = deptService.saveDept(dept);
|
@Valid @RequestBody DeptForm formData
|
||||||
|
) {
|
||||||
|
Long id = deptService.saveDept(formData);
|
||||||
return Result.success(id);
|
return Result.success(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改部门")
|
@ApiOperation(value = "修改部门")
|
||||||
@PutMapping(value = "/{deptId}")
|
@PutMapping(value = "/{deptId}")
|
||||||
public Result updateDept(@ApiParam("部门ID") @PathVariable Long deptId, @RequestBody SysDept dept) {
|
public Result updateDept(
|
||||||
deptId = deptService.saveDept(dept);
|
@PathVariable Long deptId,
|
||||||
|
@Valid @RequestBody DeptForm formData
|
||||||
|
) {
|
||||||
|
deptId = deptService.updateDept(deptId, formData);
|
||||||
return Result.success(deptId);
|
return Result.success(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "删除部门")
|
@ApiOperation(value = "删除部门")
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public Result deleteDepartments(@ApiParam("部门ID,多个以英文逗号(,)分割") @PathVariable("ids") String ids) {
|
public Result deleteDepartments(
|
||||||
|
@ApiParam("部门ID,多个以英文逗号(,)分割") @PathVariable("ids") String ids
|
||||||
|
) {
|
||||||
boolean result = deptService.deleteByIds(ids);
|
boolean result = deptService.deleteByIds(ids);
|
||||||
return Result.judge(result);
|
return Result.judge(result);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.youlai.admin.converter;
|
||||||
|
|
||||||
|
import com.youlai.admin.pojo.entity.SysDept;
|
||||||
|
import com.youlai.admin.pojo.form.DeptForm;
|
||||||
|
import com.youlai.admin.pojo.vo.dept.DeptDetailVO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门对象转换器
|
||||||
|
*
|
||||||
|
* @author haoxr
|
||||||
|
* @date 2022/7/29
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface DeptConverter {
|
||||||
|
|
||||||
|
DeptDetailVO entity2DetailVO(SysDept entity);
|
||||||
|
|
||||||
|
SysDept form2Entity(DeptForm deptForm);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.youlai.admin.pojo.form;
|
||||||
|
|
||||||
|
import com.youlai.common.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel("部门表单对象")
|
||||||
|
@Data
|
||||||
|
public class DeptForm extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("部门名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("父部门ID")
|
||||||
|
@NotNull(message = "父部门ID不能为空")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.youlai.admin.pojo.vo.dept;
|
||||||
|
|
||||||
|
import com.youlai.common.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ApiModel("部门详情对象")
|
||||||
|
@Data
|
||||||
|
public class DeptDetailVO extends BaseEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("部门ID(编辑必填)")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("部门名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty("父部门ID")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
}
|
@ -2,17 +2,19 @@ package com.youlai.admin.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.youlai.admin.pojo.entity.SysDept;
|
import com.youlai.admin.pojo.entity.SysDept;
|
||||||
|
import com.youlai.admin.pojo.form.DeptForm;
|
||||||
import com.youlai.admin.pojo.query.DeptQuery;
|
import com.youlai.admin.pojo.query.DeptQuery;
|
||||||
|
import com.youlai.admin.pojo.vo.dept.DeptDetailVO;
|
||||||
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
||||||
import com.youlai.common.web.domain.Option;
|
import com.youlai.common.web.domain.Option;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单路由业务接口
|
* 部门业务接口
|
||||||
*
|
*
|
||||||
* @author haoxr
|
* @author haoxr
|
||||||
* @date 2021-08-22
|
* @date 2021/8/22
|
||||||
*/
|
*/
|
||||||
public interface SysDeptService extends IService<SysDept> {
|
public interface SysDeptService extends IService<SysDept> {
|
||||||
/**
|
/**
|
||||||
@ -23,19 +25,28 @@ public interface SysDeptService extends IService<SysDept> {
|
|||||||
List<DeptVO> listDepts(DeptQuery queryParams);
|
List<DeptVO> listDepts(DeptQuery queryParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门树形下拉(TreeSelect)层级列表
|
* 部门树形下拉选项
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Option> lisetDeptOptions();
|
List<Option> lisetDeptOptions();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增/修改部门
|
* 新增部门
|
||||||
*
|
*
|
||||||
* @param dept
|
* @param formData
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long saveDept(SysDept dept);
|
Long saveDept(DeptForm formData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改部门
|
||||||
|
*
|
||||||
|
* @param deptId
|
||||||
|
* @param formData
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long updateDept(Long deptId, DeptForm formData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除部门
|
* 删除部门
|
||||||
@ -44,4 +55,12 @@ public interface SysDeptService extends IService<SysDept> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean deleteByIds(String ids);
|
boolean deleteByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取部门详情
|
||||||
|
*
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
DeptDetailVO getDeptDetail(Long deptId);
|
||||||
}
|
}
|
||||||
|
@ -7,20 +7,22 @@ import cn.hutool.core.lang.Validator;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.youlai.common.constant.SystemConstants;
|
import com.youlai.admin.converter.DeptConverter;
|
||||||
import com.youlai.admin.mapper.SysDeptMapper;
|
import com.youlai.admin.mapper.SysDeptMapper;
|
||||||
import com.youlai.admin.pojo.entity.SysDept;
|
import com.youlai.admin.pojo.entity.SysDept;
|
||||||
|
import com.youlai.admin.pojo.form.DeptForm;
|
||||||
import com.youlai.admin.pojo.query.DeptQuery;
|
import com.youlai.admin.pojo.query.DeptQuery;
|
||||||
|
import com.youlai.admin.pojo.vo.dept.DeptDetailVO;
|
||||||
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
import com.youlai.admin.pojo.vo.dept.DeptVO;
|
||||||
import com.youlai.admin.service.SysDeptService;
|
import com.youlai.admin.service.SysDeptService;
|
||||||
import com.youlai.common.constant.GlobalConstants;
|
import com.youlai.common.constant.GlobalConstants;
|
||||||
|
import com.youlai.common.constant.SystemConstants;
|
||||||
import com.youlai.common.web.domain.Option;
|
import com.youlai.common.web.domain.Option;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.logging.log4j.util.Strings;
|
import org.apache.logging.log4j.util.Strings;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,10 +36,10 @@ import java.util.stream.Collectors;
|
|||||||
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements SysDeptService {
|
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements SysDeptService {
|
||||||
|
|
||||||
|
|
||||||
|
private final DeptConverter deptConverter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门列表
|
* 部门列表
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DeptVO> listDepts(DeptQuery queryParams) {
|
public List<DeptVO> listDepts(DeptQuery queryParams) {
|
||||||
@ -112,7 +114,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门下拉(Select)层级列表
|
* 部门下拉选项
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -120,12 +122,36 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
public List<Option> lisetDeptOptions() {
|
public List<Option> lisetDeptOptions() {
|
||||||
List<SysDept> deptList = this.list(new LambdaQueryWrapper<SysDept>()
|
List<SysDept> deptList = this.list(new LambdaQueryWrapper<SysDept>()
|
||||||
.eq(SysDept::getStatus, GlobalConstants.STATUS_YES)
|
.eq(SysDept::getStatus, GlobalConstants.STATUS_YES)
|
||||||
|
.select(SysDept::getId, SysDept::getParentId, SysDept::getName)
|
||||||
.orderByAsc(SysDept::getSort)
|
.orderByAsc(SysDept::getSort)
|
||||||
);
|
);
|
||||||
List<Option> deptSelectList = recursionTreeSelectList(SystemConstants.ROOT_DEPT_ID, deptList);
|
List<Option> options = recurDeptTreeOptions(SystemConstants.ROOT_DEPT_ID, deptList);
|
||||||
return deptSelectList;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long saveDept(DeptForm formData) {
|
||||||
|
SysDept entity = deptConverter.form2Entity(formData);
|
||||||
|
// 部门路径
|
||||||
|
String treePath = generateDeptTreePath(formData.getParentId());
|
||||||
|
entity.setTreePath(treePath);
|
||||||
|
// 保存部门并返回部门ID
|
||||||
|
this.save(entity);
|
||||||
|
return entity.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long updateDept(Long deptId, DeptForm formData) {
|
||||||
|
// form->entity
|
||||||
|
SysDept entity = deptConverter.form2Entity(formData);
|
||||||
|
entity.setId(deptId);
|
||||||
|
// 部门路径
|
||||||
|
String treePath = generateDeptTreePath(formData.getParentId());
|
||||||
|
entity.setTreePath(treePath);
|
||||||
|
// 保存部门并返回部门ID
|
||||||
|
this.updateById(entity);
|
||||||
|
return entity.getId();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 递归生成部门表格层级列表
|
* 递归生成部门表格层级列表
|
||||||
@ -134,40 +160,27 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
* @param deptList
|
* @param deptList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static List<Option> recursionTreeSelectList(long parentId, List<SysDept> deptList) {
|
public static List<Option> recurDeptTreeOptions(long parentId, List<SysDept> deptList) {
|
||||||
List<Option> deptTreeSelectList = new ArrayList<>();
|
if (CollectionUtil.isEmpty(deptList)) {
|
||||||
Optional.ofNullable(deptList).orElse(new ArrayList<>())
|
return Collections.EMPTY_LIST;
|
||||||
.stream()
|
}
|
||||||
|
|
||||||
|
List<Option> list = deptList.stream()
|
||||||
.filter(dept -> dept.getParentId().equals(parentId))
|
.filter(dept -> dept.getParentId().equals(parentId))
|
||||||
.forEach(dept -> {
|
.map(dept -> {
|
||||||
Option Option = new Option(dept.getId(), dept.getName());
|
Option option = new Option(dept.getId(), dept.getName());
|
||||||
List<Option> children = recursionTreeSelectList(dept.getId(), deptList);
|
List<Option> children = recurDeptTreeOptions(dept.getId(), deptList);
|
||||||
if (CollectionUtil.isNotEmpty(children)) {
|
if (CollectionUtil.isNotEmpty(children)) {
|
||||||
Option.setChildren(children);
|
option.setChildren(children);
|
||||||
}
|
}
|
||||||
deptTreeSelectList.add(Option);
|
return option;
|
||||||
});
|
})
|
||||||
return deptTreeSelectList;
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存(新增/修改)部门
|
|
||||||
*
|
|
||||||
* @param dept
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Long saveDept(SysDept dept) {
|
|
||||||
// 生成部门树路径
|
|
||||||
String treePath = generateDeptTreePath(dept);
|
|
||||||
dept.setTreePath(treePath);
|
|
||||||
|
|
||||||
boolean result = this.saveOrUpdate(dept);
|
|
||||||
Assert.isTrue(result, "保存部门出错");
|
|
||||||
return dept.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除部门
|
* 删除部门
|
||||||
*
|
*
|
||||||
@ -176,33 +189,57 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteByIds(String ids) {
|
public boolean deleteByIds(String ids) {
|
||||||
AtomicBoolean result = new AtomicBoolean(true);
|
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
|
||||||
// 删除部门及子部门
|
// 删除部门及子部门
|
||||||
Optional.ofNullable(idList).orElse(new ArrayList<>()).forEach(id ->
|
Optional.ofNullable(Arrays.stream(ids.split(",")))
|
||||||
result.set(this.remove(new LambdaQueryWrapper<SysDept>()
|
.ifPresent(deptIds -> deptIds.forEach(deptId ->
|
||||||
.eq(SysDept::getId, id)
|
this.remove(new LambdaQueryWrapper<SysDept>()
|
||||||
.or()
|
.eq(SysDept::getId, deptId)
|
||||||
.apply("concat (',',tree_path,',') like concat('%,',{0},',%')", id)))
|
.or()
|
||||||
);
|
.apply("concat (',',tree_path,',') like concat('%,',{0},',%')", deptId))
|
||||||
return result.get();
|
));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取部门详情
|
||||||
|
*
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DeptDetailVO getDeptDetail(Long deptId) {
|
||||||
|
|
||||||
|
SysDept entity = this.getOne(new LambdaQueryWrapper<SysDept>()
|
||||||
|
.eq(SysDept::getId, deptId)
|
||||||
|
.select(
|
||||||
|
SysDept::getId,
|
||||||
|
SysDept::getName,
|
||||||
|
SysDept::getParentId,
|
||||||
|
SysDept::getStatus,
|
||||||
|
SysDept::getSort
|
||||||
|
|
||||||
|
));
|
||||||
|
|
||||||
|
DeptDetailVO detailVO = deptConverter.entity2DetailVO(entity);
|
||||||
|
return detailVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成部门路径
|
* 部门路径生成
|
||||||
*
|
*
|
||||||
* @param dept
|
* @param parentId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String generateDeptTreePath(SysDept dept) {
|
private String generateDeptTreePath(Long parentId) {
|
||||||
Long parentId = dept.getParentId();
|
String treePath = null;
|
||||||
String treePath;
|
if (SystemConstants.ROOT_DEPT_ID.equals(parentId)) {
|
||||||
if (parentId.equals(SystemConstants.ROOT_DEPT_ID)) {
|
treePath = parentId + "";
|
||||||
treePath = String.valueOf(SystemConstants.ROOT_DEPT_ID);
|
|
||||||
} else {
|
} else {
|
||||||
SysDept parentDept = this.getById(parentId);
|
SysDept parent = this.getById(parentId);
|
||||||
treePath = Optional.ofNullable(parentDept).map(item -> item.getTreePath() + "," + item.getId()).orElse(Strings.EMPTY);
|
if (parent != null) {
|
||||||
|
treePath = parent.getTreePath() + "," + parent.getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return treePath;
|
return treePath;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user