Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
operation-control-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王锦盛
operation-control-platform
Commits
bc6bdf9a
Commit
bc6bdf9a
authored
Mar 30, 2022
by
zhaochengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总部--bug修改
parent
eb919a18
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
src/main/java/com/pms/ocp/mapper/OcpTenantBaseMapper.java
src/main/java/com/pms/ocp/mapper/OcpTenantBaseMapper.java
+3
-0
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
.../java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
+2
-1
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
...main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
+19
-4
src/main/resources/mapper/OcpTenantBaseMapper.xml
src/main/resources/mapper/OcpTenantBaseMapper.xml
+6
-0
No files found.
src/main/java/com/pms/ocp/mapper/OcpTenantBaseMapper.java
View file @
bc6bdf9a
...
...
@@ -21,4 +21,7 @@ public interface OcpTenantBaseMapper extends BaseMapper<OcpTenantBase> {
* @return
*/
int
queryCount
(
String
appCode
);
List
<
OcpTenantBase
>
selcctCodeList
(
String
ocpTenantGroup
);
}
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
View file @
bc6bdf9a
...
...
@@ -43,6 +43,8 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
@Autowired
private
OcpApiBaseMapper
ocpApiBaseMapper
;
/**
* 服务树分类
*
...
...
@@ -85,7 +87,6 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
// Stream<OcpApiGroup> apiGroupStream1 = ocpApiGroupStream.filter(ocp -> ocp.getApiGroupName().equals(ocpApiGroup.getApiGroupName()));
List
<
OcpApiGroup
>
ocpApiGroups1
=
mapper
.
selectGroupName
(
ocpApiGroup
.
getApiGroupName
());
OcpApiGroup
ocpApi
=
new
OcpApiGroup
();
if
(
ocpApiGroups1
.
size
()
==
0
)
{
ocpApi
.
setApiGroupPromotionType
(
ocpApiGroup
.
getApiGroupPromotionType
());
...
...
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
View file @
bc6bdf9a
...
...
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageInfo
;
import
com.pms.ocp.common.utils.RandomStringUtils
;
import
com.pms.ocp.mapper.OcpTenantBaseMapper
;
import
com.pms.ocp.mapper.TenantBasicManagementMapper
;
import
com.pms.ocp.mapper.TenantMapper
;
import
com.pms.ocp.model.dto.*
;
import
com.pms.ocp.model.entity.OcpTenantBase
;
import
com.pms.ocp.model.entity.OcpTenantGroup
;
import
com.pms.ocp.service.TenantService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -32,6 +34,10 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
@Autowired
private
TenantBasicManagementMapper
tenantBasicMapper
;
@Autowired
private
OcpTenantBaseMapper
ocpTenantBaseMapper
;
/**
* 应用树分类管理
*
...
...
@@ -64,6 +70,12 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
@Override
public
OcpTenantGroup
getTenanInster
(
TenanBaseDto
tenanBaseDto
)
{
boolean
falg
=
true
;
if
(
StringUtils
.
isNotBlank
(
tenanBaseDto
.
getTenantGroupCode
()))
{
List
<
OcpTenantBase
>
ocpTenantBases
=
ocpTenantBaseMapper
.
selcctCodeList
(
tenanBaseDto
.
getTenantGroupCode
());
if
(
ocpTenantBases
.
size
()
>
0
)
{
falg
=
false
;
}
}
OcpTenantGroup
group
=
new
OcpTenantGroup
();
String
randomString
=
RandomStringUtils
.
getRandomString
(
6
);
...
...
@@ -105,8 +117,11 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
tenanBaseDto
.
setClassIfy
(
tenanBaseDto
.
getTenantGroupCode
());
tenantMapper
.
insert
(
group
);
}
return
group
;
}
/**
...
...
@@ -178,18 +193,18 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
if
(
StringUtils
.
isBlank
(
keyword
))
{
if
(
StringUtils
.
isBlank
(
lev
)
||
"1"
.
equals
(
lev
))
{
LambdaQueryWrapper
<
OcpTenantGroup
>
eq
=
qw
.
eq
(
OcpTenantGroup:
:
getTenantGroupCompanyCode
,
tenantGroupCompanyCode
);
LambdaQueryWrapper
<
OcpTenantGroup
>
eq
=
qw
.
eq
(
OcpTenantGroup:
:
getTenantGroupCompanyCode
,
tenantGroupCompanyCode
)
.
orderByDesc
(
OcpTenantGroup:
:
getTenantGroupMtime
)
;
tenantMapper
.
selectPage
(
page
,
eq
);
}
else
if
(
"2"
.
equals
(
lev
)
||
"3"
.
equals
(
lev
))
{
LambdaQueryWrapper
<
OcpTenantGroup
>
eq
=
qw
.
or
(
wq
->
wq
.
eq
(
OcpTenantGroup:
:
getTenantGroupCompanyCode
,
tenantGroupCompanyCode
))
.
eq
(
OcpTenantGroup:
:
getTenantGroupPcode
,
tenantGroupCode
);
.
eq
(
OcpTenantGroup:
:
getTenantGroupPcode
,
tenantGroupCode
)
.
orderByDesc
(
OcpTenantGroup:
:
getTenantGroupMtime
)
;
tenantMapper
.
selectPage
(
page
,
eq
);
}
}
else
if
(!(
StringUtils
.
isBlank
(
keyword
)))
{
LambdaQueryWrapper
<
OcpTenantGroup
>
ocpTenantGroupLambdaQueryWrapper
=
qw
.
and
(
c
->
c
.
like
(
OcpTenantGroup:
:
getTenantGroupCompanyCode
,
keyword
))
.
or
().
like
(
OcpTenantGroup:
:
getTenantGroupName
,
keyword
)
.
or
().
like
(
OcpTenantGroup:
:
getTenantGroupPcode
,
keyword
)
.
or
().
like
(
OcpTenantGroup:
:
getTenantGroupUserName
,
keyword
);
.
or
().
like
(
OcpTenantGroup:
:
getTenantGroupUserName
,
keyword
)
.
orderByDesc
(
OcpTenantGroup:
:
getTenantGroupMtime
)
;
tenantMapper
.
selectPage
(
page
,
ocpTenantGroupLambdaQueryWrapper
);
// OcpTenantGroup ocpTenantGroup1 = new OcpTenantGroup();
...
...
@@ -206,7 +221,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
record
.
setClassIfy
(
ocpTenantGroup1
.
getTenantGroupName
());
}
}
if
(
StringUtils
.
isBlank
(
tenantGroupCode
)){
if
(
StringUtils
.
isBlank
(
tenantGroupCode
))
{
List
<
OcpTenantGroup
>
records
=
page
.
getRecords
();
for
(
OcpTenantGroup
record
:
records
)
{
record
.
setClassIfy
(
record
.
getTenantGroupName
());
...
...
src/main/resources/mapper/OcpTenantBaseMapper.xml
View file @
bc6bdf9a
...
...
@@ -32,4 +32,10 @@
where tenant_code = #{appCode}
</select>
<select
id=
"selcctCodeList"
resultType=
"java.lang.Integer"
>
select *
from ocp_tenant_base
where tenant_group_code = #{ocpTenantGroup}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment