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
3ef7314e
You need to sign in or sign up before continuing.
Commit
3ef7314e
authored
Mar 18, 2022
by
郭凡凡
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0002aa22
8a336758
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
227 additions
and
106 deletions
+227
-106
src/main/java/com/pms/ocp/controller/OcpApiTreeController.java
...ain/java/com/pms/ocp/controller/OcpApiTreeController.java
+2
-6
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
+1
-1
src/main/java/com/pms/ocp/model/dto/PageGroupDto.java
src/main/java/com/pms/ocp/model/dto/PageGroupDto.java
+12
-0
src/main/java/com/pms/ocp/model/dto/TenanBaseDto.java
src/main/java/com/pms/ocp/model/dto/TenanBaseDto.java
+98
-1
src/main/java/com/pms/ocp/model/entity/ModelProperty.java
src/main/java/com/pms/ocp/model/entity/ModelProperty.java
+6
-18
src/main/java/com/pms/ocp/model/entity/OcpTenantGroup.java
src/main/java/com/pms/ocp/model/entity/OcpTenantGroup.java
+5
-0
src/main/java/com/pms/ocp/service/OcpApiTreeService.java
src/main/java/com/pms/ocp/service/OcpApiTreeService.java
+1
-1
src/main/java/com/pms/ocp/service/impl/ModelServiceImpl.java
src/main/java/com/pms/ocp/service/impl/ModelServiceImpl.java
+43
-34
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
.../java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
+58
-43
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
...main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
+1
-2
No files found.
src/main/java/com/pms/ocp/controller/OcpApiTreeController.java
View file @
3ef7314e
...
...
@@ -43,11 +43,8 @@ public class OcpApiTreeController {
@PostMapping
(
"/instertree"
)
@ApiOperation
(
"服务树分类--新增"
)
public
ResponseVO
inseter
(
@RequestBody
OcpApiGroup
ocpApiGroup
){
boolean
flag
=
service
.
insertTree
(
ocpApiGroup
);
if
(
flag
){
return
ResponseVO
.
ok
();
}
return
ResponseVO
.
error
(
"您的服务编码重复,请重新输入"
);
OcpApiGroup
ocpApiGroup1
=
service
.
insertTree
(
ocpApiGroup
);
return
ResponseVO
.
ok
(
ocpApiGroup1
);
}
...
...
@@ -58,7 +55,6 @@ public class OcpApiTreeController {
return
ResponseVO
.
ok
(
onePages
);
}
@PostMapping
(
"/updatatree"
)
@ApiOperation
(
"服务树分类--修改"
)
public
ResponseVO
updataTree
(
@RequestBody
OcpApiGroup
ocpApiGroup
){
...
...
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
View file @
3ef7314e
...
...
@@ -32,7 +32,7 @@ public interface OcpApiTreeMapper extends BaseMapper<OcpApiGroup> {
List
<
OcpApiGroup
>
selectThreeApiGroupsList
(
Long
apiGroupPromotionType
,
String
apiGroupCode
);
List
<
OcpApiGroup
>
selectLists
(
Long
apiGroupPromotionType
,
String
apiGroupCode
,
String
apiGroupLevel
);
List
<
OcpApiGroup
>
selectLists
(
Long
apiGroupPromotionType
,
String
apiGroupCode
);
//code重复问题
List
<
OcpApiGroup
>
selectGroupCode
();
...
...
src/main/java/com/pms/ocp/model/dto/PageGroupDto.java
View file @
3ef7314e
...
...
@@ -53,6 +53,18 @@ public class PageGroupDto extends PageParam {
@ApiModelProperty
(
"分层树层级 1中台层 2中心层 3 服务组层 4服务层 "
)
private
String
apiGroupLevel
;
@ApiModelProperty
(
"模糊查询字段"
)
private
String
keyword
;
public
String
getKeyword
()
{
return
keyword
;
}
public
void
setKeyword
(
String
keyword
)
{
this
.
keyword
=
keyword
;
}
public
String
getObjId
()
{
return
objId
;
}
...
...
src/main/java/com/pms/ocp/model/dto/TenanBaseDto.java
View file @
3ef7314e
...
...
@@ -131,7 +131,104 @@ public class TenanBaseDto extends OcpTenantGroup {
return
classIfy
;
}
public
void
setClassIfy
(
String
classIfy
)
{
public
String
getTenantGroupName
()
{
return
tenantGroupName
;
}
public
void
setTenantGroupName
(
String
tenantGroupName
)
{
this
.
tenantGroupName
=
tenantGroupName
;
}
public
String
getTenantGroupCompanyCode
()
{
return
tenantGroupCompanyCode
;
}
public
void
setTenantGroupCompanyCode
(
String
tenantGroupCompanyCode
)
{
this
.
tenantGroupCompanyCode
=
tenantGroupCompanyCode
;
}
public
String
getTenantGroupPcode
()
{
return
tenantGroupPcode
;
}
public
void
setTenantGroupPcode
(
String
tenantGroupPcode
)
{
this
.
tenantGroupPcode
=
tenantGroupPcode
;
}
public
String
getTenantType
()
{
return
tenantType
;
}
public
void
setTenantType
(
String
tenantType
)
{
this
.
tenantType
=
tenantType
;
}
public
String
getTenantGroupVersion
()
{
return
tenantGroupVersion
;
}
public
void
setTenantGroupVersion
(
String
tenantGroupVersion
)
{
this
.
tenantGroupVersion
=
tenantGroupVersion
;
}
public
Integer
getTenantGroupOrderNo
()
{
return
tenantGroupOrderNo
;
}
public
void
setTenantGroupOrderNo
(
Integer
tenantGroupOrderNo
)
{
this
.
tenantGroupOrderNo
=
tenantGroupOrderNo
;
}
public
String
getTenantGroupUserId
()
{
return
tenantGroupUserId
;
}
public
void
setTenantGroupUserId
(
String
tenantGroupUserId
)
{
this
.
tenantGroupUserId
=
tenantGroupUserId
;
}
public
String
getTenantGroupUserName
()
{
return
tenantGroupUserName
;
}
public
void
setTenantGroupUserName
(
String
tenantGroupUserName
)
{
this
.
tenantGroupUserName
=
tenantGroupUserName
;
}
public
Timestamp
getTenantGroupCtime
()
{
return
tenantGroupCtime
;
}
public
void
setTenantGroupCtime
(
Timestamp
tenantGroupCtime
)
{
this
.
tenantGroupCtime
=
tenantGroupCtime
;
}
public
Timestamp
getTenantGroupMtime
()
{
return
tenantGroupMtime
;
}
public
void
setTenantGroupMtime
(
Timestamp
tenantGroupMtime
)
{
this
.
tenantGroupMtime
=
tenantGroupMtime
;
}
public
Short
getIsDelete
()
{
return
isDelete
;
}
public
void
setIsDelete
(
Short
isDelete
)
{
this
.
isDelete
=
isDelete
;
}
public
String
getTenantGroupLevel
()
{
return
tenantGroupLevel
;
}
public
void
setTenantGroupLevel
(
String
tenantGroupLevel
)
{
this
.
tenantGroupLevel
=
tenantGroupLevel
;
}
public
OcpTenantGroup
setClassIfy
(
String
classIfy
)
{
this
.
classIfy
=
classIfy
;
return
null
;
}
}
src/main/java/com/pms/ocp/model/entity/ModelProperty.java
View file @
3ef7314e
...
...
@@ -116,23 +116,11 @@ public class ModelProperty{
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
// @TableField(typeHandler = TimestampTypeHandler.class)
private
LocalDateTime
propMtime
;
/**
* 表名称
*/
@TableField
(
exist
=
false
)
private
String
modelTable
;
}
// 字段名称 字段描述 字段类型 允许为NULL 备注
// prop_id 主键 varchar(42) 否
// model_id 模型id varchar(42) 否
// column_name 属性名称 varchar(50) 否
// column_code 属性编码 varchar(42) 否
// column_comments 属性描述 varchar(50) 否
// data_type 数据类型 int4 否
// data_length 数据长度 int4 是
// data_scale 数据精度 int4 是
// is_pk 是否主键 int4 否 0:否,1:是
// is_required 是否必填 int4 是 0:否,1:是
// company_id 省公司ID varchar(42) 是
// company_name 省公司名称 varchar(50) 是
// prop _dispidx 显示顺序 int4 否
// prop_user_id 提交人id varchar(42) 否
// prop_user_name 提交人姓名 varchar(64) 否
// prop_ctime 创建时间 timestamp(6) 否
// prop_mtime 修改时间 timestamp(6) 否
src/main/java/com/pms/ocp/model/entity/OcpTenantGroup.java
View file @
3ef7314e
package
com.pms.ocp.model.entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -106,7 +107,11 @@ public class OcpTenantGroup implements Serializable {
@ApiModelProperty
(
"应用树层级 1:应用分组层 2:应用层"
)
private
String
tenantGroupLevel
;
//上级分类名称
@ApiModelProperty
(
"上级分类名称"
)
@TableField
(
exist
=
false
)
private
String
classIfy
;
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
...
...
src/main/java/com/pms/ocp/service/OcpApiTreeService.java
View file @
3ef7314e
...
...
@@ -19,7 +19,7 @@ public interface OcpApiTreeService extends IService<OcpApiGroup> {
/**
* 新增服务分类
*/
boolean
insertTree
(
OcpApiGroup
ocpApiGroup
);
OcpApiGroup
insertTree
(
OcpApiGroup
ocpApiGroup
);
/*
...
...
src/main/java/com/pms/ocp/service/impl/ModelServiceImpl.java
View file @
3ef7314e
...
...
@@ -150,7 +150,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper, Model> implements
if
(
ownerCompanyCodes
!=
null
&&
!
ownerCompanyCodes
.
isEmpty
())
{
List
<
Model
>
modelList
=
new
ArrayList
<>();
for
(
String
ownerCompanyCode
:
ownerCompanyCodes
){
for
(
String
ownerCompanyCode
:
ownerCompanyCodes
)
{
queryWrapper
.
lambda
().
eq
(
Model:
:
getOwnerCompanyCode
,
ownerCompanyCode
);
List
<
Model
>
modelList1
;
modelList1
=
modelMapper
.
selectList
(
queryWrapper
);
...
...
@@ -162,7 +162,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper, Model> implements
if
(
modelGroupCodes
!=
null
&&
!
modelGroupCodes
.
isEmpty
())
{
List
<
Model
>
modelList
=
new
ArrayList
<>();
for
(
String
modelGroupCode
:
modelGroupCodes
){
for
(
String
modelGroupCode
:
modelGroupCodes
)
{
queryWrapper
.
lambda
().
eq
(
Model:
:
getModelGroupCode
,
modelGroupCode
);
List
<
Model
>
modelList1
;
modelList1
=
modelMapper
.
selectList
(
queryWrapper
);
...
...
@@ -203,54 +203,63 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper, Model> implements
@Override
public
ResponseVO
getModeBaselList
(
String
belongLevel
,
String
modelCode
,
Integer
currentPage
,
Integer
pageSize
,
String
searchCondition
)
{
ResponseVO
result
;
switch
(
belongLevel
){
switch
(
belongLevel
)
{
case
Constant
.
Character
.
STRINGTWO
:
result
=
this
.
getModelInfoList
(
modelCode
,
currentPage
,
pageSize
,
searchCondition
);
result
=
this
.
getModelInfoList
(
modelCode
,
currentPage
,
pageSize
,
searchCondition
);
break
;
case
Constant
.
Character
.
STRINGTHREE
:
result
=
this
.
getPropertyList
(
modelCode
,
currentPage
,
pageSize
,
searchCondition
);
result
=
this
.
getPropertyList
(
modelCode
,
currentPage
,
pageSize
,
searchCondition
);
break
;
default
:
return
ResponseVO
.
ok
();
default
:
return
ResponseVO
.
ok
();
}
return
result
;
}
/**
*
* @author huxiuwu
* @date 2022/3/17
* @param modelCode 分类编码
* @param currentPage 当前页
* @param pageSize 每页数量
* @param searchCondition 搜索条件
* @return pms.ocp.model.vo.ResponseVO
* @author huxiuwu
* @date 2022/3/17
**/
private
ResponseVO
getModelInfoList
(
String
modelCode
,
Integer
currentPage
,
Integer
pageSize
,
String
searchCondition
)
{
QueryWrapper
<
Model
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"model_group_code"
,
modelCode
).
like
(
StringUtils
.
isNotEmpty
(
searchCondition
),
"ocp_model_prop"
,
searchCondition
);
queryWrapper
.
eq
(
"model_group_code"
,
modelCode
)
.
like
(
StringUtils
.
isNotEmpty
(
searchCondition
),
"ocp_model_prop"
,
searchCondition
)
.
orderByDesc
(
"model_ctime"
);
List
<
Model
>
modelList
=
modelMapper
.
selectList
(
queryWrapper
);
PageUtil
<
Model
>
pageUtil
=
new
PageUtil
<>();
pageUtil
.
startPage
(
currentPage
,
pageSize
,
modelList
);
pageUtil
.
startPage
(
currentPage
,
pageSize
,
modelList
);
return
ResponseVO
.
ok
(
pageUtil
);
}
/**
*
* @author huxiuwu
* @date 2022/3/17
* @param modelCode 分类编码
* @param currentPage 当前页
* @param pageSize 每页数量
* @param searchCondition 搜索条件
* @return pms.ocp.model.vo.ResponseVO
* @author huxiuwu
* @date 2022/3/17
**/
private
ResponseVO
getPropertyList
(
String
modelCode
,
Integer
currentPage
,
Integer
pageSize
,
String
searchCondition
)
{
QueryWrapper
<
ModelProperty
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"model_code"
,
modelCode
).
like
(
StringUtils
.
isNotEmpty
(
searchCondition
),
"column_name"
,
searchCondition
);
List
<
ModelProperty
>
modelPropertiesList
=
modelPropertyMapper
.
selectList
(
queryWrapper
);
QueryWrapper
<
ModelProperty
>
proWrapper
=
new
QueryWrapper
<>();
//查询模型名称
QueryWrapper
<
Model
>
modelWrapper
=
new
QueryWrapper
<>();
modelWrapper
.
eq
(
"model_code"
,
modelCode
);
List
<
Model
>
modelList
=
modelMapper
.
selectList
(
modelWrapper
);
proWrapper
.
eq
(
"model_code"
,
modelCode
)
.
like
(
StringUtils
.
isNotEmpty
(
searchCondition
),
"column_name"
,
searchCondition
)
.
orderByDesc
(
"prop_ctime"
);
List
<
ModelProperty
>
modelPropertiesList
=
modelPropertyMapper
.
selectList
(
proWrapper
);
modelPropertiesList
.
forEach
(
pro
->
pro
.
setModelTable
(
modelList
.
get
(
0
)
==
null
?
""
:
modelList
.
get
(
0
).
getModelTable
())
);
PageUtil
<
ModelProperty
>
pageUtil
=
new
PageUtil
<>();
pageUtil
.
startPage
(
currentPage
,
pageSize
,
modelPropertiesList
);
pageUtil
.
startPage
(
currentPage
,
pageSize
,
modelPropertiesList
);
return
ResponseVO
.
ok
(
pageUtil
);
}
}
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
View file @
3ef7314e
...
...
@@ -8,9 +8,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.pms.ocp.common.utils.RandomStringUtils
;
import
com.pms.ocp.mapper.OcpApiBaseMapper
;
import
com.pms.ocp.mapper.OcpApiTreeMapper
;
import
com.pms.ocp.model.QueryResponseResult
;
import
com.pms.ocp.model.dto.*
;
import
com.pms.ocp.model.entity.OcpApiGroup
;
import
com.pms.ocp.model.entity.OcpTenantGroup
;
import
com.pms.ocp.service.OcpApiTreeService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -25,7 +27,7 @@ import java.util.stream.Stream;
@Service
@Slf4j
public
class
OcpApiTreeServiceImpl
extends
ServiceImpl
<
OcpApiTreeMapper
,
OcpApiGroup
>
implements
OcpApiTreeService
{
public
class
OcpApiTreeServiceImpl
extends
ServiceImpl
<
OcpApiTreeMapper
,
OcpApiGroup
>
implements
OcpApiTreeService
{
@Autowired
...
...
@@ -41,12 +43,12 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
*/
@Override
public
List
<
OcpApiGroup
>
getByGroup
(
Long
apiGroupPromotionType
,
String
apiGroupCode
)
{
public
List
<
OcpApiGroup
>
getByGroup
(
Long
apiGroupPromotionType
,
String
apiGroupCode
)
{
if
(!(
""
.
equals
(
apiGroupPromotionType
))
&&
StringUtils
.
isBlank
(
apiGroupCode
))
{
if
(!(
""
.
equals
(
apiGroupPromotionType
))
&&
StringUtils
.
isBlank
(
apiGroupCode
))
{
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectTwoApiGroups
(
apiGroupPromotionType
);
return
ocpApiGroups
;
}
else
if
(!(
""
.
equals
(
apiGroupPromotionType
))
&&
!(
StringUtils
.
isBlank
(
apiGroupCode
)))
{
}
else
if
(!(
""
.
equals
(
apiGroupPromotionType
))
&&
!(
StringUtils
.
isBlank
(
apiGroupCode
)))
{
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectThreeApiGroupsList
(
apiGroupPromotionType
,
apiGroupCode
);
return
ocpApiGroups
;
}
...
...
@@ -61,35 +63,35 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
* @param
*/
@Override
public
boolean
insertTree
(
OcpApiGroup
ocpApiGroup
)
{
public
OcpApiGroup
insertTree
(
OcpApiGroup
ocpApiGroup
)
{
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
String
code
=
RandomStringUtils
.
getRandomString
(
6
);
boolean
flag
=
true
;
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectList
(
null
);
Stream
<
OcpApiGroup
>
ocpApiGroupStream
=
ocpApiGroups
.
stream
().
filter
(
item
->
item
.
getApiGroupCode
().
equals
(
ocpApiGroup
.
getApiGroupPcode
()));
Stream
<
OcpApiGroup
>
apiGroupStream1
=
ocpApiGroupStream
.
filter
(
ocp
->
ocp
.
getApiGroupName
().
equals
(
ocpApiGroup
.
getApiGroupName
()));
if
(!(
apiGroupStream1
.
isParallel
())){
OcpApiGroup
ocpApi
=
new
OcpApiGroup
();
BeanUtils
.
copyProperties
(
ocpApiGroup
,
ocpApi
);
if
(!(
StringUtils
.
isBlank
(
apiGroupStream1
.
toString
())))
{
ocpApi
.
setApiGroupPromotionType
(
ocpApiGroup
.
getApiGroupPromotionType
());
BeanUtils
.
copyProperties
(
ocpApiGroup
,
ocpApi
);
ocpApi
.
setObjId
(
""
);
ocpApi
.
setApiGroupMtime
(
timestamp
);
ocpApi
.
setApiGroupCtime
(
timestamp
);
ocpApi
.
setApiGroupPcode
(
ocpApiGroup
.
getApiGroupCode
());
ocpApi
.
setApiGroupCode
(
code
);
if
(
ocpApiGroup
.
getApiGroupLevel
().
equals
(
"Middleground"
)){
ocpApi
.
setApiGroupPromotionType
(
ocpApiGroup
.
getApiGroupPromotionType
());
if
(
"Middleground"
.
equals
(
ocpApiGroup
.
getApiGroupLevel
()))
{
ocpApiGroup
.
setApiGroupLevel
(
"sys_center"
);
}
if
(
ocpApiGroup
.
getApiGroupLevel
().
equals
(
"sys_center"
))
{
if
(
"sys_center"
.
equals
(
ocpApiGroup
.
getApiGroupLevel
()))
{
ocpApiGroup
.
setApiGroupLevel
(
"api_group"
);
}
mapper
.
insert
(
ocpApi
);
}
else
{
return
false
;
}
else
{
return
ocpApi
;
}
return
flag
;
return
ocpApi
;
}
...
...
@@ -125,16 +127,19 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
@Override
public
boolean
deleteOcpTree
(
OcpApiGroup
ocpApiGroup
)
{
boolean
flag
=
true
;
LambdaQueryWrapper
<
OcpApiGroup
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
OcpApiGroup:
:
getApiGroupCode
,
ocpApiGroup
.
getApiGroupCode
());
String
objId
=
ocpApiGroup
.
getObjId
();
OcpApiGroup
ocpApiGroup1
=
mapper
.
selectById
(
objId
);
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectList
(
null
);
for
(
OcpApiGroup
apiGroup
:
ocpApiGroups
)
{
if
((
ocpApiGroup1
.
getApiGroupCode
()).
equals
(
apiGroup
.
getApiGroupPcode
())){
if
(
StringUtils
.
isBlank
(
ocpApiGroup
.
getApiGroupCode
()))
{
flag
=
false
;
}
else
{
LambdaQueryWrapper
<
OcpApiGroup
>
eq
=
queryWrapper
.
eq
(
OcpApiGroup:
:
getApiGroupPcode
,
ocpApiGroup
.
getApiGroupCode
());
if
(
StringUtils
.
isBlank
(
eq
.
toString
()))
{
flag
=
false
;
break
;
}
}
if
(
flag
){
if
(
flag
)
{
mapper
.
deleteById
(
objId
);
}
return
flag
;
...
...
@@ -149,17 +154,27 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
*/
@Override
public
Page
<
OcpApiGroup
>
getOnePages
(
PageGroupDto
pageGroupDto
)
{
Page
pageInfo
=
new
Page
(
pageGroupDto
.
getPageNum
(),
pageGroupDto
.
getPageSize
());
if
(
StringUtils
.
isBlank
(
pageGroupDto
.
getApiGroupCode
())){
LambdaQueryWrapper
<
OcpApiGroup
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
OcpApiGroup:
:
getApiGroupPromotionType
,
pageGroupDto
.
getApiGroupPromotionType
());
pageInfo
=
mapper
.
selectPage
(
pageInfo
,
lambdaQueryWrapper
);
}
else
if
(!(
StringUtils
.
isBlank
(
pageGroupDto
.
getApiGroupCode
()))){
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectLists
(
pageGroupDto
.
getApiGroupPromotionType
(),
pageGroupDto
.
getApiGroupCode
(),
pageGroupDto
.
getApiGroupLevel
());
LambdaQueryWrapper
<
OcpApiGroup
>
qw
=
new
LambdaQueryWrapper
<>();
if
(!(
""
.
equals
(
pageGroupDto
.
getKeyword
())))
{
if
(
StringUtils
.
isBlank
(
pageGroupDto
.
getApiGroupLevel
()))
{
qw
.
eq
(
OcpApiGroup:
:
getApiGroupPromotionType
,
pageGroupDto
.
getApiGroupPromotionType
());
mapper
.
selectPage
(
pageInfo
,
qw
);
}
else
if
(
"Middleground"
.
equals
(
pageGroupDto
.
getApiGroupLevel
())
||
"sys_center"
.
equals
(
pageGroupDto
.
getApiGroupLevel
())
||
"api_group"
.
equals
(
pageGroupDto
.
getApiGroupLevel
()))
{
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectLists
(
pageGroupDto
.
getApiGroupPromotionType
(),
pageGroupDto
.
getApiGroupCode
());
pageInfo
.
setRecords
(
ocpApiGroups
);
pageInfo
=
mapper
.
selectPage
(
pageInfo
,
null
);
pageInfo
.
setTotal
(
ocpApiGroups
.
size
());
}
}
else
{
LambdaQueryWrapper
<
OcpApiGroup
>
ocpTenantGroupLambdaQueryWrapper
=
qw
.
and
(
c
->
c
.
like
(
OcpApiGroup:
:
getApiGroupName
,
pageGroupDto
.
getKeyword
()))
.
or
().
like
(
OcpApiGroup:
:
getApiGroupUserName
,
pageGroupDto
.
getKeyword
())
.
or
().
like
(
OcpApiGroup:
:
getApiGroupPcode
,
pageGroupDto
.
getKeyword
());
mapper
.
selectPage
(
pageInfo
,
ocpTenantGroupLambdaQueryWrapper
);
}
return
pageInfo
;
}
}
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
View file @
3ef7314e
...
...
@@ -86,8 +86,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
if
(
tenanBaseDto
.
getTenantGroupLevel
().
equals
(
"sys_center"
)){
group
.
setTenantGroupLevel
(
"api_group"
);
}
group
.
setClassIfy
(
tenanBaseDto
.
getTenantGroupCompanyCode
());
//判断是否含有相同的分类名称
if
(
falg
)
{
...
...
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