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
37d4dcbe
Commit
37d4dcbe
authored
Mar 15, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店品牌变更
parent
4817d2a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
StoreRegionApiService.java
...ain/java/com/gic/store/service/StoreRegionApiService.java
+2
-1
StoreAuthorizationApiServiceImpl.java
.../service/outer/impl/StoreAuthorizationApiServiceImpl.java
+6
-6
StoreRegionApiServiceImpl.java
...c/store/service/outer/impl/StoreRegionApiServiceImpl.java
+3
-2
No files found.
gic-store-api/src/main/java/com/gic/store/service/StoreRegionApiService.java
View file @
37d4dcbe
...
...
@@ -109,10 +109,11 @@ public interface StoreRegionApiService {
* @param ownerEnterpriseId 原商户
* @param unionEnterpriseId 被授权商户
* @param storeRegionIdList
* @param authType 1表示重新授权 0正常授权
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse
<
Integer
>
authorizeRegionToOther
(
Integer
ownerEnterpriseId
,
Integer
unionEnterpriseId
,
List
<
Integer
>
storeRegionIdList
);
ServiceResponse
<
Integer
>
authorizeRegionToOther
(
Integer
ownerEnterpriseId
,
Integer
unionEnterpriseId
,
List
<
Integer
>
storeRegionIdList
,
Integer
authType
);
/**
* 收回授权
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreAuthorizationApiServiceImpl.java
View file @
37d4dcbe
...
...
@@ -85,7 +85,7 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
}
else
{
this
.
unionEnterpriseAuthResDetailApiService
.
unionForStore
(
UnionEnterpriseAuthDetailStatusEnum
.
RESOURCE_DEALING
.
getCode
(),
ownEnterpriseId
,
unionEnterpriseId
,
key
,
"资源授权中"
);
}
this
.
queryStoreByPage
(
count
,
storeSearchDTO
,
unionEnterpriseId
,
ownEnterpriseId
,
key
);
this
.
queryStoreByPage
(
count
,
storeSearchDTO
,
unionEnterpriseId
,
ownEnterpriseId
,
key
,
0
);
return
ServiceResponse
.
success
();
}
...
...
@@ -102,7 +102,7 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
toEnterpriseId
);
storeSearchDTO
.
setStoreInfoIds
(
storeInfoIds
.
toString
());
this
.
queryStoreByPage
(
Long
.
valueOf
(
list
.
size
()+
""
),
storeSearchDTO
,
toEnterpriseId
,
fromEnterpriseId
,
key
);
this
.
queryStoreByPage
(
Long
.
valueOf
(
list
.
size
()+
""
),
storeSearchDTO
,
toEnterpriseId
,
fromEnterpriseId
,
key
,
1
);
}
return
ServiceResponse
.
success
();
}
...
...
@@ -176,7 +176,7 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
return
ServiceResponse
.
success
();
}
private
void
queryStoreByPage
(
Long
count
,
StoreSearchDTO
storeSearchDTO
,
Integer
unionEnterpriseId
,
Integer
ownEnterpriseId
,
String
key
){
private
void
queryStoreByPage
(
Long
count
,
StoreSearchDTO
storeSearchDTO
,
Integer
unionEnterpriseId
,
Integer
ownEnterpriseId
,
String
key
,
Integer
authType
){
int
pages
=
count
/
PAGE_SIZE
+
count
%
PAGE_SIZE
>
0
?
1
:
0
;
/**需要共享的域*/
Set
<
Integer
>
regionSet
=
new
HashSet
<>();
...
...
@@ -217,7 +217,7 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
}
}
}
this
.
authRegionStatusStoreType
(
regionSet
,
storeStatusSet
,
storeTypeSet
,
storeInfoIdSet
,
storeBrandIdSet
,
ownEnterpriseId
,
unionEnterpriseId
);
this
.
authRegionStatusStoreType
(
regionSet
,
storeStatusSet
,
storeTypeSet
,
storeInfoIdSet
,
storeBrandIdSet
,
ownEnterpriseId
,
unionEnterpriseId
,
authType
);
}
private
void
sendDataToMq
(
StoreDTO
storeDTO
,
Integer
toEnterpriseId
,
int
isEnd
,
String
key
,
int
total
){
...
...
@@ -237,8 +237,8 @@ public class StoreAuthorizationApiServiceImpl implements StoreAuthorizationApiSe
}
private
void
authRegionStatusStoreType
(
Set
<
Integer
>
regionSet
,
Set
<
String
>
statusSet
,
Set
<
String
>
storeTypeSet
,
Set
<
Integer
>
storeInfoIdSet
,
Set
<
Integer
>
storeBrandIdSet
,
Integer
enterpriseId
,
Integer
toEnterpriseId
){
this
.
storeRegionApiService
.
authorizeRegionToOther
(
enterpriseId
,
toEnterpriseId
,
new
ArrayList
<>(
regionSet
));
Set
<
Integer
>
storeInfoIdSet
,
Set
<
Integer
>
storeBrandIdSet
,
Integer
enterpriseId
,
Integer
toEnterpriseId
,
Integer
authType
){
this
.
storeRegionApiService
.
authorizeRegionToOther
(
enterpriseId
,
toEnterpriseId
,
new
ArrayList
<>(
regionSet
)
,
authType
);
this
.
storeDictApiService
.
saveStoreStatusAndStoreType
(
enterpriseId
,
statusSet
.
toArray
(
new
String
[
0
]),
storeTypeSet
.
toArray
(
new
String
[
0
]));
this
.
storeBrandService
.
saveStoreBrandRef
(
toEnterpriseId
,
new
ArrayList
<>(
storeBrandIdSet
),
2
);
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdSet
)){
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreRegionApiServiceImpl.java
View file @
37d4dcbe
...
...
@@ -132,7 +132,8 @@ public class StoreRegionApiServiceImpl implements StoreRegionApiService {
}
@Override
public
ServiceResponse
<
Integer
>
authorizeRegionToOther
(
Integer
ownerEnterpriseId
,
Integer
unionEnterpriseId
,
List
<
Integer
>
newStoreRegionIdList
)
{
public
ServiceResponse
<
Integer
>
authorizeRegionToOther
(
Integer
ownerEnterpriseId
,
Integer
unionEnterpriseId
,
List
<
Integer
>
newStoreRegionIdList
,
Integer
authType
)
{
if
(
newStoreRegionIdList
==
null
)
{
newStoreRegionIdList
=
Collections
.
emptyList
();
}
...
...
@@ -148,7 +149,7 @@ public class StoreRegionApiServiceImpl implements StoreRegionApiService {
Set
<
Integer
>
newRelSet
=
new
HashSet
<>(
newStoreRegionIdList
);
// 要删除的关联
List
<
Integer
>
delRelList
=
oldRelIdList
.
stream
().
filter
(
e
->
!
newRelSet
.
contains
(
e
)).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
delRelList
)
)
{
if
(
CollectionUtils
.
isNotEmpty
(
delRelList
)
&&
authType
!=
1
)
{
//重新授权时不需要删除门店域
storeRegionRelService
.
delByRegionIds
(
unionEnterpriseId
,
delRelList
,
StoreOwnTypeEnum
.
OTHER
.
getCode
());
}
for
(
Integer
regionId
:
newStoreRegionIdList
)
{
...
...
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