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
0ea21d0d
Commit
0ea21d0d
authored
Dec 25, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航保存重复验证
parent
23238e50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
86 deletions
+18
-86
CustomStoreController.java
.../gic/enterprise/web/controller/CustomStoreController.java
+18
-32
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-web/src/main/java/com/gic/enterprise/web/controller/CustomStoreController.java
View file @
0ea21d0d
...
...
@@ -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
;
...
...
@@ -28,33 +29,25 @@ public class CustomStoreController {
@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 +67,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
);
}
}
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/qo/CustomStoreQO.java
View file @
0ea21d0d
...
...
@@ -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 @
0ea21d0d
...
...
@@ -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