From b7d1f7eccf8d3c1bfd6cd3ab3ae466493f24d0bc Mon Sep 17 00:00:00 2001 From: linck Date: Fri, 10 Mar 2023 17:50:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E7=9A=84Be?= =?UTF-8?q?anUtils.copyProperties=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig/admin/service/impl/SysDeptServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDeptServiceImpl.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDeptServiceImpl.java index 319fc6bd..ade640ef 100644 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDeptServiceImpl.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysDeptServiceImpl.java @@ -29,7 +29,6 @@ import com.pig4cloud.pig.admin.service.SysDeptRelationService; import com.pig4cloud.pig.admin.service.SysDeptService; import com.pig4cloud.pig.common.security.util.SecurityUtils; import lombok.RequiredArgsConstructor; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -58,10 +57,8 @@ public class SysDeptServiceImpl extends ServiceImpl impl @Override @Transactional(rollbackFor = Exception.class) public Boolean saveDept(SysDept dept) { - SysDept sysDept = new SysDept(); - BeanUtils.copyProperties(dept, sysDept); - this.save(sysDept); - sysDeptRelationService.saveDeptRelation(sysDept); + this.save(dept); + sysDeptRelationService.saveDeptRelation(dept); return Boolean.TRUE; }