Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
f1b5b14f
Commit
f1b5b14f
authored
Jul 23, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
83c96bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
DataAuthUtils.java
...p/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
+10
-1
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
View file @
f1b5b14f
...
...
@@ -6,6 +6,9 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.DataAuthDTO
;
import
com.gic.cloud.service.DataAuthApiService
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.dto.StoreSearchDTO
;
import
com.gic.store.service.StoreApiService
;
import
com.gic.store.service.StoreWidgetApiService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -15,6 +18,7 @@ import org.springframework.stereotype.Component;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Component
public
class
DataAuthUtils
{
...
...
@@ -24,6 +28,8 @@ public class DataAuthUtils {
private
DataAuthApiService
dataAuthApiService
;
@Autowired
private
StoreWidgetApiService
storeWidgetApiService
;
@Autowired
private
StoreApiService
storeApiService
;
public
StoreAuth
getStoreAuth
(
Integer
userId
,
Integer
enterpriseId
){
ServiceResponse
<
DataAuthDTO
>
response
=
this
.
dataAuthApiService
.
ggetDataAuthByUserId
(
enterpriseId
,
userId
);
...
...
@@ -37,7 +43,10 @@ public class DataAuthUtils {
storeAuth
.
setStoreInfoIdList
(
storeInfoIdList
);
storeAuth
.
setStoreWidgetId
(
storeWidgetId
);
}
else
{
storeAuth
.
setStoreInfoIdList
(
new
ArrayList
<>());
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
List
<
StoreDTO
>
result
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
1
,
20000
).
getResult
().
getResult
();
storeAuth
.
setStoreInfoIdList
(
result
.
stream
().
map
(
storeDTO
->
storeDTO
.
getStoreInfoId
()).
collect
(
Collectors
.
toList
()));
}
}
return
storeAuth
;
...
...
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