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
beb55d1a
Commit
beb55d1a
authored
Mar 26, 2022
by
郭凡凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
a0fae7fb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
107 deletions
+71
-107
src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java
.../com/pms/ocp/controller/ApiBasicManagementController.java
+1
-14
src/main/java/com/pms/ocp/mapper/ApiBasicManagementMapper.java
...ain/java/com/pms/ocp/mapper/ApiBasicManagementMapper.java
+1
-1
src/main/java/com/pms/ocp/service/ApiBasicManagementService.java
...n/java/com/pms/ocp/service/ApiBasicManagementService.java
+1
-10
src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
...m/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
+1
-15
src/main/resources/mapper/ApiBasicManagementMapper.xml
src/main/resources/mapper/ApiBasicManagementMapper.xml
+41
-41
src/main/resources/mapper/OcpApiGroupMapper.xml
src/main/resources/mapper/OcpApiGroupMapper.xml
+25
-25
src/main/resources/mapper/OcpGroup.xml
src/main/resources/mapper/OcpGroup.xml
+1
-1
No files found.
src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java
View file @
beb55d1a
...
...
@@ -43,20 +43,7 @@ public class ApiBasicManagementController {
@Autowired
private
ApiBasicManagementService
apiBasicManagementService
;
@ApiOperation
(
"条件查询"
)
@GetMapping
(
"/queryOcpApiBaseDto"
)
public
ResponseVO
<
List
<
OcpApiBaseVo
>>
queryOcpApiBaseDto
(
@RequestParam
(
required
=
false
)
String
apiCode
,
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
(
required
=
false
)
String
apiUnits
,
@RequestParam
(
required
=
false
)
Timestamp
startTime
,
@RequestParam
(
required
=
false
)
Timestamp
endTime
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
@RequestParam
(
required
=
false
)
Integer
pageNum
)
{
List
<
OcpApiBaseVo
>
list
=
apiBasicManagementService
.
queryOcpApiBaseDto
(
apiCode
,
keyword
,
apiUnits
,
startTime
,
endTime
,
pageSize
,
pageNum
);
return
ResponseVO
.
ok
(
list
);
}
@ApiOperation
(
"导入功能"
)
@PostMapping
(
"/import"
)
...
...
src/main/java/com/pms/ocp/mapper/ApiBasicManagementMapper.java
View file @
beb55d1a
...
...
@@ -16,7 +16,7 @@ import java.util.List;
public
interface
ApiBasicManagementMapper
extends
BaseMapper
<
OcpApiBase
>
{
List
<
OcpApiBaseVo
>
selectApiExport
(
List
<
String
>
list
);
List
<
OcpApiBaseVo
>
queryOcpApiBaseDto
(
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"apiUnit"
)
String
apiUnit
,
@Param
(
"startTime"
)
Timestamp
startTime
,
@Param
(
"endTime"
)
Timestamp
endTime
,
@Param
(
"apiCode"
)
String
apiCode
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"pageNum"
)
int
pageNum
);
List
<
OcpApiBase
>
selectByCondition
(
@Param
(
"apiCode"
)
String
apiCode
,
@Param
(
"apiName"
)
String
apiName
,
@Param
(
"apiCenterCode"
)
String
apiCenterCode
);
}
src/main/java/com/pms/ocp/service/ApiBasicManagementService.java
View file @
beb55d1a
...
...
@@ -37,16 +37,7 @@ public interface ApiBasicManagementService extends IService<OcpApiBase> {
*/
void
apiLogin
(
String
apiCodes
);
/**
* 条件查询
* @param apiCode
* @param keyword
* @param startTime
* @param endTime
* @return
*/
// OcpApiBaseDto queryOcpApiBaseDto(ApiBaseDto apiBaseDto);
List
<
OcpApiBaseVo
>
queryOcpApiBaseDto
(
String
apiCode
,
String
keyword
,
String
apiUnits
,
Timestamp
startTime
,
Timestamp
endTime
,
int
pageSize
,
int
pageNum
);
/**
* 导入的添加到数据库
* @param personList
...
...
src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java
View file @
beb55d1a
...
...
@@ -97,21 +97,7 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen
}
}
/**
* 条件查询
*
* @param apiCode
* @param keyword
* @param apiUnit
* @param startTime
* @param endTime
* @return
*/
@Override
public
List
<
OcpApiBaseVo
>
queryOcpApiBaseDto
(
String
apiCode
,
String
keyword
,
String
apiUnit
,
Timestamp
startTime
,
Timestamp
endTime
,
int
pageSize
,
int
pageNum
)
{
pageSize
=
(
pageSize
-
1
)
*
pageNum
;
return
apiBasicManagementMapper
.
queryOcpApiBaseDto
(
keyword
,
apiUnit
,
startTime
,
endTime
,
apiCode
,
pageSize
,
pageNum
);
}
/**
* 导入添加到数据库
...
...
src/main/resources/mapper/ApiBasicManagementMapper.xml
View file @
beb55d1a
...
...
@@ -27,47 +27,47 @@
</select>
<select
id=
"queryOcpApiBaseDto"
resultMap=
"oabMap"
>
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
join ocp_api_extent oae ON oae.api_code = oab.api_code
<where
>
<if
test=
"apiCode!=null and apiCode!=''"
>
and oab.api_code=#{apiCode}
</if
>
<if
test=
"apiCode!=null and apiCode!=''"
>
and oae.api_code=#{apiCode}
</if
>
<if
test=
"startTime !=null "
>
<![CDATA[
and oab.api_ctime >
= #{startTime}
]]
>
</if
>
<if
test=
"endTime !=null "
>
<![CDATA[
and oab.api_ctime <= #{endTime}
]]
>
</if
>
<if
test=
"keyword !=null and keyword != '' "
>
and oab.api_code like CONCAT('%', #{keyword}::text,'%')
</if
>
<if
test=
"keyword !=null and keyword != '' "
>
and oab.api_name like CONCAT('%', #{keyword}::text,'%')
</if
>
<if
test=
"apiUnit !=null and apiUnit!=''"
>
and oab.api_unit =#{apiUnit}
</if
>
<!-- <if test="list!=null">
-->
<!-- and oab.api_unit in
-->
<!-- <foreach collection="list" index="index" item="apiUnit" open="(" separator="," close=")">
-->
<!-- #{apiUnit}
-->
<!-- </foreach>
-->
<!-- </if>
-->
</where
>
limit #{pageNum} offset #{pageSize}
</select
>
<!-- <select id="queryOcpApiBaseDto" resultMap="oabMap">--
>
<!-- 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-->
<!-- join ocp_api_extent oae ON oae.api_code = oab.api_code-->
<!-- <where>--
>
<!-- <if test="apiCode!=null and apiCode!=''">--
>
<!-- and oab.api_code=#{apiCode}-->
<!-- </if>--
>
<!-- <if test="apiCode!=null and apiCode!=''">--
>
<!-- and oae.api_code=#{apiCode}-->
<!-- </if>--
>
<!-- <if test="startTime !=null ">--
>
<!-- <![CDATA[-->
<!-- and oab.api_ctime >= #{startTime}-->
<!-- ]]>--
>
<!-- </if>--
>
<!-- <if test="endTime !=null ">--
>
<!-- <![CDATA[-->
<!-- and oab.api_ctime <= #{endTime}-->
<!-- ]]>--
>
<!-- </if>--
>
<!-- <if test="keyword !=null and keyword != '' ">--
>
<!-- and oab.api_code like CONCAT('%', #{keyword}::text,'%')-->
<!-- </if>--
>
<!-- <if test="keyword !=null and keyword != '' ">--
>
<!-- and oab.api_name like CONCAT('%', #{keyword}::text,'%')-->
<!-- </if>--
>
<!-- <if test="apiUnit !=null and apiUnit!=''">--
>
<!-- and oab.api_unit =#{apiUnit}-->
<!-- </if>--
>
<!-- <!– <if test="list!=null">–>
-->
<!-- <!– and oab.api_unit in–>
-->
<!-- <!– <foreach collection="list" index="index" item="apiUnit" open="(" separator="," close=")">–>
-->
<!-- <!– #{apiUnit}–>
-->
<!-- <!– </foreach>–>
-->
<!-- <!– </if>–>
-->
<!-- </where>--
>
<!-- limit #{pageNum} offset #{pageSize}-->
<!-- </select>--
>
<select
id=
"selectByCondition"
resultType=
"com.pms.ocp.model.entity.OcpApiBase"
>
...
...
src/main/resources/mapper/OcpApiGroupMapper.xml
View file @
beb55d1a
...
...
@@ -54,7 +54,7 @@
select api_group_code,api_group_name,api_group_pcode,api_group_level from ocp_api_group where is_delete = 0
<if
test=
"apiGroupPcode == null"
>
and api_group_pcode is null
and api_group_pcode is null
or api_group_pcode =''
</if>
<if
test=
"apiGroupPcode!=null and apiGroupPcode!=''"
>
and api_group_pcode = #{apiGroupPcode}
...
...
@@ -75,34 +75,34 @@
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>
<if
test=
"apiGroupCodeList !=null "
>
and oab.api_group_code in
<foreach
item=
"apiGroupCode"
collection=
"apiGroupCodeList"
open=
"("
separator=
","
close=
")"
>
#{apiGroupCode}
</foreach>
</if>
<if
test=
"apiUnit !=null and apiUnit!=''"
>
and oab.api_unit = #{apiUnit}
</if>
<if
test=
"apiPromotion !=null and apiPromotion!=''"
>
and oab.api_promotion = #{apiPromotion}
</if>
<if
test=
"startCTime !=null "
>
<![CDATA[
<where>
<if
test=
"apiGroupCodeList !=null "
>
and oab.api_group_code in
<foreach
item=
"apiGroupCode"
collection=
"apiGroupCodeList"
open=
"("
separator=
","
close=
")"
>
#{apiGroupCode}
</foreach>
</if>
<if
test=
"apiUnit !=null and apiUnit!=''"
>
and oab.api_unit = #{apiUnit}
</if>
<if
test=
"apiPromotion !=null and apiPromotion!=''"
>
and oab.api_promotion = #{apiPromotion}
</if>
<if
test=
"startCTime !=null "
>
<![CDATA[
and oab.api_ctime >
= #{startCTime}
]]>
</if>
<if
test=
"endCTime !=null "
>
<![CDATA[
</if>
<if
test=
"endCTime !=null "
>
<![CDATA[
and oab.api_ctime <= #{endCTime}
]]>
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and oab.api_name like CONCAT('%', #{keyword}::text,'%')
</if>
</where>
</if>
<if
test=
"keyword !=null and keyword != '' "
>
and oab.api_name like CONCAT('%', #{keyword}::text,'%')
</if>
</where>
</select>
...
...
src/main/resources/mapper/OcpGroup.xml
View file @
beb55d1a
...
...
@@ -21,7 +21,7 @@
tenant_group_code,tenant_group_name,tenant_group_pcode ,tenant_group_level from ocp_tenant_group
where is_delete = 0
<if
test=
"tenantGroupCode == null"
>
and tenant_group_pcode is null
and tenant_group_pcode
= '' or tenant_group_pcode
is null
</if>
<if
test=
"tenantGroupCompanyCode !=null and tenantGroupCompanyCode !=''"
>
and tenant_group_company_code=#{tenantGroupCompanyCode}
...
...
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