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
b13cc5a1
Commit
b13cc5a1
authored
Dec 26, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
b1db9e05
cab4b621
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
87 additions
and
94 deletions
+87
-94
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
AppletWechatMenuApiServiceImpl.java
...se/service/outer/impl/AppletWechatMenuApiServiceImpl.java
+2
-2
TabAppletCustomPageMapper.xml
...e/src/main/resources/mapper/TabAppletCustomPageMapper.xml
+9
-0
TabCustomStoreMapper.xml
...ervice/src/main/resources/mapper/TabCustomStoreMapper.xml
+1
-1
CustomPageController.java
...m/gic/enterprise/web/controller/CustomPageController.java
+6
-0
CustomStoreController.java
.../gic/enterprise/web/controller/CustomStoreController.java
+24
-37
CustomStoreQO.java
...rc/main/java/com/gic/enterprise/web/qo/CustomStoreQO.java
+0
-27
CustomStoreVO.java
...rc/main/java/com/gic/enterprise/web/vo/CustomStoreVO.java
+0
-27
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/AppletCustomPageApiService.java
View file @
b13cc5a1
...
...
@@ -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 pageIds
* @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 @
b13cc5a1
...
...
@@ -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 @
b13cc5a1
...
...
@@ -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 @
b13cc5a1
...
...
@@ -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 @
b13cc5a1
...
...
@@ -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/java/com/gic/enterprise/service/outer/impl/AppletWechatMenuApiServiceImpl.java
View file @
b13cc5a1
...
...
@@ -52,7 +52,7 @@ public class AppletWechatMenuApiServiceImpl implements AppletWechatMenuApiServic
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"菜单内容错误"
);
}
if
(
WeChatMenuTypeEnum
.
isNeedMenuCode
(
dto
.
getMenuType
())
&&
StringUtils
.
isBlank
(
dto
.
getMenuCode
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"链接配置
code
不能为空"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"链接配置不能为空"
);
}
if
(
WeChatMenuTypeEnum
.
OUT_LINK
.
getCode
()
==
dto
.
getMenuType
().
intValue
())
{
if
(
StringUtils
.
isBlank
(
dto
.
getMenuUrl
()))
{
...
...
@@ -132,7 +132,7 @@ public class AppletWechatMenuApiServiceImpl implements AppletWechatMenuApiServic
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"菜单内容错误"
);
}
if
(
WeChatMenuTypeEnum
.
isNeedMenuCode
(
dto
.
getMenuType
())
&&
StringUtils
.
isBlank
(
dto
.
getMenuCode
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"链接配置
code
不能为空"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"链接配置不能为空"
);
}
if
(
WeChatMenuTypeEnum
.
OUT_LINK
.
getCode
()
==
dto
.
getMenuType
().
intValue
())
{
if
(
StringUtils
.
isBlank
(
dto
.
getMenuUrl
()))
{
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabAppletCustomPageMapper.xml
View file @
b13cc5a1
...
...
@@ -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-service/src/main/resources/mapper/TabCustomStoreMapper.xml
View file @
b13cc5a1
...
...
@@ -143,7 +143,7 @@
select
<include
refid=
"Base_Column_List"
/>
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status=1
<if
test=
"appid != null and appid != ''"
>
and appid= #{appid}
</if>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomPageController.java
View file @
b13cc5a1
...
...
@@ -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
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/CustomStoreController.java
View file @
b13cc5a1
...
...
@@ -7,6 +7,7 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.enterprise.dto.CustomStoreDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.PageQO
;
import
com.gic.enterprise.response.EnterpriseRestResponse
;
import
com.gic.enterprise.service.CustomStoreApiService
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.enterprise.web.qo.CustomStoreQO
;
...
...
@@ -23,38 +24,28 @@ import org.springframework.web.bind.annotation.RestController;
public
class
CustomStoreController
{
@Autowired
private
CustomStoreApiService
customStoreApiService
;
@Autowired
private
StoreWidgetApiService
storeWidgetApiService
;
@RequestMapping
(
"save-custom-store"
)
public
RestResponse
saveCustomStore
(
@RequestBody
CustomStoreQO
customStoreQO
){
StoreWidgetDTO
widgetDTO
=
new
StoreWidgetDTO
();
widgetDTO
.
setWriteBackParam
(
customStoreQO
.
getWriteBackParam
());
widgetDTO
.
setStoreWidgetId
(
customStoreQO
.
getStorewidgetId
());
widgetDTO
.
setSearchParam
(
customStoreQO
.
getSearchParam
());
widgetDTO
.
setAuthSearchParam
(
customStoreQO
.
getAuthSearchParam
());
ServiceResponse
<
Integer
>
response
=
this
.
storeWidgetApiService
.
saveStoreWidget
(
widgetDTO
);
if
(
response
.
isSuccess
()){
CustomStoreDTO
dto
=
new
CustomStoreDTO
();
dto
.
setTitle
(
customStoreQO
.
getTitle
());
dto
.
setAppid
(
customStoreQO
.
getAppId
());
dto
.
setAppType
(
customStoreQO
.
getAppType
());
dto
.
setCustomStoreId
(
customStoreQO
.
getCustomStoreId
());
dto
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
dto
.
setStoreWidgetId
(
response
.
getResult
());
if
(
customStoreQO
.
getSaveType
()
==
2
){
dto
.
setStatus
(
1
);
}
else
{
if
(
customStoreQO
.
getCustomStoreId
()
==
null
){
dto
.
setStatus
(
2
);
}
}
ServiceResponse
<
Integer
>
serviceResponse
=
this
.
customStoreApiService
.
saveCustomStore
(
dto
);
if
(
serviceResponse
.
isSuccess
()){
return
RestResponse
.
success
();
CustomStoreDTO
dto
=
new
CustomStoreDTO
();
dto
.
setTitle
(
customStoreQO
.
getTitle
());
dto
.
setAppid
(
customStoreQO
.
getAppId
());
dto
.
setAppType
(
customStoreQO
.
getAppType
());
dto
.
setCustomStoreId
(
customStoreQO
.
getCustomStoreId
());
dto
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
dto
.
setStoreWidgetId
(
customStoreQO
.
getStorewidgetId
());
if
(
customStoreQO
.
getSaveType
()
==
2
){
dto
.
setStatus
(
1
);
}
else
{
if
(
customStoreQO
.
getCustomStoreId
()
==
null
){
dto
.
setStatus
(
2
);
}
}
return
RestResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"门店选择器保存失败"
);
ServiceResponse
<
Integer
>
serviceResponse
=
this
.
customStoreApiService
.
saveCustomStore
(
dto
);
if
(
serviceResponse
.
isSuccess
()){
return
RestResponse
.
success
();
}
return
EnterpriseRestResponse
.
failure
(
serviceResponse
);
}
@RequestMapping
(
"page-custom-store"
)
...
...
@@ -74,13 +65,6 @@ public class CustomStoreController {
CustomStoreDTO
dto
=
response
.
getResult
();
if
(
dto
!=
null
){
CustomStoreVO
vo
=
EntityUtil
.
changeEntityByJSON
(
CustomStoreVO
.
class
,
dto
);
ServiceResponse
<
StoreWidgetDTO
>
storeWidget
=
this
.
storeWidgetApiService
.
getStoreWidget
(
dto
.
getStoreWidgetId
());
if
(
storeWidget
.
isSuccess
()
&&
storeWidget
.
getResult
()
!=
null
){
vo
.
setCustomStoreId
(
storeWidget
.
getResult
().
getStoreWidgetId
());
vo
.
setAuthSearchParam
(
storeWidget
.
getResult
().
getAuthSearchParam
());
vo
.
setSearchParam
(
storeWidget
.
getResult
().
getSearchParam
());
vo
.
setWriteBackParam
(
storeWidget
.
getResult
().
getWriteBackParam
());
}
return
RestResponse
.
success
(
vo
);
}
}
...
...
@@ -88,9 +72,12 @@ public class CustomStoreController {
}
@RequestMapping
(
"delete-custom-store"
)
public
RestResponse
deleteCustomStore
(
String
customStoreIds
){
if
(
StringUtils
.
isNotBlank
(
customStoreIds
)){
String
[]
arr
=
customStoreIds
.
split
(
","
);
public
RestResponse
deleteCustomStore
(
String
customStoreId
){
if
(
StringUtils
.
isBlank
(
customStoreId
)){
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"参数不能为空"
);
}
if
(
StringUtils
.
isNotBlank
(
customStoreId
)){
String
[]
arr
=
customStoreId
.
split
(
","
);
for
(
String
s
:
arr
){
this
.
customStoreApiService
.
deleteCustomStore
(
Integer
.
valueOf
(
s
));
}
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/qo/CustomStoreQO.java
View file @
b13cc5a1
...
...
@@ -6,9 +6,6 @@ public class CustomStoreQO {
private
String
appId
;
private
Integer
appType
;
private
Integer
storewidgetId
;
private
String
authSearchParam
;
private
String
searchParam
;
private
String
writeBackParam
;
private
Integer
saveType
;
//1保存 2保存发布
public
Integer
getCustomStoreId
()
{
...
...
@@ -27,30 +24,6 @@ public class CustomStoreQO {
this
.
title
=
title
;
}
public
String
getAuthSearchParam
()
{
return
authSearchParam
;
}
public
void
setAuthSearchParam
(
String
authSearchParam
)
{
this
.
authSearchParam
=
authSearchParam
;
}
public
String
getSearchParam
()
{
return
searchParam
;
}
public
void
setSearchParam
(
String
searchParam
)
{
this
.
searchParam
=
searchParam
;
}
public
String
getWriteBackParam
()
{
return
writeBackParam
;
}
public
void
setWriteBackParam
(
String
writeBackParam
)
{
this
.
writeBackParam
=
writeBackParam
;
}
public
Integer
getSaveType
()
{
return
saveType
;
}
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/vo/CustomStoreVO.java
View file @
b13cc5a1
...
...
@@ -6,9 +6,6 @@ public class CustomStoreVO {
private
String
appid
;
private
Integer
appType
;
private
Integer
storeWidgetId
;
private
String
authSearchParam
;
private
String
searchParam
;
private
String
writeBackParam
;
public
Integer
getCustomStoreId
()
{
return
customStoreId
;
...
...
@@ -26,30 +23,6 @@ public class CustomStoreVO {
this
.
title
=
title
;
}
public
String
getAuthSearchParam
()
{
return
authSearchParam
;
}
public
void
setAuthSearchParam
(
String
authSearchParam
)
{
this
.
authSearchParam
=
authSearchParam
;
}
public
String
getSearchParam
()
{
return
searchParam
;
}
public
void
setSearchParam
(
String
searchParam
)
{
this
.
searchParam
=
searchParam
;
}
public
String
getWriteBackParam
()
{
return
writeBackParam
;
}
public
void
setWriteBackParam
(
String
writeBackParam
)
{
this
.
writeBackParam
=
writeBackParam
;
}
public
String
getAppid
()
{
return
appid
;
}
...
...
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