mirror of
https://gitee.com/log4j/pig.git
synced 2025-01-03 23:42:22 +08:00
移除多余的BeanUtils.copyProperties调用
This commit is contained in:
parent
c1759fa199
commit
b7d1f7eccf
@ -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<SysDeptMapper, SysDept> 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user