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.admin.service.SysDeptService;
|
||||||
import com.pig4cloud.pig.common.security.util.SecurityUtils;
|
import com.pig4cloud.pig.common.security.util.SecurityUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -58,10 +57,8 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean saveDept(SysDept dept) {
|
public Boolean saveDept(SysDept dept) {
|
||||||
SysDept sysDept = new SysDept();
|
this.save(dept);
|
||||||
BeanUtils.copyProperties(dept, sysDept);
|
sysDeptRelationService.saveDeptRelation(dept);
|
||||||
this.save(sysDept);
|
|
||||||
sysDeptRelationService.saveDeptRelation(sysDept);
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user