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
230a60dd
Commit
230a60dd
authored
Mar 12, 2022
by
itcast
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务库服务基础管理接口-修改版
parent
8c40c2ac
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
8 deletions
+65
-8
src/main/java/com/pms/ocp/controller/TenantBasicManagementController.java
...m/pms/ocp/controller/TenantBasicManagementController.java
+16
-8
src/main/java/com/pms/ocp/mapper/OcpTenantGroupMapper.java
src/main/java/com/pms/ocp/mapper/OcpTenantGroupMapper.java
+4
-0
src/main/java/com/pms/ocp/service/TenantBasicManagementService.java
...ava/com/pms/ocp/service/TenantBasicManagementService.java
+10
-0
src/main/java/com/pms/ocp/service/impl/TenantBasicManagementServiceImpl.java
...ms/ocp/service/impl/TenantBasicManagementServiceImpl.java
+16
-0
src/main/resources/mapper/OcpGroup.xml
src/main/resources/mapper/OcpGroup.xml
+19
-0
No files found.
src/main/java/com/pms/ocp/controller/TenantBasicManagementController.java
View file @
230a60dd
...
...
@@ -3,6 +3,8 @@ package com.pms.ocp.controller;
import
com.pms.ocp.model.dto.OcpApiBaseDto
;
import
com.pms.ocp.model.dto.OcpTenantBaseDto
;
import
com.pms.ocp.model.dto.OcpTenantGroupDto
;
import
com.pms.ocp.model.entity.OcpApiGroup
;
import
com.pms.ocp.model.entity.OcpTenantGroup
;
import
com.pms.ocp.model.vo.ResponseVO
;
import
com.pms.ocp.service.TenantBasicManagementService
;
import
com.pms.ocp.service.TenantService
;
...
...
@@ -47,23 +49,23 @@ public class TenantBasicManagementController {
@PostMapping
(
"/issue"
)
public
ResponseVO
TenantIssue
(
@RequestParam
(
required
=
false
)
String
tenantPromotion
,
@RequestParam
(
required
=
false
)
String
tenantCodes
)
{
if
(
StringUtils
.
isEmpty
(
tenantPromotion
)
||
tenantPromotion
.
equals
(
"0"
))
{
return
ResponseVO
.
error
(
"统招"
);
}
else
{
//
if (StringUtils.isEmpty(tenantPromotion) || tenantPromotion.equals("0")) {
//
return ResponseVO.error("统招");
//
} else {
return
tenantBasicManagementService
.
tenantIssue
(
tenantCodes
);
}
//
}
}
@ApiOperation
(
"应用订阅"
)
@PostMapping
(
"/login"
)
public
ResponseVO
TenantLogin
(
@RequestParam
(
required
=
false
)
String
tenantPromotion
,
@RequestParam
(
required
=
false
)
String
tenantCodes
)
{
if
(
StringUtils
.
isEmpty
(
tenantPromotion
)
||
tenantPromotion
.
equals
(
"0"
))
{
return
ResponseVO
.
error
(
"统招"
);
}
else
{
//
if (StringUtils.isEmpty(tenantPromotion) || tenantPromotion.equals("0")) {
//
return ResponseVO.error("统招");
//
} else {
tenantBasicManagementService
.
tenantLogin
(
tenantCodes
);
return
ResponseVO
.
ok
();
}
//
}
}
...
...
@@ -81,6 +83,12 @@ public class TenantBasicManagementController {
return
tenantBasicManagementService
.
applyRegister
(
ocpTenantBaseDto
);
}
@ApiOperation
(
"应用树层级"
)
@GetMapping
(
"/apiBaseTreeOther"
)
public
ResponseVO
<
List
<
OcpTenantGroup
>>
tenantBaseTreeOther
(
String
tenantGroupCode
,
String
tenantGroupPcode
)
{
List
<
OcpTenantGroup
>
ocpApiGroups
=
tenantBasicManagementService
.
tenantBaseTreeOther
(
tenantGroupCode
,
tenantGroupPcode
);
return
ResponseVO
.
ok
(
ocpApiGroups
);
}
}
src/main/java/com/pms/ocp/mapper/OcpTenantGroupMapper.java
View file @
230a60dd
...
...
@@ -4,7 +4,11 @@ package com.pms.ocp.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.pms.ocp.model.entity.OcpTenantGroup
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
OcpTenantGroupMapper
extends
BaseMapper
<
OcpTenantGroup
>
{
List
<
OcpTenantGroup
>
tenantBaseTreeOther
(
@Param
(
"tenantGroupCode"
)
String
tenantGroupCode
,
@Param
(
"tenantGroupPcode"
)
String
tenantGroupPcode
);
}
src/main/java/com/pms/ocp/service/TenantBasicManagementService.java
View file @
230a60dd
...
...
@@ -2,7 +2,9 @@ package com.pms.ocp.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.pms.ocp.model.dto.OcpTenantBaseDto
;
import
com.pms.ocp.model.entity.OcpApiGroup
;
import
com.pms.ocp.model.entity.OcpTenantBase
;
import
com.pms.ocp.model.entity.OcpTenantGroup
;
import
com.pms.ocp.model.vo.ResponseVO
;
import
java.sql.Timestamp
;
...
...
@@ -46,4 +48,12 @@ public interface TenantBasicManagementService extends IService<OcpTenantBase> {
* @param ocpTenantBaseDto
*/
ResponseVO
applyRegister
(
OcpTenantBaseDto
ocpTenantBaseDto
);
/**
* 应用树层级
* @param tenantGroupCode
* @param tenantGroupPcode
* @return
*/
List
<
OcpTenantGroup
>
tenantBaseTreeOther
(
String
tenantGroupCode
,
String
tenantGroupPcode
);
}
src/main/java/com/pms/ocp/service/impl/TenantBasicManagementServiceImpl.java
View file @
230a60dd
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pms.ocp.mapper.OcpTenantExtentMapper
;
import
com.pms.ocp.mapper.OcpTenantGroupMapper
;
import
com.pms.ocp.mapper.TenantBasicManagementMapper
;
import
com.pms.ocp.model.dto.OcpApiBaseDto
;
import
com.pms.ocp.model.dto.OcpTenantBaseDto
;
...
...
@@ -33,6 +34,8 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
private
OcpApiTenantRelService
ocpApiTenantRelService
;
@Autowired
private
OcpTenantGroupService
ocpTenantGroupService
;
@Autowired
private
OcpTenantGroupMapper
ocpTenantGroupMapper
;
/**
* 条件查询
...
...
@@ -172,4 +175,17 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
return
ResponseVO
.
ok
();
}
/**
* 应用树层级
*
* @param tenantGroupCode
* @param tenantGroupPcode
* @return
*/
@Override
public
List
<
OcpTenantGroup
>
tenantBaseTreeOther
(
String
tenantGroupCode
,
String
tenantGroupPcode
)
{
List
<
OcpTenantGroup
>
ocpTenantGroups
=
ocpTenantGroupMapper
.
tenantBaseTreeOther
(
tenantGroupCode
,
tenantGroupPcode
);
return
ocpTenantGroups
;
}
}
src/main/resources/mapper/OcpGroup.xml
0 → 100644
View file @
230a60dd
<?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.OcpTenantGroupMapper"
>
<select
id=
"tenantBaseTreeOther"
resultType=
"com.pms.ocp.model.entity.OcpTenantGroup"
>
select tenant_group_code,tenant_group_name,tenant_group_pcode,tenant_group_level from ocp_tenant_group where
is_delete = 0
<if
test=
"tenantGroupPcode ==null"
>
and tenant_group_pcode is null
</if>
<if
test=
"tenantGroupPcode !=null and tenantGroupPcode !=''"
>
and tenant_group_pcode =#{tenantGroupPcode}
</if>
<if
test=
"tenantGroupCode !=null and tenantGroupCode!=''"
>
and tenant_group_code=#{tenantGroupCode}
</if>
</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