|
|
@ -92,7 +92,7 @@ public class MajorFunctionConfServiceImpl extends BaseServiceImpl<MajorFunctionC |
|
|
|
|
|
|
|
Integer integer = baseDao.selectCount(queryWrapper); |
|
|
|
if (integer > 0) { |
|
|
|
throw new RenException("功能编码重复"); |
|
|
|
throw new RenException("功能编码已存在"); |
|
|
|
} |
|
|
|
insert(entity); |
|
|
|
} |
|
|
@ -101,6 +101,13 @@ public class MajorFunctionConfServiceImpl extends BaseServiceImpl<MajorFunctionC |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void update(MajorFunctionConfDTO dto) { |
|
|
|
MajorFunctionConfEntity entity = ConvertUtils.sourceToTarget(dto, MajorFunctionConfEntity.class); |
|
|
|
QueryWrapper queryWrapper = new QueryWrapper(); |
|
|
|
queryWrapper.eq(StringUtils.isNotBlank(dto.getCode()), "code", dto.getCode()); |
|
|
|
|
|
|
|
Integer integer = baseDao.selectCount(queryWrapper); |
|
|
|
if (integer > 0) { |
|
|
|
throw new RenException("功能编码已存在,不允许修改"); |
|
|
|
} |
|
|
|
updateById(entity); |
|
|
|
} |
|
|
|
|
|
|
|