Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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-store
Commits
5227ec54
Commit
5227ec54
authored
Jul 04, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组策略
parent
c46270a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
StoreStrategyController.java
...com/gic/store/web/controller/StoreStrategyController.java
+16
-16
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/StoreStrategyController.java
View file @
5227ec54
...
...
@@ -31,8 +31,8 @@ public class StoreStrategyController {
@Autowired
private
StoreStrategyApiService
storeStrategyApiService
;
@RequestMapping
(
"/save-store-
group-
strategy"
)
public
RestResponse
saveStore
Group
Strategy
(
@Validated
({
StoreStrategyQO
.
SaveValidView
.
class
,
StoreStrategyQO
.
StoreStrategyTypeValidView
.
class
})
@RequestMapping
(
"/save-store-strategy"
)
public
RestResponse
saveStoreStrategy
(
@Validated
({
StoreStrategyQO
.
SaveValidView
.
class
,
StoreStrategyQO
.
StoreStrategyTypeValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
//分组策略类型
storeStrategyQO
.
setStrategyType
(
StoreGroupConstant
.
STORE_GROUP_STRATEGY_TYPE
);
...
...
@@ -44,8 +44,8 @@ public class StoreStrategyController {
}
@RequestMapping
(
"/edit-store-
group-
strategy"
)
public
RestResponse
editStore
Group
Strategy
(
@Validated
({
StoreStrategyQO
.
SaveValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
@RequestMapping
(
"/edit-store-strategy"
)
public
RestResponse
editStoreStrategy
(
@Validated
({
StoreStrategyQO
.
SaveValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
ServiceResponse
result
=
storeStrategyApiService
.
modifyStoreStrategy
(
transferQoToDTO
(
storeStrategyQO
));
if
(!
result
.
isSuccess
())
{
...
...
@@ -54,8 +54,8 @@ public class StoreStrategyController {
return
RestResponse
.
success
(
result
.
getResult
());
}
@RequestMapping
(
"/get-store-
group-
strategy"
)
public
RestResponse
getStore
Group
Strategy
(
@Validated
({
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
@RequestMapping
(
"/get-store-strategy"
)
public
RestResponse
getStoreStrategy
(
@Validated
({
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
ServiceResponse
result
=
storeStrategyApiService
.
getStoreStrategyById
(
storeStrategyQO
.
getStrategyId
());
if
(!
result
.
isSuccess
())
{
return
RestResponse
.
failure
(
result
.
getCode
(),
result
.
getMessage
());
...
...
@@ -63,8 +63,8 @@ public class StoreStrategyController {
return
RestResponse
.
success
(
result
.
getResult
());
}
@RequestMapping
(
"/delete-store-
group-
strategy"
)
public
RestResponse
deleteStore
Group
Strategy
(
@Validated
({
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
@RequestMapping
(
"/delete-store-strategy"
)
public
RestResponse
deleteStoreStrategy
(
@Validated
({
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
ServiceResponse
result
=
storeStrategyApiService
.
deleteStoreStrategy
(
storeStrategyQO
.
getStrategyId
());
if
(!
result
.
isSuccess
())
{
return
RestResponse
.
failure
(
result
.
getCode
(),
result
.
getMessage
());
...
...
@@ -73,8 +73,8 @@ public class StoreStrategyController {
}
@RequestMapping
(
"/swap-store-
group-
strategy"
)
public
RestResponse
swapStore
Group
Strategy
(
@Validated
({
StoreStrategyQO
.
SwapValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
@RequestMapping
(
"/swap-store-strategy"
)
public
RestResponse
swapStoreStrategy
(
@Validated
({
StoreStrategyQO
.
SwapValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
int
upOrDown
=
storeStrategyQO
.
getUpOrDown
();
ServiceResponse
result
;
switch
(
upOrDown
)
{
...
...
@@ -100,8 +100,8 @@ public class StoreStrategyController {
}
}
@RequestMapping
(
"/set-store-
group-
strategy-sort-value"
)
public
RestResponse
setStore
Group
StrategySortValue
(
@Validated
({
StoreStrategyQO
.
SetSortValueValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
@RequestMapping
(
"/set-store-strategy-sort-value"
)
public
RestResponse
setStoreStrategySortValue
(
@Validated
({
StoreStrategyQO
.
SetSortValueValidView
.
class
,
StoreStrategyQO
.
RemoveValidView
.
class
})
StoreStrategyQO
storeStrategyQO
)
{
ServiceResponse
result
=
storeStrategyApiService
.
setStoreStrategySort
(
storeStrategyQO
.
getStrategyId
(),
storeStrategyQO
.
getSortValue
());
if
(
result
.
isSuccess
())
{
return
RestResponse
.
success
(
result
.
getResult
());
...
...
@@ -110,8 +110,8 @@ public class StoreStrategyController {
}
}
@RequestMapping
(
"/list-store-
group-
strategy"
)
public
RestResponse
listStore
Group
Strategy
(
String
search
,
PageQO
pageQO
)
{
@RequestMapping
(
"/list-store-strategy"
)
public
RestResponse
listStoreStrategy
(
String
search
,
PageQO
pageQO
)
{
ServiceResponse
<
Page
<
StoreStrategyDTO
>>
result
=
storeStrategyApiService
.
listStoreField
(
StoreGroupConstant
.
TEST_ENTERPRISE_ID
,
search
,
StoreGroupConstant
.
STORE_GROUP_STRATEGY_TYPE
,
pageQO
.
getCurrentPage
(),
pageQO
.
getPageSize
());
if
(
result
.
isSuccess
())
{
...
...
@@ -124,7 +124,7 @@ public class StoreStrategyController {
}
}
@RequestMapping
(
"/update-
group
-strategy-weights"
)
@RequestMapping
(
"/update-
store
-strategy-weights"
)
public
RestResponse
updateWeight
(
Integer
weight
)
{
if
(
weight
==
null
)
{
RestResponse
.
failure
(
ErrorCode
.
ERR_5
.
getCode
(),
"参数错误"
);
...
...
@@ -133,7 +133,7 @@ public class StoreStrategyController {
return
RestResponse
.
success
(
result
.
getResult
());
}
@RequestMapping
(
"/get-
group
-strategy-weights"
)
@RequestMapping
(
"/get-
store
-strategy-weights"
)
public
RestResponse
getWeight
()
{
ServiceResponse
<
Integer
>
result
=
storeStrategyApiService
.
getStoreGroupStrategyWeight
(
StoreGroupConstant
.
TEST_ENTERPRISE_ID
);
return
RestResponse
.
success
(
result
.
getResult
());
...
...
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