Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
b1cfb49e
Commit
b1cfb49e
authored
Dec 25, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义装修页面批量删除接口
parent
0397a184
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
0 deletions
+60
-0
AppletCustomPageApiService.java
...om/gic/enterprise/service/AppletCustomPageApiService.java
+9
-0
TabAppletCustomPageMapper.java
.../gic/enterprise/dao/mapper/TabAppletCustomPageMapper.java
+3
-0
AppletCustomPageService.java
...a/com/gic/enterprise/service/AppletCustomPageService.java
+2
-0
AppletCustomPageServiceImpl.java
.../enterprise/service/impl/AppletCustomPageServiceImpl.java
+5
-0
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+26
-0
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+9
-0
CustomPageController.java
...m/gic/enterprise/web/controller/CustomPageController.java
+6
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/AppletCustomPageApiService.java
View file @
b1cfb49e
...
...
@@ -95,4 +95,13 @@ public interface AppletCustomPageApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
delete
(
Integer
pageId
);
/**
* 批量删除
* @Title: deleteFetch
* @Description:
* @author guojuxing
* @param pageId s
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
deleteFetch
(
String
pageIds
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabAppletCustomPageMapper.java
View file @
b1cfb49e
...
...
@@ -105,4 +105,6 @@ public interface TabAppletCustomPageMapper {
@Param
(
"appId"
)
String
appId
,
@Param
(
"pageType"
)
Integer
pageType
);
TabAppletCustomPage
getDefault
(
@Param
(
"pageType"
)
Integer
pageType
);
void
deleteFetch
(
@Param
(
"list"
)
List
<
Integer
>
pageIdList
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/AppletCustomPageService.java
View file @
b1cfb49e
...
...
@@ -134,4 +134,6 @@ public interface AppletCustomPageService {
*/
TabAppletCustomPage
getDefault
(
Integer
pageType
);
void
deleteFetch
(
List
<
Integer
>
pageIdList
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/AppletCustomPageServiceImpl.java
View file @
b1cfb49e
...
...
@@ -103,4 +103,9 @@ public class AppletCustomPageServiceImpl implements AppletCustomPageService{
public
TabAppletCustomPage
getDefault
(
Integer
pageType
)
{
return
tabAppletCustomPageMapper
.
getDefault
(
pageType
);
}
@Override
public
void
deleteFetch
(
List
<
Integer
>
pageIdList
)
{
tabAppletCustomPageMapper
.
deleteFetch
(
pageIdList
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
b1cfb49e
...
...
@@ -334,6 +334,32 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return
ServiceResponse
.
success
(
record
.
getTitle
());
}
@Override
public
ServiceResponse
<
String
>
deleteFetch
(
String
pageIds
)
{
if
(
StringUtils
.
isBlank
(
pageIds
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id为空"
);
}
String
[]
pageIdArr
=
pageIds
.
split
(
","
);
StringBuilder
pageName
=
new
StringBuilder
();
List
<
Integer
>
pageIdList
=
new
ArrayList
<>(
pageIdArr
.
length
);
for
(
String
pageId
:
pageIdArr
)
{
if
(!
StringUtils
.
isNumeric
(
pageId
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id错误,数据格式非法"
);
}
TabAppletCustomPage
record
=
appletCustomPageService
.
getByPageId
(
Integer
.
parseInt
(
pageId
));
if
(
record
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面ID错误,查无数据"
);
}
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
}
pageName
.
append
(
record
.
getTitle
()).
append
(
","
);
pageIdList
.
add
(
Integer
.
parseInt
(
pageId
));
}
appletCustomPageService
.
deleteFetch
(
pageIdList
);
return
ServiceResponse
.
success
(
pageName
.
toString
());
}
/**
* 获取组件信息
* @param pageId
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
b1cfb49e
...
...
@@ -242,4 +242,12 @@
and enterprise_id = -1
and page_type = #{pageType}
</select>
<update
id=
"deleteFetch"
>
update tab_applet_custom_page set status = 0
where page_id in
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomPageController.java
View file @
b1cfb49e
...
...
@@ -69,6 +69,12 @@ public class CustomPageController {
return
OperationResultUtils
.
operationResult
(
result
,
"删除装修页面"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
@RequestMapping
(
"/delete-fetch"
)
public
RestResponse
deleteFetch
(
String
pageIds
)
{
ServiceResponse
<
String
>
result
=
appletCustomPageApiService
.
deleteFetch
(
pageIds
);
return
OperationResultUtils
.
operationResult
(
result
,
"删除装修页面"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
/**
* 数据资产类型
* @Title: listDataIcon
...
...
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