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
a1b24491
Commit
a1b24491
authored
Mar 25, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店分组如果上级分组是子节点且下面有门店,则提示
parent
e9bfa290
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
7 deletions
+31
-7
StoreGroupController.java
...va/com/gic/store/web/controller/StoreGroupController.java
+31
-7
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/StoreGroupController.java
View file @
a1b24491
...
...
@@ -3,6 +3,7 @@ package com.gic.store.web.controller;
import
java.util.List
;
import
com.gic.download.utils.OperationResultUtils
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -70,26 +71,49 @@ public class StoreGroupController {
return
OperationResultUtils
.
operationResult
(
result
,
"修改上级分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
/**
* 新增子分组验证,是否是子节点且有门店
* @param groupLevel
* @param parentStoreGroupId
* @return
*/
@RequestMapping
(
"/has-parent-store-group-store-when-save"
)
public
RestResponse
hasParentStoreGroupStoreWhenSave
(
Integer
groupLevel
,
Integer
parentStoreGroupId
)
{
return
ResultControllerUtils
.
commonResult
(
storeGroupApiService
.
tipWhenSaveStoreGroup
(
groupLevel
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
parentStoreGroupId
));
}
/**
* 修改上级分组之前验证,上级分组ID是否是子节点且有门店
* @param parentStoreGroupId
* @return
*/
@RequestMapping
(
"/has-parent-store-group-store"
)
public
RestResponse
hasParentStoreGroupStore
(
Integer
parentStoreGroupId
)
{
return
ResultControllerUtils
.
commonResult
(
storeGroupApiService
.
tipWhenUpdateParentId
(
parentStoreGroupId
));
}
@RequestMapping
(
"/drag-sort"
)
public
RestResponse
dragSort
(
@Validated
({
StoreGroupQO
.
RemoveValidView
.
class
,
StoreGroupQO
.
SetSortValueValidView
.
class
})
StoreGroupQO
storeGroupQO
)
{
ServiceResponse
<
String
>
result
=
storeGroupApiService
.
dragSort
(
storeGroupQO
.
getStoreGroupId
(),
storeGroupQO
.
getSortValue
());
return
OperationResultUtils
.
operationResult
(
result
,
"拖拽排序门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
ServiceResponse
<
String
>
result
=
storeGroupApiService
.
dragSort
(
storeGroupQO
.
getStoreGroupId
(),
storeGroupQO
.
getSortValue
());
return
OperationResultUtils
.
operationResult
(
result
,
"拖拽排序门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
@RequestMapping
(
"/sort"
)
public
RestResponse
sort
(
@Validated
({
StoreGroupQO
.
SortValidView
.
class
})
StoreGroupQO
storeGroupQO
)
{
ServiceResponse
<
String
>
result
=
storeGroupApiService
.
sort
(
transferQoToDTO
(
storeGroupQO
),
storeGroupQO
.
isUp
());
return
OperationResultUtils
.
operationResult
(
result
,
"上下排序门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
return
OperationResultUtils
.
operationResult
(
result
,
"上下排序门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
@RequestMapping
(
"/remove"
)
public
RestResponse
remove
(
@Validated
({
StoreGroupQO
.
RemoveValidView
.
class
})
StoreGroupQO
storeGroupQO
)
{
ServiceResponse
<
String
>
result
=
storeGroupApiService
.
remove
(
storeGroupQO
.
getStoreGroupId
());
return
OperationResultUtils
.
operationResult
(
result
,
OperationResultUtils
.
LOG_DELETE
+
"门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
return
OperationResultUtils
.
operationResult
(
result
,
OperationResultUtils
.
LOG_DELETE
+
"门店分组"
,
OperationResultUtils
.
getOperationObject
(
result
));
}
private
StoreGroupDTO
transferQoToDTO
(
StoreGroupQO
storeGroupQO
)
{
...
...
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