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
46d777ba
Commit
46d777ba
authored
Jul 28, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
8c8f73ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
DataAuthUtils.java
...p/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
+6
-9
IndexController.java
...in/java/com/gic/cloud/web/controller/IndexController.java
+6
-1
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
View file @
46d777ba
...
...
@@ -88,17 +88,14 @@ public class DataAuthUtils {
public
List
<
MbrVo
>
getMbrArea
(
Integer
userId
,
Integer
enterpriseId
){
ServiceResponse
<
DataAuthDTO
>
response
=
this
.
dataAuthApiService
.
ggetDataAuthByUserId
(
enterpriseId
,
userId
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
ServiceResponse
<
List
<
OwnerMemberCardDTO
>>
result
=
memberCardApiService
.
getAll
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
()
);
ServiceResponse
<
List
<
OwnerMemberCardDTO
>>
result
=
memberCardApiService
.
getAll
(
enterpriseId
);
List
<
String
>
cards
=
Arrays
.
asList
(
response
.
getResult
().
getMemberCardAuth
().
split
(
"_"
));
if
(
result
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
result
.
getResult
())){
return
result
.
getResult
().
stream
().
map
(
ownerMemberCardDTO
->
{
if
(
cards
.
contains
(
ownerMemberCardDTO
.
getId
().
toString
())){
MbrVo
vo
=
new
MbrVo
();
vo
.
setMbrAreaId
(
ownerMemberCardDTO
.
getId
().
toString
());
vo
.
setMbrAreaName
(
ownerMemberCardDTO
.
getCardName
());
return
vo
;
}
return
null
;
return
result
.
getResult
().
stream
().
filter
(
dto
->
cards
.
contains
(
dto
.
getId
()+
""
)).
map
(
ownerMemberCardDTO
->
{
MbrVo
vo
=
new
MbrVo
();
vo
.
setMbrAreaId
(
ownerMemberCardDTO
.
getId
().
toString
());
vo
.
setMbrAreaName
(
ownerMemberCardDTO
.
getCardName
());
return
vo
;
}).
collect
(
Collectors
.
toList
());
}
}
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/IndexController.java
View file @
46d777ba
...
...
@@ -2,7 +2,9 @@ package com.gic.cloud.web.controller;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.service.IndexApiService
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
import
com.gic.cloud.web.qo.DateTypeQo
;
import
com.gic.cloud.web.vo.MbrVo
;
import
com.gic.cloud.web.vo.index.IndexSalesVo
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
...
...
@@ -21,10 +23,13 @@ public class IndexController {
private
IndexSalesApiService
indexSalesApiService
;
@Autowired
private
StoreSearchUtils
storeSearchUtils
;
@Autowired
private
DataAuthUtils
dataAuthUtils
;
@RequestMapping
(
"index-mbr"
)
public
RestResponse
indexMbr
(
Integer
enterpriseId
,
Integer
userId
){
List
<
MbrVo
>
mbrArea
=
this
.
dataAuthUtils
.
getMbrArea
(
userId
,
enterpriseId
);
return
RestResponse
.
success
(
mbrArea
);
}
@RequestMapping
(
"index-sales"
)
...
...
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