|
@@ -42,24 +42,24 @@ public class CdnOperatorServiceImpl extends ServiceImpl<CdnOperatorMapper, CdnOp
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public Result saveOperator(CdnOperator operator) {
|
|
|
|
|
|
+ public Result<String> saveOperator(CdnOperator operator) {
|
|
SystemUser loginUser = userService.getLoginUser();
|
|
SystemUser loginUser = userService.getLoginUser();
|
|
operator.setCreateBy(loginUser.getId());
|
|
operator.setCreateBy(loginUser.getId());
|
|
operatorMapper.insert(operator);
|
|
operatorMapper.insert(operator);
|
|
- return Result.success();
|
|
|
|
|
|
+ return Result.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result updateOperator(CdnOperator operator) {
|
|
|
|
|
|
+ public Result<String> updateOperator(CdnOperator operator) {
|
|
SystemUser loginUser = userService.getLoginUser();
|
|
SystemUser loginUser = userService.getLoginUser();
|
|
operator.setUpdateBy(loginUser.getId());
|
|
operator.setUpdateBy(loginUser.getId());
|
|
operatorMapper.updateById(operator);
|
|
operatorMapper.updateById(operator);
|
|
- return Result.success();
|
|
|
|
|
|
+ return Result.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public Result bindCdn(DomainOperatorBindDto bindDto) {
|
|
|
|
|
|
+ public Result<String> bindCdn(DomainOperatorBindDto bindDto) {
|
|
Integer domainId = bindDto.getDomainId();
|
|
Integer domainId = bindDto.getDomainId();
|
|
CdnDomain domain = domainMapper.selectById(domainId);
|
|
CdnDomain domain = domainMapper.selectById(domainId);
|
|
if (domain == null) {
|
|
if (domain == null) {
|
|
@@ -82,11 +82,11 @@ public class CdnOperatorServiceImpl extends ServiceImpl<CdnOperatorMapper, CdnOp
|
|
del.eq(CdnDomainOperator::getDomainId, domainId);
|
|
del.eq(CdnDomainOperator::getDomainId, domainId);
|
|
domainOperatorService.remove(del);
|
|
domainOperatorService.remove(del);
|
|
domainOperatorService.saveBatch(arr);
|
|
domainOperatorService.saveBatch(arr);
|
|
- return Result.success();
|
|
|
|
|
|
+ return Result.success("操作成功");
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result listPage(OperatorQueryDto queryDto) {
|
|
|
|
|
|
+ public Result<IPage<CdnOperatorVo>> listPage(OperatorQueryDto queryDto) {
|
|
IPage<CdnOperatorVo> page = new Page<>(queryDto.getPageSize(), queryDto.getPageNum());
|
|
IPage<CdnOperatorVo> page = new Page<>(queryDto.getPageSize(), queryDto.getPageNum());
|
|
page = domainOperatorService.listPage(page, queryDto);
|
|
page = domainOperatorService.listPage(page, queryDto);
|
|
return Result.success(page);
|
|
return Result.success(page);
|
|
@@ -94,8 +94,8 @@ public class CdnOperatorServiceImpl extends ServiceImpl<CdnOperatorMapper, CdnOp
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public Result removeBind(Integer id) {
|
|
|
|
|
|
+ public Result<String> removeBind(Integer id) {
|
|
domainOperatorService.removeById(id);
|
|
domainOperatorService.removeById(id);
|
|
- return Result.success();
|
|
|
|
|
|
+ return Result.success("操作成功");
|
|
}
|
|
}
|
|
}
|
|
}
|