Commit e64da6ba authored by wufeifan's avatar wufeifan

修改了未选父级目录情况

parent 55aaee17
......@@ -85,7 +85,13 @@ public class EquipmentCategoryServiceImpl extends ServiceImpl<EquipmentCategoryM
String code = null;
Map<String, Object> map = new HashMap<>();
if (equipmentCategory.getParentId() == null){
EquipmentCategory root = equipmentCategoryMapper.getEquipmentCategoryEquipmentList().get(0);
equipmentCategory.setParentId(root.getId());
}
Long id = equipmentCategory.getParentId();
EquipmentCategory parentEqc = this.getById(id);
if (ObjectUtils.isEmpty(parentEqc)) {
throw new CommonException(0, "请先选择上级装备分类!");
......
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