From 7fdd39a6171f8a7af3219c03d90d540d0412a562 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Tue, 24 Dec 2024 11:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=B1=BB=E5=9E=8B=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=94=B6=E5=B0=BE=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java index 03df592f..3f666de1 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/service/impl/MaTypeServiceImpl.java @@ -64,6 +64,7 @@ public class MaTypeServiceImpl implements ITypeService { @Override @Transactional(rollbackFor = Exception.class) public int insertMaType(MaType maType) { + maType.setTypeName(maType.getTypeName().trim()); Long parentId = maType.getParentId(); MaType maType1 = maTypeMapper.selectMaTypeByTypeId(parentId); String level = maType1.getLevel(); @@ -71,7 +72,6 @@ public class MaTypeServiceImpl implements ITypeService { maType.setCreateTime(DateUtils.getNowDate()); int i = maTypeMapper.insertType(maType); //根据类型名称判重 - maType.setTypeName(maType.getTypeName().trim()); if (maType.getTypeName() != null && maType.getParentId() != null) { int num = maTypeMapper.getMaType(maType); if (num > 1) {