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
ec783c7c
Commit
ec783c7c
authored
Sep 29, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店授权
parent
f18cd392
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
StoreAuthorizationApiService.java
...a/com/gic/store/service/StoreAuthorizationApiService.java
+3
-0
StoreAuthorizationApiServiceImpl.java
.../service/outer/impl/StoreAuthorizationApiServiceImpl.java
+13
-8
No files found.
gic-store-api/src/main/java/com/gic/store/service/StoreAuthorizationApiService.java
View file @
ec783c7c
package
com
.
gic
.
store
.
service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.StoreDTO
;
public
interface
StoreAuthorizationApiService
{
...
...
@@ -13,4 +14,6 @@ public interface StoreAuthorizationApiService {
ServiceResponse
<
Void
>
authStore
(
Integer
storeResourceId
,
Integer
toEnterpriseId
,
Integer
enterpriseId
);
ServiceResponse
<
Void
>
authorizationSingleStore
(
String
params
);
ServiceResponse
<
Void
>
saveStore
(
StoreDTO
storeDTO
);
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreAuthorizationApiServiceImpl.java
View file @
ec783c7c
...
...
@@ -78,7 +78,19 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
JSONObject
json
=
JSON
.
parseObject
(
params
);
StoreDTO
storeDTO
=
JSON
.
toJavaObject
(
json
.
getJSONObject
(
"store"
),
StoreDTO
.
class
);
Integer
toEnterpriseId
=
json
.
getInteger
(
"toEnterpriseId"
);
Integer
fromEnterpriseId
=
json
.
getInteger
(
"enterpriseId"
);
Integer
isEnd
=
json
.
getInteger
(
"isEnd"
);
storeDTO
.
setEnterpriseId
(
toEnterpriseId
);
storeDTO
.
setFromEnterpriseId
(
fromEnterpriseId
);
this
.
saveStore
(
storeDTO
);
if
(
isEnd
==
1
){
this
.
unionEnterpriseApiService
.
updateStoreAuthorizationStatus
(
AuthorizationStatusEnum
.
SUCCESS
.
getCode
(),
storeDTO
.
getEnterpriseId
());
}
return
null
;
}
@Override
public
ServiceResponse
<
Void
>
saveStore
(
StoreDTO
storeDTO
){
String
groupId
=
storeStrategyService
.
isHitStrategy
(
storeDTO
,
StoreGroupConstant
.
STORE_GROUP_STRATEGY_TYPE
);
if
(
StringUtils
.
isBlank
(
groupId
))
{
TabStoreGroup
group
=
storeGroupService
.
selectUnGroupedStore
(
storeDTO
.
getEnterpriseId
());
...
...
@@ -86,17 +98,10 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
}
storeDTO
.
setStoreGroupId
(
Integer
.
valueOf
(
groupId
));
storeDTO
.
setIsEditStoreGroup
(
0
);
storeDTO
.
setEnterpriseId
(
toEnterpriseId
);
storeDTO
.
setOwnType
(
StoreOwnTypeEnum
.
OTHER
.
getCode
());
int
i
=
this
.
storeService
.
authAddStore
(
storeDTO
);
log
.
info
(
"{},门店授权结果:{}"
,
storeDTO
.
getStoreInfoId
(),
i
);
if
(
i
>
0
){
this
.
storeApiService
.
addStoreToIndex
(
toEnterpriseId
,
storeDTO
.
getStoreId
());
}
if
(
isEnd
==
1
){
this
.
unionEnterpriseApiService
.
updateStoreAuthorizationStatus
(
AuthorizationStatusEnum
.
SUCCESS
.
getCode
(),
storeDTO
.
getEnterpriseId
());
}
return
null
;
return
ServiceResponse
.
success
();
}
private
void
queryStoreByPage
(
Long
count
,
StoreSearchDTO
storeSearchDTO
,
Integer
toEnterpriseId
,
Integer
enterpriseId
){
...
...
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