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
f96674f9
Commit
f96674f9
authored
Jul 29, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
a7cb5970
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
3 deletions
+60
-3
DataAuthUtils.java
...p/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
+2
-2
BaseSalesController.java
...ava/com/gic/cloud/web/controller/BaseSalesController.java
+24
-0
IndexController.java
...in/java/com/gic/cloud/web/controller/IndexController.java
+14
-0
LoginController.java
...in/java/com/gic/cloud/web/controller/LoginController.java
+0
-0
LoginUserVo.java
...wxapp/src/main/java/com/gic/cloud/web/vo/LoginUserVo.java
+18
-0
dubbo-gic-data-cloud-wxapp.xml
...d-wxapp/src/main/resources/dubbo-gic-data-cloud-wxapp.xml
+2
-1
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
View file @
f96674f9
...
...
@@ -91,9 +91,9 @@ public class DataAuthUtils {
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
().
filter
(
dto
->
cards
.
contains
(
dto
.
getId
()+
""
)).
map
(
ownerMemberCardDTO
->
{
return
result
.
getResult
().
stream
().
filter
(
dto
->
cards
.
contains
(
dto
.
get
CardConfig
Id
()+
""
)).
map
(
ownerMemberCardDTO
->
{
MbrVo
vo
=
new
MbrVo
();
vo
.
setMbrAreaId
(
ownerMemberCardDTO
.
getId
().
toString
());
vo
.
setMbrAreaId
(
ownerMemberCardDTO
.
get
CardConfig
Id
().
toString
());
vo
.
setMbrAreaName
(
ownerMemberCardDTO
.
getCardName
());
return
vo
;
}).
collect
(
Collectors
.
toList
());
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/BaseSalesController.java
0 → 100644
View file @
f96674f9
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.gic.cloud.web.qo.DateTypeQo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@RestController
public
class
BaseSalesController
{
@Autowired
private
StoreSearchUtils
storeSearchUtils
;
@RequestMapping
(
"base-sales"
)
public
RestResponse
baseSales
(
Integer
channel
,
Integer
userId
,
Integer
enterpriseId
,
String
searchJSON
,
DateTypeQo
dateTypeQo
,
String
mbrAreaId
,
Integer
level
,
Integer
parentId
){
List
<
Integer
>
list
=
this
.
storeSearchUtils
.
storeSearch
(
userId
,
enterpriseId
,
searchJSON
);
List
<
String
>
onLine
=
this
.
storeSearchUtils
.
onLineStoreSearch
(
userId
,
enterpriseId
,
searchJSON
);
List
<
Integer
>
childrenStoreGroupIdList
=
this
.
storeSearchUtils
.
getChildrenStoreGroupIdList
(
parentId
);
return
null
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/IndexController.java
View file @
f96674f9
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.FunctionDTO
;
import
com.gic.cloud.dto.FunctionModuleDTO
;
import
com.gic.cloud.service.FunctionApiService
;
import
com.gic.cloud.service.FunctionModuleApiService
;
import
com.gic.cloud.service.IndexApiService
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
import
com.gic.cloud.web.qo.DateTypeQo
;
...
...
@@ -25,6 +29,8 @@ public class IndexController {
private
StoreSearchUtils
storeSearchUtils
;
@Autowired
private
DataAuthUtils
dataAuthUtils
;
@Autowired
private
FunctionApiService
functionApiService
;
@RequestMapping
(
"index-mbr"
)
public
RestResponse
indexMbr
(
Integer
enterpriseId
,
Integer
userId
){
...
...
@@ -41,4 +47,12 @@ public class IndexController {
StringUtils
.
isNoneBlank
(
mbrAreaId
)
?
Long
.
valueOf
(
mbrAreaId
)
:
null
,
dateTypeQo
.
getType
(),
dateTypeQo
.
getDate
(),
dataType
);
return
RestResponse
.
success
(
EntityUtil
.
changeEntityByJSON
(
IndexSalesVo
.
class
,
indexSales
.
getResult
()));
}
@RequestMapping
(
"function-list"
)
public
RestResponse
functionList
(
Integer
userId
){
ServiceResponse
<
List
<
FunctionModuleDTO
>>
response
=
this
.
functionApiService
.
getFunctionByUserId
(
userId
);
return
RestResponse
.
success
(
response
.
getResult
());
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/LoginController.java
View file @
f96674f9
This diff is collapsed.
Click to expand it.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/LoginUserVo.java
View file @
f96674f9
...
...
@@ -5,6 +5,8 @@ import java.io.Serializable;
public
class
LoginUserVo
implements
Serializable
{
private
Integer
userId
;
private
Integer
enterpriseId
;
private
String
userName
;
private
Integer
isAdmin
=
0
;
private
String
phoneNumber
;
private
String
areaCode
;
private
String
code
;
...
...
@@ -48,4 +50,20 @@ public class LoginUserVo implements Serializable {
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
Integer
getIsAdmin
()
{
return
isAdmin
;
}
public
void
setIsAdmin
(
Integer
isAdmin
)
{
this
.
isAdmin
=
isAdmin
;
}
}
gic-data-cloud-wxapp/src/main/resources/dubbo-gic-data-cloud-wxapp.xml
View file @
f96674f9
...
...
@@ -146,6 +146,7 @@
<dubbo:reference
interface=
"com.gic.cloud.service.IndexDescApiService"
id=
"indexDescApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.DataExplainApiService"
id=
"dataExplainApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.data.api.service.IndexSalesApiService"
id=
"indexSalesApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.FunctionApiService"
id=
"functionApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.FunctionModuleApiService"
id=
"functionModuleApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.data.api.service.performanceoverview.PerformanceOverviewApiService"
id=
"performanceOverviewApiService"
timeout=
"6000"
retries=
"0"
/>
</beans>
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