Commit 1170b428 authored by zhaochengming's avatar zhaochengming

赵呈明 --应用服务树分类

parent 71de895c
......@@ -77,8 +77,15 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
ocpApi.setApiGroupCtime(timestamp);
ocpApi.setApiGroupPcode(ocpApiGroup.getApiGroupCode());
ocpApi.setApiGroupCode(code);
if(ocpApiGroup.getApiGroupLevel().equals("Middleground")){
ocpApiGroup.setApiGroupLevel("sys_center");
}
if(ocpApiGroup.getApiGroupLevel().equals("sys_center")){
ocpApiGroup.setApiGroupLevel("api_group");
}
mapper.insert(ocpApi);
ocpApiGroup.setApiGroupLevel(ocpApiGroup.getApiGroupLevel() + 1);
}else {
return false;
}
......@@ -94,6 +101,7 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
*/
@Override
public boolean updataOcpTree(OcpApiGroup ocpApiGroup) {
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
boolean falg = true;
List<OcpApiGroup> ocpApiGroups = mapper.selectList(null);
for (OcpApiGroup apiGroup : ocpApiGroups) {
......@@ -103,6 +111,7 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
break;
}
}
ocpApiGroup.setApiGroupMtime(timestamp);
mapper.updateById(ocpApiGroup);
return falg;
}
......
......@@ -93,9 +93,9 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
if (falg) {
tenanBaseDto.setClassIfy(tenanBaseDto.getTenantGroupCode());
tenantMapper.insert(group);
group = tenantMapper.selectById(tenanBaseDto.getObjId());
}
return group;
}
......@@ -143,17 +143,6 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
flag = false;
}
// List<OcpTenantGroup> ocpTenantGroupList = tenantMapper.selectList(null);
// for (OcpTenantGroup tenantGroup : ocpTenantGroupList) {
// String tenantGroupPcode = tenantGroup.getTenantGroupPcode();
// if ((ocpTenantGroup.getTenantGroupCode().equals(tenantGroupPcode))) {
// flag = false;
// break;
// }
// }
return flag;
}
......@@ -169,7 +158,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
LambdaQueryWrapper<OcpTenantGroup> qw = new LambdaQueryWrapper<>();
Page<OcpTenantGroup> page = new Page<>(currentPage, pageSize);
if (StringUtils.isBlank(keyword)) {
if("".equals(lev)) {
if("".equals(lev) || "1".equals(lev)) {
LambdaQueryWrapper<OcpTenantGroup> eq = qw.eq(OcpTenantGroup::getTenantGroupCompanyCode, tenantGroupCompanyCode);
tenantMapper.selectPage(page, eq);
}else if ("2".equals(lev) || "3".equals(lev)) {
......
......@@ -2,11 +2,11 @@ spring:
datasource:
driver-class-name: org.postgresql.Driver
username: postgres
password: root
password: 1234
type: com.zaxxer.hikari.HikariDataSource
# jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
# jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
url: jdbc:postgresql://localhost:5432/model?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
url: jdbc:postgresql://localhost:5432/pms_accept?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
knife4j:
enable: true
......
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