From a7ce14cd5aace1304d2768f9eafd501bf9e12ba0 Mon Sep 17 00:00:00 2001 From: mashuai Date: Thu, 17 Oct 2024 16:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/material/ma/service/impl/PartTypeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java index ac12c538..020d6d6c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/PartTypeServiceImpl.java @@ -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) {