update 优化新增流程分类判断
This commit is contained in:
parent
927565c02b
commit
e745ccc0cb
@ -192,13 +192,9 @@ public class FlwCategoryServiceImpl implements IFlwCategoryService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertByBo(FlowCategoryBo bo) {
|
public int insertByBo(FlowCategoryBo bo) {
|
||||||
|
FlowCategory info = baseMapper.selectById(bo.getParentId());
|
||||||
FlowCategory category = MapstructUtils.convert(bo, FlowCategory.class);
|
FlowCategory category = MapstructUtils.convert(bo, FlowCategory.class);
|
||||||
if(bo.getParentId().intValue()==0) {
|
category.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + category.getParentId());
|
||||||
category.setAncestors(SystemConstants.NORMAL);
|
|
||||||
}else{
|
|
||||||
FlowCategory info = baseMapper.selectById(bo.getParentId());
|
|
||||||
category.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + category.getParentId());
|
|
||||||
}
|
|
||||||
return baseMapper.insert(category);
|
return baseMapper.insert(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user