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
a150317f
Commit
a150317f
authored
Jul 27, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pmd
parent
fb4291c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+24
-14
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
a150317f
...
@@ -149,13 +149,33 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -149,13 +149,33 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
}
}
guideTop
(
pageType
,
jsonObject
,
enterpriseId
,
appId
,
pageId
);
guideTop
(
pageType
,
jsonObject
,
enterpriseId
,
appId
,
pageId
);
List
<
TabAppletPageComponent
>
componentList
=
refDeal
(
isAddOperation
,
pageType
,
jsonObject
,
enterpriseId
,
pageId
);
//如果是会员中心,商户初始化回调
if
(
pageType
==
AppletPageTypeEnum
.
MEMBER_CENTER
.
getCode
())
{
this
.
customStoreApiService
.
customSettingHasCommpleted
(
enterpriseId
);
}
//先删除
appletPageComponentService
.
deleteByPageId
(
pageId
);
if
(
CollectionUtils
.
isNotEmpty
(
componentList
))
{
appletPageComponentService
.
saveFetch
(
componentList
);
}
return
ServiceResponse
.
success
(
pageId
);
}
/**
* 关联数据处理
*/
private
List
<
TabAppletPageComponent
>
refDeal
(
boolean
isAddOperation
,
Integer
pageType
,
JSONObject
jsonObject
,
Integer
enterpriseId
,
Integer
pageId
)
{
//保存组件表数据
//保存组件表数据
List
<
TabAppletPageComponent
>
componentList
=
new
ArrayList
<>();
List
<
TabAppletPageComponent
>
componentList
=
new
ArrayList
<>();
//组件key存储
//组件key存储
Map
<
String
,
Object
>
componentMap
=
new
HashMap
<>(
16
);
Map
<
String
,
Object
>
componentMap
=
new
HashMap
<>(
16
);
ServiceResponse
<
Integer
>
componentParse
=
this
.
componentParse
(
jsonObject
,
enterpriseId
,
pageId
,
componentList
,
componentMap
);
ServiceResponse
<
Integer
>
componentParse
=
this
.
componentParse
(
jsonObject
,
enterpriseId
,
pageId
,
componentList
,
componentMap
);
if
(!
componentParse
.
isSuccess
()){
if
(!
componentParse
.
isSuccess
()){
return
componentParse
;
throw
new
CommonException
(
componentParse
.
getCode
(),
componentParse
.
getMessage
())
;
}
}
//如果是会员中心等页面,必须有对应的组件
//如果是会员中心等页面,必须有对应的组件
AppletPageComponentEnum
mustComponent
=
AppletPageComponentEnum
.
mustComponent
(
pageType
);
AppletPageComponentEnum
mustComponent
=
AppletPageComponentEnum
.
mustComponent
(
pageType
);
...
@@ -164,21 +184,11 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -164,21 +184,11 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(!
componentMap
.
containsKey
(
mustComponent
.
getCode
()))
{
if
(!
componentMap
.
containsKey
(
mustComponent
.
getCode
()))
{
//回滚
//回滚
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"必须有"
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"必须有"
+
mustComponent
.
getMessage
()
+
"组件"
);
+
mustComponent
.
getMessage
()
+
"组件"
);
}
}
}
}
//如果是会员中心,商户初始化回调
return
componentList
;
if
(
pageType
==
AppletPageTypeEnum
.
MEMBER_CENTER
.
getCode
())
{
this
.
customStoreApiService
.
customSettingHasCommpleted
(
enterpriseId
);
}
//先删除
appletPageComponentService
.
deleteByPageId
(
pageId
);
if
(
CollectionUtils
.
isNotEmpty
(
componentList
))
{
appletPageComponentService
.
saveFetch
(
componentList
);
}
return
ServiceResponse
.
success
(
pageId
);
}
}
private
void
guideTop
(
Integer
pageType
,
JSONObject
jsonObject
,
Integer
enterpriseId
,
String
appId
,
Integer
pageId
)
{
private
void
guideTop
(
Integer
pageType
,
JSONObject
jsonObject
,
Integer
enterpriseId
,
String
appId
,
Integer
pageId
)
{
...
...
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