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
cba76f61
Commit
cba76f61
authored
Sep 23, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
486fb9ef
1b191062
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
1 deletions
+77
-1
StoreOpenApiService.java
.../main/java/com/gic/store/service/StoreOpenApiService.java
+38
-0
StoreGroupApiServiceImpl.java
...ic/store/service/outer/impl/StoreGroupApiServiceImpl.java
+1
-1
StoreOpenApiServiceImpl.java
...gic/store/service/outer/impl/StoreOpenApiServiceImpl.java
+38
-0
No files found.
gic-store-api/src/main/java/com/gic/store/service/StoreOpenApiService.java
View file @
cba76f61
...
...
@@ -2,6 +2,7 @@ package com.gic.store.service;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.open.ClerkDTO
;
import
com.gic.store.dto.open.StoreGroupDTO
;
import
com.gic.store.dto.open.StoreOpenDTO
;
/**
...
...
@@ -182,4 +183,41 @@ public interface StoreOpenApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
listStoreGroup
(
String
appId
,
Integer
enterpriseId
);
/**
* 新增分组
* @Title: saveStoreGroup
* @Description:
* @author guojuxing
* @param appId
* @param enterpriseId
* @param storeGroupInfo
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
saveStoreGroup
(
String
appId
,
Integer
enterpriseId
,
StoreGroupDTO
storeGroupInfo
);
/**
* 编辑分组
* @Title: editStoreGroup
* @Description:
* @author guojuxing
* @param appId
* @param enterpriseId
* @param storeGroupId
* @param storeGroupName
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
editStoreGroup
(
String
appId
,
Integer
enterpriseId
,
Integer
storeGroupId
,
String
storeGroupName
);
/**
* 删除分组
* @Title: deleteStoreGroup
* @Description:
* @author guojuxing
* @param appId
* @param enterpriseId
* @param storeGroupId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>
*/
ServiceResponse
<
String
>
deleteStoreGroup
(
String
appId
,
Integer
enterpriseId
,
Integer
storeGroupId
);
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreGroupApiServiceImpl.java
View file @
cba76f61
...
...
@@ -283,7 +283,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
if
(
isContainStore
(
storeGroupId
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"该分组下存在门店,不能删除"
);
}
if
(
storeGroupService
.
isLeafNode
(
storeGroupId
))
{
if
(
!
storeGroupService
.
isLeafNode
(
storeGroupId
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"下面有子分组,不能删除"
);
}
ServiceResponse
<
TabStoreGroup
>
authValid
=
validIsDefault
(
storeGroupId
);
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreOpenApiServiceImpl.java
View file @
cba76f61
...
...
@@ -25,6 +25,7 @@ import com.gic.store.constant.StoreLogReasonEnum;
import
com.gic.store.dto.*
;
import
com.gic.store.dto.open.ClerkDTO
;
import
com.gic.store.dto.open.*
;
import
com.gic.store.dto.open.StoreGroupDTO
;
import
com.gic.store.entity.*
;
import
com.gic.store.service.*
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -78,6 +79,8 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
private
ResourceApiService
resourceApiService
;
@Autowired
private
StoreRegionService
storeRegionService
;
@Autowired
private
StoreGroupApiService
storeGroupApiService
;
@Override
public
ServiceResponse
<
String
>
getApiFieldJson
(
Integer
enterpriseId
,
Integer
regionId
)
{
...
...
@@ -688,6 +691,41 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
return
ServiceResponse
.
success
();
}
@Override
@GatewayParams
(
query
=
{
"appId"
,
"enterpriseId"
},
body
=
{
"storeGroupInfo"
})
public
ServiceResponse
<
String
>
saveStoreGroup
(
String
appId
,
Integer
enterpriseId
,
StoreGroupDTO
storeGroupInfo
)
{
com
.
gic
.
store
.
dto
.
StoreGroupDTO
storeGroupDTO
=
EntityUtil
.
changeEntityNew
(
com
.
gic
.
store
.
dto
.
StoreGroupDTO
.
class
,
storeGroupInfo
);
//确保是新增入口
storeGroupDTO
.
setStoreGroupId
(
null
);
ServiceResponse
<
Integer
>
result
=
storeGroupApiService
.
save
(
storeGroupDTO
);
if
(
result
.
isSuccess
())
{
return
ServiceResponse
.
success
();
}
return
ServiceResponse
.
failure
(
"1"
,
result
.
getMessage
());
}
@Override
@GatewayParams
(
query
=
{
"appId"
,
"enterpriseId"
,
"storeGroupId"
,
"storeGroupName"
})
public
ServiceResponse
<
String
>
editStoreGroup
(
String
appId
,
Integer
enterpriseId
,
Integer
storeGroupId
,
String
storeGroupName
)
{
com
.
gic
.
store
.
dto
.
StoreGroupDTO
storeGroupDTO
=
new
com
.
gic
.
store
.
dto
.
StoreGroupDTO
();
storeGroupDTO
.
setStoreGroupId
(
storeGroupId
);
storeGroupDTO
.
setStoreGroupName
(
storeGroupName
);
ServiceResponse
<
Integer
>
result
=
storeGroupApiService
.
updateStoreGroupName
(
storeGroupDTO
);
if
(
result
.
isSuccess
())
{
return
ServiceResponse
.
success
();
}
return
ServiceResponse
.
failure
(
"1"
,
result
.
getMessage
());
}
@Override
@GatewayParams
(
query
=
{
"appId"
,
"enterpriseId"
,
"storeGroupId"
})
public
ServiceResponse
<
String
>
deleteStoreGroup
(
String
appId
,
Integer
enterpriseId
,
Integer
storeGroupId
)
{
ServiceResponse
<
String
>
result
=
storeGroupApiService
.
remove
(
storeGroupId
);
if
(
result
.
isSuccess
())
{
return
ServiceResponse
.
success
();
}
return
ServiceResponse
.
failure
(
"1"
,
result
.
getMessage
());
}
/**
...
...
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