设备管理

This commit is contained in:
mashuai 2024-10-17 16:23:06 +08:00
parent d7046c075e
commit a7ce14cd5a
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ public class PartTypeServiceImpl implements IPartTypeService
}
partType.setCreateTime(DateUtils.getNowDate());
partType.setCreateBy(SecurityUtils.getUserId().toString());
partType.setParentId(partType.getId() != null ? partType.getId() : 0L);
partType.setParentId(partType.getId() != 0 ? partType.getId() : 0L);
partType.setLevel(partType.getLevel() != null ? String.valueOf(Integer.valueOf(partType.getLevel()) + 1) : "1");
int result = partTypeMapper.insertPartType(partType);
if (result > 0) {