Commit ce28be68 authored by 郭凡凡's avatar 郭凡凡

更新

parent 190186aa
...@@ -61,6 +61,7 @@ public class AppRegisterServiceImpl implements AppRegisterService { ...@@ -61,6 +61,7 @@ public class AppRegisterServiceImpl implements AppRegisterService {
ocpTenantExtent.setClusterName(appRegisterDTO.getGroup()); ocpTenantExtent.setClusterName(appRegisterDTO.getGroup());
ocpTenantExtent.setDeploymentName(appRegisterDTO.getDeploymentName()); ocpTenantExtent.setDeploymentName(appRegisterDTO.getDeploymentName());
ocpTenantExtent.setIsDelete((short) 0); ocpTenantExtent.setIsDelete((short) 0);
ocpTenantExtent.setTenantState((short) 0);
int j = ocpTenantExtentMapper.insert(ocpTenantExtent); int j = ocpTenantExtentMapper.insert(ocpTenantExtent);
OcpTenantGroup ocpTenantGroup = new OcpTenantGroup(); OcpTenantGroup ocpTenantGroup = new OcpTenantGroup();
......
...@@ -410,7 +410,7 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan ...@@ -410,7 +410,7 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
OcpTenantBase ocpTenantBase = new OcpTenantBase(); OcpTenantBase ocpTenantBase = new OcpTenantBase();
BeanUtils.copyProperties(ocpBaseTiocnDto, ocpTenantBase); BeanUtils.copyProperties(ocpBaseTiocnDto, ocpTenantBase);
ocpTenantBase.setIsDelete((short) 0); ocpTenantBase.setIsDelete((short) 0);
ocpTenantBase.setTenantCtime(new Timestamp(System.currentTimeMillis()));
LambdaQueryWrapper<OcpTenantBase> lambdaQueryWrapper2 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OcpTenantBase> lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
lambdaQueryWrapper2.eq(OcpTenantBase::getTenantCode, tenantCode); lambdaQueryWrapper2.eq(OcpTenantBase::getTenantCode, tenantCode);
// boolean flag = this.update(ocpTenantBase, lambdaQueryWrapper2); // boolean flag = this.update(ocpTenantBase, lambdaQueryWrapper2);
...@@ -421,22 +421,34 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan ...@@ -421,22 +421,34 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
int delete = tenantBasicManagementMapper.delete(lambdaQueryWrapper2); int delete = tenantBasicManagementMapper.delete(lambdaQueryWrapper2);
if (delete == 0) { if (delete == 0) {
log.info("增加"); log.info("增加");
ocpTenantBase.setTenantCtime(new Timestamp(System.currentTimeMillis()));
ocpTenantBase.setTenantMtime(new Timestamp(System.currentTimeMillis()));
} else { } else {
log.info("编辑"); log.info("编辑");
ocpTenantBase.setTenantMtime(new Timestamp(System.currentTimeMillis()));
} }
boolean save1 = this.save(ocpTenantBase); boolean save1 = this.save(ocpTenantBase);
if (save1) { OcpTenantExtent ocpTenantExtent = new OcpTenantExtent();
log.info("基础表添加成功"); ocpTenantExtent.setTenantCode(tenantCode);
ocpTenantExtent.setTenantState((short) 0);
ocpTenantExtent.setIsDelete((short) 0);
LambdaQueryWrapper<OcpTenantExtent> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
lambdaQueryWrapper1.eq(StringUtils.isNotEmpty(tenantCode),OcpTenantExtent::getTenantCode,tenantCode);
int delete1 = ocpTenantExtentMapper.delete(lambdaQueryWrapper1);
if (delete1 == 0) {
log.info("增加");
ocpTenantExtent.setTenantCtime(new Timestamp(System.currentTimeMillis()));
ocpTenantExtent.setTenantMtime(new Timestamp(System.currentTimeMillis()));
} else {
log.info("编辑");
ocpTenantExtent.setTenantMtime(new Timestamp(System.currentTimeMillis()));
} }
ocpTenantExtentMapper.insert(ocpTenantExtent);
LambdaQueryWrapper<OcpTenantIocn> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OcpTenantIocn> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(OcpTenantIocn::getCodeNo, tenantCode); lambdaQueryWrapper.eq(OcpTenantIocn::getCodeNo, tenantCode);
boolean remove = ocpTenantIocnService.remove(lambdaQueryWrapper); boolean remove = ocpTenantIocnService.remove(lambdaQueryWrapper);
if (remove) {
log.info("图标表删除成功");
System.out.println("图标表删除成功");
}
//添加新的数据到图标表 //添加新的数据到图标表
OcpTenantIocn ocpTenantIocn = new OcpTenantIocn(); OcpTenantIocn ocpTenantIocn = new OcpTenantIocn();
String ownerCompanyCode = ocpBaseTiocnDto.getOwnerCompanyCode(); String ownerCompanyCode = ocpBaseTiocnDto.getOwnerCompanyCode();
...@@ -445,10 +457,6 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan ...@@ -445,10 +457,6 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
// ocpTenantIocn.setIocn(ocpBaseTiocnDto.getIocn()); // ocpTenantIocn.setIocn(ocpBaseTiocnDto.getIocn());
ocpTenantIocn.setCompanyCode(ownerCompanyCode); ocpTenantIocn.setCompanyCode(ownerCompanyCode);
boolean save = ocpTenantIocnService.save(ocpTenantIocn); boolean save = ocpTenantIocnService.save(ocpTenantIocn);
if (save) {
log.info("添加图标表成功");
System.out.println("添加图标表成功");
}
if (save1 && save) { if (save1 && save) {
return ResponseVO.ok("添加成功"); return ResponseVO.ok("添加成功");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment