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
28eaa6e6
Commit
28eaa6e6
authored
Mar 14, 2022
by
胡秀武
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
08e51347
582cba34
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
281 additions
and
157 deletions
+281
-157
src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java
.../com/pms/ocp/controller/ApiBasicManagementController.java
+9
-3
src/main/java/com/pms/ocp/controller/ApiDetailsController.java
...ain/java/com/pms/ocp/controller/ApiDetailsController.java
+2
-2
src/main/java/com/pms/ocp/controller/OcpApiDetailsController.java
.../java/com/pms/ocp/controller/OcpApiDetailsController.java
+11
-5
src/main/java/com/pms/ocp/controller/OcpApiTreeController.java
...ain/java/com/pms/ocp/controller/OcpApiTreeController.java
+2
-2
src/main/java/com/pms/ocp/controller/OcpTenantDetailsController.java
...va/com/pms/ocp/controller/OcpTenantDetailsController.java
+11
-9
src/main/java/com/pms/ocp/mapper/ApiDetailsMapper.java
src/main/java/com/pms/ocp/mapper/ApiDetailsMapper.java
+1
-2
src/main/java/com/pms/ocp/mapper/OcpApiAuditMapper.java
src/main/java/com/pms/ocp/mapper/OcpApiAuditMapper.java
+2
-0
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
+4
-1
src/main/java/com/pms/ocp/mapper/OcpTenantAuditMapper.java
src/main/java/com/pms/ocp/mapper/OcpTenantAuditMapper.java
+2
-0
src/main/java/com/pms/ocp/model/entity/OcpApiGroup.java
src/main/java/com/pms/ocp/model/entity/OcpApiGroup.java
+1
-0
src/main/java/com/pms/ocp/model/entity/OcpTenantBase.java
src/main/java/com/pms/ocp/model/entity/OcpTenantBase.java
+95
-95
src/main/java/com/pms/ocp/service/ApiDetailsService.java
src/main/java/com/pms/ocp/service/ApiDetailsService.java
+2
-2
src/main/java/com/pms/ocp/service/OcpApiAuditService.java
src/main/java/com/pms/ocp/service/OcpApiAuditService.java
+2
-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/OcpTenantAuditService.java
src/main/java/com/pms/ocp/service/OcpTenantAuditService.java
+2
-0
src/main/java/com/pms/ocp/service/OcpTenantBaseService.java
src/main/java/com/pms/ocp/service/OcpTenantBaseService.java
+3
-0
src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
...m/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
+1
-1
src/main/java/com/pms/ocp/service/impl/ApiDetailsServiceImpl.java
.../java/com/pms/ocp/service/impl/ApiDetailsServiceImpl.java
+2
-2
src/main/java/com/pms/ocp/service/impl/OcpApiAuditServiceImpl.java
...java/com/pms/ocp/service/impl/OcpApiAuditServiceImpl.java
+6
-0
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
.../java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
+12
-20
src/main/java/com/pms/ocp/service/impl/OcpTenantAuditServiceImpl.java
...a/com/pms/ocp/service/impl/OcpTenantAuditServiceImpl.java
+9
-1
src/main/java/com/pms/ocp/service/impl/OcpTenantBaseServiceImpl.java
...va/com/pms/ocp/service/impl/OcpTenantBaseServiceImpl.java
+13
-0
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
...main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
+0
-3
src/main/resources/mapper/ApiDetailsMapper.xml
src/main/resources/mapper/ApiDetailsMapper.xml
+12
-2
src/main/resources/mapper/OcpApiAuditMapper.xml
src/main/resources/mapper/OcpApiAuditMapper.xml
+9
-1
src/main/resources/mapper/OcpApiTreeMapper.xml
src/main/resources/mapper/OcpApiTreeMapper.xml
+13
-4
src/main/resources/mapper/OcpTenantAuditMapper.xml
src/main/resources/mapper/OcpTenantAuditMapper.xml
+8
-1
src/main/resources/mapper/OcpTenantGroup.xml
src/main/resources/mapper/OcpTenantGroup.xml
+46
-0
No files found.
src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java
View file @
28eaa6e6
...
...
@@ -194,18 +194,24 @@ public class ApiBasicManagementController {
return
apiBasicManagementService
.
getBaseByGroupCode
(
ApiBaseReq
);
}
@ApiOperation
(
"服务树一级"
)
/*
@ApiOperation("服务树一级")
@GetMapping("/apiBaseTree")
public ResponseVO<List<OcpApiGroup>> apiBaseTree(String apiGroupCompanyCode, Integer apiGroupPromotionType) {
List<OcpApiGroup> apiTreeGroupDtos = apiBasicManagementService.apiBaseTreeOther(apiGroupCompanyCode,null,apiGroupPromotionType);
return ResponseVO.ok(apiTreeGroupDtos);
}
}
*/
@ApiOperation
(
"服务
树
层级"
)
@ApiOperation
(
"服务
分类
层级"
)
@GetMapping
(
"/apiBaseTreeOther"
)
public
ResponseVO
<
List
<
OcpApiGroup
>>
apiBaseTreeOther
(
String
apiGroupCompanyCode
,
String
apiGroupCode
,
Integer
apiGroupPromotionType
)
{
List
<
OcpApiGroup
>
apiTreeGroupDtos
=
apiBasicManagementService
.
apiBaseTreeOther
(
apiGroupCompanyCode
,
apiGroupCode
,
apiGroupPromotionType
);
return
ResponseVO
.
ok
(
apiTreeGroupDtos
);
}
@ApiOperation
(
"服务树列表"
)
@GetMapping
(
"/apiBaseTreeList"
)
public
ResponseVO
<
List
<
OcpApiBase
>>
apiBaseTreeList
(
String
apiGroupCompanyCode
,
String
apiGroupCode
)
{
List
<
OcpApiBase
>
apiBaseList
=
apiBasicManagementService
.
apiBaseTreeApiList
(
apiGroupCompanyCode
,
apiGroupCode
);
return
ResponseVO
.
ok
(
apiBaseList
);
}
}
src/main/java/com/pms/ocp/controller/ApiDetailsController.java
View file @
28eaa6e6
...
...
@@ -24,8 +24,8 @@ public class ApiDetailsController {
@ApiOperation
(
"服务库服务详情-查询"
)
@GetMapping
(
"/query"
)
public
ResponseVO
<
OcpApiBase
>
getApiDetails
(
String
objId
)
{
return
apiDetailsService
.
getApiDetails
(
objId
);
public
ResponseVO
<
OcpApiBase
>
getApiDetails
(
String
code
)
{
return
apiDetailsService
.
getApiDetails
(
code
);
}
}
src/main/java/com/pms/ocp/controller/OcpApiDetailsController.java
View file @
28eaa6e6
...
...
@@ -46,11 +46,11 @@ public class OcpApiDetailsController {
return
ocpApiAuditService
.
getOcpApiAuditList
(
ocpApiAudit
);
}
@ApiOperation
(
"服务大事记-查询详情"
)
@PostMapping
(
"/getocpapidetails"
)
public
ResponseVO
<
List
<
OcpApiAudit
>>
getOcpApiDetails
(
@RequestBody
OcpApiAudit
ocpApiAudit
){
return
ocpApiAuditService
.
sById
(
ocpApiAudit
);
}
//
@ApiOperation("服务大事记-查询详情")
//
@PostMapping("/getocpapidetails")
//
public ResponseVO<List<OcpApiAudit>> getOcpApiDetails(@RequestBody OcpApiAudit ocpApiAudit){
//
return ocpApiAuditService.sById(ocpApiAudit);
//
}
@ApiOperation
(
"服务大事记-查询详情-变更内容"
)
@PostMapping
(
"/getocpapi"
)
...
...
@@ -58,6 +58,12 @@ public class OcpApiDetailsController {
return
ocpApiAuditService
.
OaaById
(
ocpApiAudit
);
}
@ApiOperation
(
"服务大事记-历史版本"
)
@PostMapping
(
"/versionid"
)
public
ResponseVO
<
List
<
OcpApiAudit
>>
versionId
(
@RequestBody
OcpApiAudit
ocpApiAudit
){
return
ocpApiAuditService
.
versionId
(
ocpApiAudit
);
}
@ApiOperation
(
"服务与应用拓扑图-查询"
)
@PostMapping
(
"/getoatrlist"
)
public
ResponseVO
<
List
<
OcpApiTenantRel
>>
getOatrList
(
@RequestBody
OcpApiTenantRel
ocpApiTenantRel
)
{
...
...
src/main/java/com/pms/ocp/controller/OcpApiTreeController.java
View file @
28eaa6e6
...
...
@@ -42,8 +42,8 @@ public class OcpApiTreeController {
@PostMapping
(
"/instertree"
)
@ApiOperation
(
"服务树分类--新增"
)
public
ResponseVO
inseter
(
@RequestBody
OcpApiGroup
Dtos
ocpApiGroupDtos
){
boolean
flag
=
service
.
insertTree
(
ocpApiGroup
Dtos
);
public
ResponseVO
inseter
(
@RequestBody
OcpApiGroup
ocpApiGroup
){
boolean
flag
=
service
.
insertTree
(
ocpApiGroup
);
if
(
flag
){
return
ResponseVO
.
ok
();
}
...
...
src/main/java/com/pms/ocp/controller/OcpTenantDetailsController.java
View file @
28eaa6e6
...
...
@@ -10,13 +10,12 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.xml.transform.Result
;
import
java.util.List
;
@Slf4j
...
...
@@ -50,11 +49,6 @@ public class OcpTenantDetailsController {
return
ocpTenantAuditService
.
getOtaList
(
ocpTenantAudit
);
}
@ApiOperation
(
"应用大事记-查询详情"
)
@PostMapping
(
"/getotaListById"
)
public
ResponseVO
<
List
<
OcpApiAudit
>>
getOtaListById
(
@RequestBody
OcpTenantAudit
ocpTenantAudit
)
{
return
ocpTenantAuditService
.
getOtaListById
(
ocpTenantAudit
);
}
@ApiOperation
(
"应用订阅记录-查询"
)
@PostMapping
(
"/getOcpTenantList"
)
...
...
@@ -78,4 +72,12 @@ public class OcpTenantDetailsController {
public
ResponseVO
<
List
<
OcpTenantAudit
>>
getOcpTenant
(
@RequestBody
OcpTenantAudit
ocpTenantAudit
){
return
ocpTenantAuditService
.
OtaById
(
ocpTenantAudit
);
}
@ApiOperation
(
"应用大事记-查询详情-历史版本"
)
@PostMapping
(
"/versionId"
)
public
ResponseVO
<
List
<
OcpTenantAudit
>>
versionId
(
@RequestBody
OcpTenantAudit
ocpTenantAudit
){
return
ocpTenantAuditService
.
versionId
(
ocpTenantAudit
);
}
}
src/main/java/com/pms/ocp/mapper/ApiDetailsMapper.java
View file @
28eaa6e6
...
...
@@ -11,6 +11,5 @@ import java.util.List;
@Mapper
public
interface
ApiDetailsMapper
extends
BaseMapper
<
OcpApiBase
>
{
OcpApiBaseVo
selectByCode
(
String
code
);
}
src/main/java/com/pms/ocp/mapper/OcpApiAuditMapper.java
View file @
28eaa6e6
...
...
@@ -20,4 +20,6 @@ public interface OcpApiAuditMapper extends BaseMapper<OcpApiAudit> {
List
<
OcpApiAudit
>
sById
(
OcpApiAudit
ocpApiAudit
);
List
<
OcpApiAudit
>
versionId
(
OcpApiAudit
ocpApiAudit
);
}
src/main/java/com/pms/ocp/mapper/OcpApiTreeMapper.java
View file @
28eaa6e6
...
...
@@ -32,5 +32,8 @@ public interface OcpApiTreeMapper extends BaseMapper<OcpApiGroup> {
List
<
OcpApiGroup
>
selectThreeApiGroupsList
(
Long
apiGroupPromotionType
,
String
apiGroupCode
);
List
<
OcpApiGroup
>
selectList
(
Long
apiGroupPromotionType
,
String
apiGroupCode
,
Long
apiGroupLevel
);
List
<
OcpApiGroup
>
selectLists
(
Long
apiGroupPromotionType
,
String
apiGroupCode
,
Long
apiGroupLevel
);
//code重复问题
List
<
OcpApiGroup
>
selectGroupCode
();
}
src/main/java/com/pms/ocp/mapper/OcpTenantAuditMapper.java
View file @
28eaa6e6
...
...
@@ -11,4 +11,6 @@ public interface OcpTenantAuditMapper extends BaseMapper<OcpTenantAudit> {
List
<
OcpTenantAudit
>
getOtaListById
(
OcpTenantAudit
ocpTenantAudit
);
List
<
OcpTenantAudit
>
OtaById
(
OcpTenantAudit
ocpTenantAudit
);
List
<
OcpTenantAudit
>
versionId
(
OcpTenantAudit
ocpTenantAudit
);
}
src/main/java/com/pms/ocp/model/entity/OcpApiGroup.java
View file @
28eaa6e6
...
...
@@ -16,6 +16,7 @@ import java.util.List;
@TableName
(
"ocp_api_group"
)
@ApiModel
(
"服务分类表"
)
public
class
OcpApiGroup
{
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
"主键ID"
)
private
String
objId
;
...
...
src/main/java/com/pms/ocp/model/entity/OcpTenantBase.java
View file @
28eaa6e6
...
...
@@ -447,99 +447,99 @@ public class OcpTenantBase implements Serializable {
public
void
setTenantVersion
(
String
tenantVersion
)
{
this
.
tenantVersion
=
tenantVersion
;
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
OcpTenantBase
other
=
(
OcpTenantBase
)
that
;
return
(
this
.
getObjId
()
==
null
?
other
.
getObjId
()
==
null
:
this
.
getObjId
().
equals
(
other
.
getObjId
()))
&&
(
this
.
getTenantName
()
==
null
?
other
.
getTenantName
()
==
null
:
this
.
getTenantName
().
equals
(
other
.
getTenantName
()))
&&
(
this
.
getTenantCode
()
==
null
?
other
.
getTenantCode
()
==
null
:
this
.
getTenantCode
().
equals
(
other
.
getTenantCode
()))
&&
(
this
.
getTenantGroupCode
()
==
null
?
other
.
getTenantGroupCode
()
==
null
:
this
.
getTenantGroupCode
().
equals
(
other
.
getTenantGroupCode
()))
&&
(
this
.
getTenantIp
()
==
null
?
other
.
getTenantIp
()
==
null
:
this
.
getTenantIp
().
equals
(
other
.
getTenantIp
()))
&&
(
this
.
getTenantUrl
()
==
null
?
other
.
getTenantUrl
()
==
null
:
this
.
getTenantUrl
().
equals
(
other
.
getTenantUrl
()))
&&
(
this
.
getProfessionalKind
()
==
null
?
other
.
getProfessionalKind
()
==
null
:
this
.
getProfessionalKind
().
equals
(
other
.
getProfessionalKind
()))
&&
(
this
.
getTenantUserId
()
==
null
?
other
.
getTenantUserId
()
==
null
:
this
.
getTenantUserId
().
equals
(
other
.
getTenantUserId
()))
&&
(
this
.
getTenantOrderNo
()
==
null
?
other
.
getTenantOrderNo
()
==
null
:
this
.
getTenantOrderNo
().
equals
(
other
.
getTenantOrderNo
()))
&&
(
this
.
getTenantCtime
()
==
null
?
other
.
getTenantCtime
()
==
null
:
this
.
getTenantCtime
().
equals
(
other
.
getTenantCtime
()))
&&
(
this
.
getTenantMtime
()
==
null
?
other
.
getTenantMtime
()
==
null
:
this
.
getTenantMtime
().
equals
(
other
.
getTenantMtime
()))
&&
(
this
.
getDeploymentName
()
==
null
?
other
.
getDeploymentName
()
==
null
:
this
.
getDeploymentName
().
equals
(
other
.
getDeploymentName
()))
&&
(
this
.
getTenantDescription
()
==
null
?
other
.
getTenantDescription
()
==
null
:
this
.
getTenantDescription
().
equals
(
other
.
getTenantDescription
()))
&&
(
this
.
getTenantState
()
==
null
?
other
.
getTenantState
()
==
null
:
this
.
getTenantState
().
equals
(
other
.
getTenantState
()))
&&
(
this
.
getTenantUnit
()
==
null
?
other
.
getTenantUnit
()
==
null
:
this
.
getTenantUnit
().
equals
(
other
.
getTenantUnit
()))
&&
(
this
.
getOwnerCompanyCode
()
==
null
?
other
.
getOwnerCompanyCode
()
==
null
:
this
.
getOwnerCompanyCode
().
equals
(
other
.
getOwnerCompanyCode
()))
&&
(
this
.
getOwnerCompanyName
()
==
null
?
other
.
getOwnerCompanyName
()
==
null
:
this
.
getOwnerCompanyName
().
equals
(
other
.
getOwnerCompanyName
()))
&&
(
this
.
getIsDelete
()
==
null
?
other
.
getIsDelete
()
==
null
:
this
.
getIsDelete
().
equals
(
other
.
getIsDelete
()))
&&
(
this
.
getTenantZone
()
==
null
?
other
.
getTenantZone
()
==
null
:
this
.
getTenantZone
().
equals
(
other
.
getTenantZone
()))
&&
(
this
.
getTenantLayer
()
==
null
?
other
.
getTenantLayer
()
==
null
:
this
.
getTenantLayer
().
equals
(
other
.
getTenantLayer
()))
&&
(
this
.
getTenantVersion
()
==
null
?
other
.
getTenantVersion
()
==
null
:
this
.
getTenantVersion
().
equals
(
other
.
getTenantVersion
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getObjId
()
==
null
)
?
0
:
getObjId
().
hashCode
());
result
=
prime
*
result
+
((
getTenantName
()
==
null
)
?
0
:
getTenantName
().
hashCode
());
result
=
prime
*
result
+
((
getTenantCode
()
==
null
)
?
0
:
getTenantCode
().
hashCode
());
result
=
prime
*
result
+
((
getTenantGroupCode
()
==
null
)
?
0
:
getTenantGroupCode
().
hashCode
());
result
=
prime
*
result
+
((
getTenantIp
()
==
null
)
?
0
:
getTenantIp
().
hashCode
());
result
=
prime
*
result
+
((
getTenantUrl
()
==
null
)
?
0
:
getTenantUrl
().
hashCode
());
result
=
prime
*
result
+
((
getProfessionalKind
()
==
null
)
?
0
:
getProfessionalKind
().
hashCode
());
result
=
prime
*
result
+
((
getTenantUserId
()
==
null
)
?
0
:
getTenantUserId
().
hashCode
());
result
=
prime
*
result
+
((
getTenantOrderNo
()
==
null
)
?
0
:
getTenantOrderNo
().
hashCode
());
result
=
prime
*
result
+
((
getTenantCtime
()
==
null
)
?
0
:
getTenantCtime
().
hashCode
());
result
=
prime
*
result
+
((
getTenantMtime
()
==
null
)
?
0
:
getTenantMtime
().
hashCode
());
result
=
prime
*
result
+
((
getDeploymentName
()
==
null
)
?
0
:
getDeploymentName
().
hashCode
());
result
=
prime
*
result
+
((
getTenantDescription
()
==
null
)
?
0
:
getTenantDescription
().
hashCode
());
result
=
prime
*
result
+
((
getTenantState
()
==
null
)
?
0
:
getTenantState
().
hashCode
());
result
=
prime
*
result
+
((
getTenantUnit
()
==
null
)
?
0
:
getTenantUnit
().
hashCode
());
result
=
prime
*
result
+
((
getOwnerCompanyCode
()
==
null
)
?
0
:
getOwnerCompanyCode
().
hashCode
());
result
=
prime
*
result
+
((
getOwnerCompanyName
()
==
null
)
?
0
:
getOwnerCompanyName
().
hashCode
());
result
=
prime
*
result
+
((
getIsDelete
()
==
null
)
?
0
:
getIsDelete
().
hashCode
());
result
=
prime
*
result
+
((
getTenantZone
()
==
null
)
?
0
:
getTenantZone
().
hashCode
());
result
=
prime
*
result
+
((
getTenantLayer
()
==
null
)
?
0
:
getTenantLayer
().
hashCode
());
result
=
prime
*
result
+
((
getTenantVersion
()
==
null
)
?
0
:
getTenantVersion
().
hashCode
());
return
result
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", objId="
).
append
(
objId
);
sb
.
append
(
", tenantName="
).
append
(
tenantName
);
sb
.
append
(
", tenantCode="
).
append
(
tenantCode
);
sb
.
append
(
", tenantGroupCode="
).
append
(
tenantGroupCode
);
sb
.
append
(
", tenantIp="
).
append
(
tenantIp
);
sb
.
append
(
", tenantUrl="
).
append
(
tenantUrl
);
sb
.
append
(
", professionalKind="
).
append
(
professionalKind
);
sb
.
append
(
", tenantUserId="
).
append
(
tenantUserId
);
sb
.
append
(
", tenantOrderNo="
).
append
(
tenantOrderNo
);
sb
.
append
(
", tenantCtime="
).
append
(
tenantCtime
);
sb
.
append
(
", tenantMtime="
).
append
(
tenantMtime
);
sb
.
append
(
", deploymentName="
).
append
(
deploymentName
);
sb
.
append
(
", tenantDescription="
).
append
(
tenantDescription
);
sb
.
append
(
", tenantState="
).
append
(
tenantState
);
sb
.
append
(
", tenantUnit="
).
append
(
tenantUnit
);
sb
.
append
(
", ownerCompanyCode="
).
append
(
ownerCompanyCode
);
sb
.
append
(
", ownerCompanyName="
).
append
(
ownerCompanyName
);
sb
.
append
(
", isDelete="
).
append
(
isDelete
);
sb
.
append
(
", tenantZone="
).
append
(
tenantZone
);
sb
.
append
(
", tenantLayer="
).
append
(
tenantLayer
);
sb
.
append
(
", tenantVersion="
).
append
(
tenantVersion
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
//
//
@Override
//
public boolean equals(Object that) {
//
if (this == that) {
//
return true;
//
}
//
if (that == null) {
//
return false;
//
}
//
if (getClass() != that.getClass()) {
//
return false;
//
}
//
OcpTenantBase other = (OcpTenantBase) that;
//
return (this.getObjId() == null ? other.getObjId() == null : this.getObjId().equals(other.getObjId()))
//
&& (this.getTenantName() == null ? other.getTenantName() == null : this.getTenantName().equals(other.getTenantName()))
//
&& (this.getTenantCode() == null ? other.getTenantCode() == null : this.getTenantCode().equals(other.getTenantCode()))
//
&& (this.getTenantGroupCode() == null ? other.getTenantGroupCode() == null : this.getTenantGroupCode().equals(other.getTenantGroupCode()))
//
&& (this.getTenantIp() == null ? other.getTenantIp() == null : this.getTenantIp().equals(other.getTenantIp()))
//
&& (this.getTenantUrl() == null ? other.getTenantUrl() == null : this.getTenantUrl().equals(other.getTenantUrl()))
//
&& (this.getProfessionalKind() == null ? other.getProfessionalKind() == null : this.getProfessionalKind().equals(other.getProfessionalKind()))
//
&& (this.getTenantUserId() == null ? other.getTenantUserId() == null : this.getTenantUserId().equals(other.getTenantUserId()))
//
&& (this.getTenantOrderNo() == null ? other.getTenantOrderNo() == null : this.getTenantOrderNo().equals(other.getTenantOrderNo()))
//
&& (this.getTenantCtime() == null ? other.getTenantCtime() == null : this.getTenantCtime().equals(other.getTenantCtime()))
//
&& (this.getTenantMtime() == null ? other.getTenantMtime() == null : this.getTenantMtime().equals(other.getTenantMtime()))
//
&& (this.getDeploymentName() == null ? other.getDeploymentName() == null : this.getDeploymentName().equals(other.getDeploymentName()))
//
&& (this.getTenantDescription() == null ? other.getTenantDescription() == null : this.getTenantDescription().equals(other.getTenantDescription()))
//
&& (this.getTenantState() == null ? other.getTenantState() == null : this.getTenantState().equals(other.getTenantState()))
//
&& (this.getTenantUnit() == null ? other.getTenantUnit() == null : this.getTenantUnit().equals(other.getTenantUnit()))
//
&& (this.getOwnerCompanyCode() == null ? other.getOwnerCompanyCode() == null : this.getOwnerCompanyCode().equals(other.getOwnerCompanyCode()))
//
&& (this.getOwnerCompanyName() == null ? other.getOwnerCompanyName() == null : this.getOwnerCompanyName().equals(other.getOwnerCompanyName()))
//
&& (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
//
&& (this.getTenantZone() == null ? other.getTenantZone() == null : this.getTenantZone().equals(other.getTenantZone()))
//
&& (this.getTenantLayer() == null ? other.getTenantLayer() == null : this.getTenantLayer().equals(other.getTenantLayer()))
//
&& (this.getTenantVersion() == null ? other.getTenantVersion() == null : this.getTenantVersion().equals(other.getTenantVersion()));
//
}
//
//
@Override
//
public int hashCode() {
//
final int prime = 31;
//
int result = 1;
//
result = prime * result + ((getObjId() == null) ? 0 : getObjId().hashCode());
//
result = prime * result + ((getTenantName() == null) ? 0 : getTenantName().hashCode());
//
result = prime * result + ((getTenantCode() == null) ? 0 : getTenantCode().hashCode());
//
result = prime * result + ((getTenantGroupCode() == null) ? 0 : getTenantGroupCode().hashCode());
//
result = prime * result + ((getTenantIp() == null) ? 0 : getTenantIp().hashCode());
//
result = prime * result + ((getTenantUrl() == null) ? 0 : getTenantUrl().hashCode());
//
result = prime * result + ((getProfessionalKind() == null) ? 0 : getProfessionalKind().hashCode());
//
result = prime * result + ((getTenantUserId() == null) ? 0 : getTenantUserId().hashCode());
//
result = prime * result + ((getTenantOrderNo() == null) ? 0 : getTenantOrderNo().hashCode());
//
result = prime * result + ((getTenantCtime() == null) ? 0 : getTenantCtime().hashCode());
//
result = prime * result + ((getTenantMtime() == null) ? 0 : getTenantMtime().hashCode());
//
result = prime * result + ((getDeploymentName() == null) ? 0 : getDeploymentName().hashCode());
//
result = prime * result + ((getTenantDescription() == null) ? 0 : getTenantDescription().hashCode());
//
result = prime * result + ((getTenantState() == null) ? 0 : getTenantState().hashCode());
//
result = prime * result + ((getTenantUnit() == null) ? 0 : getTenantUnit().hashCode());
//
result = prime * result + ((getOwnerCompanyCode() == null) ? 0 : getOwnerCompanyCode().hashCode());
//
result = prime * result + ((getOwnerCompanyName() == null) ? 0 : getOwnerCompanyName().hashCode());
//
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
//
result = prime * result + ((getTenantZone() == null) ? 0 : getTenantZone().hashCode());
//
result = prime * result + ((getTenantLayer() == null) ? 0 : getTenantLayer().hashCode());
//
result = prime * result + ((getTenantVersion() == null) ? 0 : getTenantVersion().hashCode());
//
return result;
//
}
//
//
@Override
//
public String toString() {
//
StringBuilder sb = new StringBuilder();
//
sb.append(getClass().getSimpleName());
//
sb.append(" [");
//
sb.append("Hash = ").append(hashCode());
//
sb.append(", objId=").append(objId);
//
sb.append(", tenantName=").append(tenantName);
//
sb.append(", tenantCode=").append(tenantCode);
//
sb.append(", tenantGroupCode=").append(tenantGroupCode);
//
sb.append(", tenantIp=").append(tenantIp);
//
sb.append(", tenantUrl=").append(tenantUrl);
//
sb.append(", professionalKind=").append(professionalKind);
//
sb.append(", tenantUserId=").append(tenantUserId);
//
sb.append(", tenantOrderNo=").append(tenantOrderNo);
//
sb.append(", tenantCtime=").append(tenantCtime);
//
sb.append(", tenantMtime=").append(tenantMtime);
//
sb.append(", deploymentName=").append(deploymentName);
//
sb.append(", tenantDescription=").append(tenantDescription);
//
sb.append(", tenantState=").append(tenantState);
//
sb.append(", tenantUnit=").append(tenantUnit);
//
sb.append(", ownerCompanyCode=").append(ownerCompanyCode);
//
sb.append(", ownerCompanyName=").append(ownerCompanyName);
//
sb.append(", isDelete=").append(isDelete);
//
sb.append(", tenantZone=").append(tenantZone);
//
sb.append(", tenantLayer=").append(tenantLayer);
//
sb.append(", tenantVersion=").append(tenantVersion);
//
sb.append(", serialVersionUID=").append(serialVersionUID);
//
sb.append("]");
//
return sb.toString();
//
}
}
\ No newline at end of file
src/main/java/com/pms/ocp/service/ApiDetailsService.java
View file @
28eaa6e6
...
...
@@ -12,10 +12,10 @@ import java.util.List;
public
interface
ApiDetailsService
{
/**
*
* @param
objId
* @param
code
* @return
*/
ResponseVO
getApiDetails
(
String
objId
);
ResponseVO
getApiDetails
(
String
code
);
}
src/main/java/com/pms/ocp/service/OcpApiAuditService.java
View file @
28eaa6e6
...
...
@@ -18,4 +18,6 @@ public interface OcpApiAuditService extends IService<OcpApiAudit> {
ResponseVO
sById
(
OcpApiAudit
ocpApiAudit
);
void
exportExcel
(
OcpApiAudit
ocpApiAudit
,
HttpServletRequest
request
,
HttpServletResponse
response
);
ResponseVO
versionId
(
OcpApiAudit
ocpApiAudit
);
}
src/main/java/com/pms/ocp/service/OcpApiTreeService.java
View file @
28eaa6e6
...
...
@@ -21,7 +21,7 @@ public interface OcpApiTreeService extends IService<OcpApiGroup> {
/**
* 新增服务分类
*/
boolean
insertTree
(
OcpApiGroup
Dtos
ocpApiGroupDtos
);
boolean
insertTree
(
OcpApiGroup
ocpApiGroup
);
/*
...
...
src/main/java/com/pms/ocp/service/OcpTenantAuditService.java
View file @
28eaa6e6
...
...
@@ -16,4 +16,6 @@ public interface OcpTenantAuditService extends IService<OcpTenantAudit> {
void
exportExcel
(
OcpTenantAudit
ocpTenantAudit
,
HttpServletRequest
request
,
HttpServletResponse
response
);
ResponseVO
OtaById
(
OcpTenantAudit
ocpTenantAudit
);
ResponseVO
versionId
(
OcpTenantAudit
ocpTenantAudit
);
}
src/main/java/com/pms/ocp/service/OcpTenantBaseService.java
View file @
28eaa6e6
...
...
@@ -6,4 +6,7 @@ import com.pms.ocp.model.vo.ResponseVO;
public
interface
OcpTenantBaseService
extends
IService
<
OcpTenantBase
>
{
ResponseVO
getOtbList
(
OcpTenantBase
ocpTenantBase
);
}
src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
View file @
28eaa6e6
...
...
@@ -192,7 +192,7 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen
@Override
public
ResponseVO
<
PageInfo
<
OcpApiBaseVo
>>
getBaseByGroupCode
(
ApiBaseDto
apiBaseReq
)
{
if
(
apiBaseReq
.
getPageNum
()
==
null
||
apiBaseReq
.
getPageSize
()
==
null
)
{
ResponseVO
.
error
(
"分页参数不能为空"
);
return
ResponseVO
.
error
(
"分页参数不能为空"
);
}
apiGroupCode
.
add
(
apiBaseReq
.
getApiGroupCode
());
setGroupIdValue
(
apiBaseReq
.
getApiGroupCompanyCode
()
,
apiBaseReq
.
getApiGroupCode
(),
apiBaseReq
.
getApiPromotion
());
...
...
src/main/java/com/pms/ocp/service/impl/ApiDetailsServiceImpl.java
View file @
28eaa6e6
...
...
@@ -38,8 +38,8 @@ public class ApiDetailsServiceImpl implements ApiDetailsService {
@Override
public
ResponseVO
getApiDetails
(
String
objId
)
{
OcpApiBase
ocpApiBase
=
apiDetailsMapper
.
selectById
(
objId
);
public
ResponseVO
getApiDetails
(
String
code
)
{
OcpApiBase
Vo
ocpApiBase
=
apiDetailsMapper
.
selectByCode
(
code
);
return
ResponseVO
.
ok
(
ocpApiBase
);
}
...
...
src/main/java/com/pms/ocp/service/impl/OcpApiAuditServiceImpl.java
View file @
28eaa6e6
...
...
@@ -58,5 +58,11 @@ public class OcpApiAuditServiceImpl extends ServiceImpl<OcpApiAuditMapper,OcpApi
ExportUtils
.
exportExcel
(
response
,
AnalysisConstant
.
exportOcpApiAuditName
.
OCP_API_AUDIT
,
workbook
);
}
@Override
public
ResponseVO
versionId
(
OcpApiAudit
ocpApiAudit
)
{
List
<
OcpApiAudit
>
ocpApiAuditList
=
ocpApiAuditMapper
.
versionId
(
ocpApiAudit
);
return
ResponseVO
.
ok
(
ocpApiAuditList
);
}
}
src/main/java/com/pms/ocp/service/impl/OcpApiTreeServiceImpl.java
View file @
28eaa6e6
...
...
@@ -62,30 +62,19 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
/**
* 新增服务分类
*
* @param
ocpApiGroupDtos
* @param
*/
@Override
public
boolean
insertTree
(
OcpApiGroupDtos
ocpApiGroupDtos
)
{
public
boolean
insertTree
(
OcpApiGroup
ocpApiGroup
)
{
Timestamp
timestamp
=
new
Timestamp
(
System
.
currentTimeMillis
());
String
code
=
RandomStringUtils
.
getRandomString
(
6
);
boolean
flag
=
true
;
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectList
(
null
);
for
(
OcpApiGroup
ocpApiGroup
:
ocpApiGroups
)
{
if
(
ocpApiGroup
.
getApiGroupCode
().
equals
(
ocpApiGroupDtos
.
getApiGroupCode
()))
{
flag
=
false
;
break
;
}
}
if
(
flag
==
true
)
{
OcpApiGroup
ocpApiGroup1
=
new
OcpApiGroup
();
ocpApiGroup1
.
setObjId
(
""
);
ocpApiGroup1
.
setApiGroupMtime
(
timestamp
);
ocpApiGroup1
.
setApiGroupCtime
(
timestamp
);
BeanUtils
.
copyProperties
(
ocpApiGroupDtos
,
ocpApiGroup1
);
ocpApiGroup1
.
setApiGroupCode
(
code
);
mapper
.
insert
(
ocpApiGroup1
);
}
ocpApiGroup
.
setObjId
(
""
);
ocpApiGroup
.
setApiGroupMtime
(
timestamp
);
ocpApiGroup
.
setApiGroupCtime
(
timestamp
);
ocpApiGroup
.
setApiGroupPcode
(
ocpApiGroup
.
getApiGroupCode
());
ocpApiGroup
.
setApiGroupCode
(
code
);
mapper
.
insert
(
ocpApiGroup
);
return
flag
;
}
...
...
@@ -150,8 +139,11 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper,OcpApiGr
if
(
StringUtils
.
isBlank
(
pageGroupDto
.
getApiGroupCode
())){
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectTwoApiGroups
(
pageGroupDto
.
getApiGroupPromotionType
());
pageInfo
.
setRecords
(
ocpApiGroups
);
LambdaQueryWrapper
<
OcpApiGroup
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
OcpApiGroup:
:
getApiGroupPromotionType
,
pageGroupDto
.
getApiGroupPromotionType
());
mapper
.
selectPage
(
pageInfo
,
lambdaQueryWrapper
);
}
else
if
(!(
StringUtils
.
isBlank
(
pageGroupDto
.
getApiGroupCode
()))){
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectList
(
pageGroupDto
.
getApiGroupPromotionType
(),
pageGroupDto
.
getApiGroupCode
(),
pageGroupDto
.
getApiGroupLevel
());
List
<
OcpApiGroup
>
ocpApiGroups
=
mapper
.
selectList
s
(
pageGroupDto
.
getApiGroupPromotionType
(),
pageGroupDto
.
getApiGroupCode
(),
pageGroupDto
.
getApiGroupLevel
());
LambdaQueryWrapper
<
OcpApiGroup
>
lwq
=
new
LambdaQueryWrapper
<>();
pageInfo
.
setRecords
(
ocpApiGroups
);
mapper
.
selectPage
(
pageInfo
,
lwq
);
...
...
src/main/java/com/pms/ocp/service/impl/OcpTenantAuditServiceImpl.java
View file @
28eaa6e6
...
...
@@ -41,7 +41,7 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
@Override
public
void
exportExcel
(
OcpTenantAudit
ocpTenantAudit
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
OcpTenantAudit
>
otaListById
=
ocpTenantAuditMapper
.
getOtaListBy
Id
(
ocpTenantAudit
);
List
<
OcpTenantAudit
>
otaListById
=
ocpTenantAuditMapper
.
version
Id
(
ocpTenantAudit
);
ExportParams
param
=
new
ExportParams
(
AnalysisConstant
.
exportOcpTenantApiName
.
OCP_TENANT_API
,
AnalysisConstant
.
exportOcpTenantApiName
.
OCP_TENANT_API
);
Workbook
workbook
=
ExcelExportUtil
.
exportExcel
(
param
,
OcpTenantAudit
.
class
,
otaListById
);
ExportUtils
.
exportExcel
(
response
,
AnalysisConstant
.
exportOcpTenantApiName
.
OCP_TENANT_API
,
workbook
);
...
...
@@ -52,4 +52,12 @@ public class OcpTenantAuditServiceImpl extends ServiceImpl<OcpTenantAuditMapper,
List
<
OcpTenantAudit
>
oatrList
=
ocpTenantAuditMapper
.
OtaById
(
ocpTenantAudit
);
return
ResponseVO
.
ok
(
oatrList
);
}
@Override
public
ResponseVO
versionId
(
OcpTenantAudit
ocpTenantAudit
)
{
List
<
OcpTenantAudit
>
ocpTenantAudits
=
ocpTenantAuditMapper
.
versionId
(
ocpTenantAudit
);
return
ResponseVO
.
ok
(
ocpTenantAudits
);
}
}
src/main/java/com/pms/ocp/service/impl/OcpTenantBaseServiceImpl.java
View file @
28eaa6e6
package
com.pms.ocp.service.impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pms.ocp.common.constants.*
;
import
com.pms.ocp.common.exception.ServiceException
;
import
com.pms.ocp.mapper.OcpTenantBaseMapper
;
import
com.pms.ocp.model.entity.OcpTenantBase
;
import
com.pms.ocp.model.vo.ResponseVO
;
...
...
@@ -8,10 +10,16 @@ import com.pms.ocp.service.OcpTenantBaseService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.LinkedList
;
import
java.util.List
;
@Service
public
class
OcpTenantBaseServiceImpl
extends
ServiceImpl
<
OcpTenantBaseMapper
,
OcpTenantBase
>
implements
OcpTenantBaseService
{
@Autowired
private
OcpTenantBaseMapper
ocpTenantBaseMapper
;
@Override
...
...
@@ -19,4 +27,9 @@ public class OcpTenantBaseServiceImpl extends ServiceImpl<OcpTenantBaseMapper,Oc
List
<
OcpTenantBase
>
otbList
=
ocpTenantBaseMapper
.
getOtbList
(
ocpTenantBase
);
return
ResponseVO
.
ok
(
otbList
);
}
}
src/main/java/com/pms/ocp/service/impl/TenantServiceImpl.java
View file @
28eaa6e6
...
...
@@ -86,13 +86,10 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, OcpTenantGroup>
ocpTenantGroup
.
setTenantGroupVersion
(
"1.0"
);
}
OcpTenantBase
ocpTenantBase
=
new
OcpTenantBase
();
BeanUtils
.
copyProperties
(
tenanBaseDto
,
ocpTenantBase
);
if
(
"null"
.
equals
(
tenanBaseDto
.
getTenantGroupCode
())){
group
.
setTenantGroupCode
(
randomString
);
}
tenantMapper
.
insert
(
tenanBaseDto
);
tenantBasicMapper
.
insert
(
ocpTenantBase
);
return
falg
;
}
...
...
src/main/resources/mapper/ApiDetailsMapper.xml
View file @
28eaa6e6
...
...
@@ -2,6 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.pms.ocp.mapper.ApiDetailsMapper"
>
<select
id=
"oneTenantGroup"
resultType=
"com.pms.ocp.model.vo.OcpApiBaseVo"
>
select
oab.obj_id,oab.api_code,oae.api_code,oab.api_name,oae.cluster_name,
oae.space_name,oab.api_url,oae.api_state ,oab.api_unit ,oab.api_ctime from ocp_api_base oab
LEFT JOIN ocp_api_extent oae
on oab.api_code = oae.api_code
where oab.is_delete = 0
<if
test=
"code !=null and code!=''"
>
and oab.api_group_code = #{code}
</if>
</select>
</mapper>
src/main/resources/mapper/OcpApiAuditMapper.xml
View file @
28eaa6e6
...
...
@@ -6,7 +6,7 @@
select * from ocp_api_audit oaa
LEFT JOIN ocp_api_base oab
on oaa.api_code = oab.api_code
where oaa.
obj_id = #{objId
}
where oaa.
api_code = #{apiCode
}
</select>
<select
id=
"getOcpApiSubsList"
resultType=
"com.pms.ocp.model.entity.OcpApiAudit"
>
...
...
@@ -16,4 +16,12 @@
<select
id=
"sById"
resultType=
"com.pms.ocp.model.entity.OcpApiAudit"
>
select * from ocp_api_audit where obj_id = #{objId}
</select>
<select
id=
"versionId"
resultType=
"com.pms.ocp.model.entity.OcpApiAudit"
>
select * from ocp_api_audit oaa
LEFT JOIN ocp_api_base oab
on oaa.api_code = oab.api_code
where oaa.api_code = #{apiCode}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/OcpApiTreeMapper.xml
View file @
28eaa6e6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.pms.ocp.mapper.OcpApiTreeMapper"
>
<!-- 一级树-->
<!--
特
一级树-->
<select
id=
"selectApiGroups"
resultType=
"com.pms.ocp.model.entity.OcpApiGroup"
>
SELECT * FROM (select *,ROW_NUMBER() over(partition by api_group_promotion_type) as rn from ocp_api_group) as u where u.rn= 1;
</select>
<!--
二
级树-->
<!--
一
级树-->
<select
id=
"selectTwoApiGroups"
resultType=
"com.pms.ocp.model.entity.OcpApiGroup"
>
SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType};
SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType}
and api_group_level = '1'
;
</select>
<!--
三
级-->
<!--
二
级-->
<select
id=
"selectThreeApiGroupsList"
resultType=
"com.pms.ocp.model.entity.OcpApiGroup"
>
SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType} and api_group_pcode = #{apiGroupCode};
</select>
<!--服务树 -查询-->
<select
id=
"selectLists"
resultType=
"com.pms.ocp.model.entity.OcpApiGroup"
>
SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType} and api_group_pcode = #{apiGroupCode} and api_group_level = #{apiGroupLevel};
</select>
<!-- code值重复问题 -->
<select
id=
"selectGroupCode"
resultType=
"com.pms.ocp.model.entity.OcpApiGroup"
>
SELECT api_group_code FROM ocp_api_group;
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/OcpTenantAuditMapper.xml
View file @
28eaa6e6
...
...
@@ -13,6 +13,13 @@
select * from ocp_tenant_audit ota
LEFT JOIN ocp_tenant_base otb
on ota.tenant_code = otb.tenant_code
where ota.obj_id = #{objId}
where ota.tenant_code = #{tenantCode}
</select>
<select
id=
"versionId"
resultType=
"com.pms.ocp.model.entity.OcpTenantAudit"
>
select * from ocp_tenant_audit ota
LEFT JOIN ocp_tenant_base otb
on ota.tenant_code = otb.tenant_code
where ota.tenant_code = #{tenantCode}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/OcpTenantGroup.xml
View file @
28eaa6e6
...
...
@@ -26,5 +26,51 @@
SELECT * FROM ocp_tenant_group WHERE tenant_group_company_code = #{tenantGroupCompanyCode} and tenant_group_level = '1' ;
</select>
<!-- 模糊查询-->
<select
id=
"queryLike"
resultType=
"com.pms.ocp.model.entity.OcpTenantGroup"
>
select * from ocp_tenant_group
<where>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_code like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_name like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_company_code like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_pcode like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_type like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_version like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_order_no like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_user_id like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_user_name like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_ctime like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_mtime like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and is_delete like CONCAT('%', #{keyword}::text,'%')
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and tenant_group_level like CONCAT('%', #{keyword}::text,'%')
</if>
</where>
</select>
</mapper>
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