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
2400ef70
Commit
2400ef70
authored
Apr 02, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
2318b7f7
ac0ce295
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
94 additions
and
36 deletions
+94
-36
DataAuthUtils.java
...p/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
+1
-0
IndexController.java
...in/java/com/gic/cloud/web/controller/IndexController.java
+4
-4
StoreSearchUtils.java
...n/java/com/gic/cloud/web/controller/StoreSearchUtils.java
+3
-32
StoreWidgetController.java
...a/com/gic/cloud/web/controller/StoreWidgetController.java
+0
-0
StoreSearchQo.java
...app/src/main/java/com/gic/cloud/web/qo/StoreSearchQo.java
+20
-0
MbrVo.java
...cloud-wxapp/src/main/java/com/gic/cloud/web/vo/MbrVo.java
+9
-0
OnLineStoreVo.java
...app/src/main/java/com/gic/cloud/web/vo/OnLineStoreVo.java
+9
-0
StoreGroupItemsVo.java
...src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
+12
-0
StoreSearchVo.java
...app/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
+12
-0
StoreTypeVo.java
...wxapp/src/main/java/com/gic/cloud/web/vo/StoreTypeVo.java
+12
-0
StoreWidgetIndexVo.java
...rc/main/java/com/gic/cloud/web/vo/StoreWidgetIndexVo.java
+12
-0
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
View file @
2400ef70
...
...
@@ -147,6 +147,7 @@ public class DataAuthUtils {
MbrVo
vo
=
new
MbrVo
();
vo
.
setMbrAreaId
(
dto
.
getAreaId
().
toString
());
vo
.
setMbrAreaName
(
dto
.
getName
());
vo
.
setOwnType
(
dto
.
getOwnerFlag
());
return
vo
;
}).
collect
(
Collectors
.
toList
());
}
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/IndexController.java
View file @
2400ef70
...
...
@@ -62,8 +62,8 @@ public class IndexController {
@RequestMapping
(
"index-mbr"
)
public
RestResponse
indexMbr
(
Integer
enterpriseId
,
Integer
userId
){
//
List<MbrVo> mbrArea = this.dataAuthUtils.getMbrArea(userId, enterpriseId);
return
RestResponse
.
success
();
List
<
MbrVo
>
mbrArea
=
this
.
dataAuthUtils
.
getMbrArea
(
userId
,
enterpriseId
);
return
RestResponse
.
success
(
mbrArea
);
}
@RequestMapping
(
"index-sales"
)
...
...
@@ -91,10 +91,10 @@ public class IndexController {
list
.
add
(-
1
);
onLine
.
add
(
"-1"
);
}
//
List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
List
<
Long
>
mbrAreaIdList
=
this
.
dataAuthUtils
.
getMbrAreaId
(
userId
,
enterpriseId
);
ServiceResponse
<
IndexMemberDTO
>
indexMember
=
this
.
indexSalesApiService
.
getIndexMember
(
enterpriseId
,
list
,
onLine
,
StringUtils
.
isNoneBlank
(
mbrAreaId
)
?
Long
.
valueOf
(
mbrAreaId
)
:
null
,
null
,
dateTypeQo
.
getType
(),
dateTypeQo
.
getDate
());
mbrAreaIdList
,
dateTypeQo
.
getType
(),
dateTypeQo
.
getDate
());
return
RestResponse
.
success
(
indexMember
.
getResult
());
}
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreSearchUtils.java
View file @
2400ef70
...
...
@@ -88,14 +88,6 @@ public class StoreSearchUtils {
return
list
;
}
List
<
Integer
>
resultList
=
new
ArrayList
<>();
TempStoreConditionDTO
tempStoreConditionDTO
=
this
.
tempStoreConditionApiService
.
getTempStoreCondition
(
enterpriseId
).
getResult
();
List
<
Integer
>
tempStoreIdList
=
new
ArrayList
<>();
if
(
tempStoreConditionDTO
!=
null
)
{
Integer
tempStoreId
=
tempStoreConditionDTO
.
getStoreWidgetId
();
tempStoreIdList
=
this
.
storeWidgetApiService
.
listStoreInfoIdByStoreWidgetId
(
enterpriseId
,
tempStoreId
).
getResult
();
}
final
List
<
Integer
>
tempStoreIdListf
=
tempStoreIdList
;
log
.
info
(
"tempStoreIdList:{}"
,
JSON
.
toJSONString
(
tempStoreIdListf
));
if
(
StringUtils
.
isNotBlank
(
searchJson
)){
JSONObject
json
=
JSON
.
parseObject
(
searchJson
);
StoreSearchQo
storeSearchQo
=
json
.
getObject
(
StoreChannelEnum
.
OFFLINE
.
getChannel
().
toString
(),
StoreSearchQo
.
class
);
...
...
@@ -111,6 +103,7 @@ public class StoreSearchUtils {
storeSearchDTO
.
setStoreStatuss
(
StringUtils
.
isBlank
(
storeSearchQo
.
getStoreStatus
())
?
null
:
storeSearchQo
.
getStoreStatus
().
replaceAll
(
","
,
" "
));
storeSearchDTO
.
setRealStatuss
(
StringUtils
.
isBlank
(
storeSearchQo
.
getErpStatus
())
?
null
:
storeSearchQo
.
getErpStatus
().
replaceAll
(
","
,
" "
));
storeSearchDTO
.
setStoreTags
(
StringUtils
.
isBlank
(
storeSearchQo
.
getStoreTag
())
?
null
:
storeSearchQo
.
getStoreTag
().
replaceAll
(
","
,
" "
));
storeSearchDTO
.
setStoreBrandIds
(
StringUtils
.
isBlank
(
storeSearchQo
.
getStoreBrand
())
?
null
:
storeSearchQo
.
getStoreBrand
().
replaceAll
(
","
,
" "
));
if
(
storeSearchQo
.
getAttentionStore
()
==
1
){
List
<
AttentionStoreDTO
>
result
=
this
.
storeAttentionApiService
.
pageStoreAttention
(
userId
,
enterpriseId
,
1
,
Integer
.
MAX_VALUE
).
getResult
().
getResult
();
List
<
Integer
>
list
=
result
.
stream
().
filter
(
t
->
{
...
...
@@ -123,11 +116,6 @@ public class StoreSearchUtils {
String
storeInfoIds
=
StringUtils
.
join
(
list
,
" "
);
storeSearchDTO
.
setStoreInfoIds
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreInfoIds
())
?
storeSearchDTO
.
getStoreInfoIds
()+
" "
+
storeInfoIds
:
storeInfoIds
);
}
if
(
storeSearchQo
.
getTmpStore
()
==
0
){
if
(
CollectionUtils
.
isNotEmpty
(
tempStoreIdList
)){
storeSearchDTO
.
setStoreInfoIdsOfNot
(
StringUtils
.
join
(
tempStoreIdList
,
" "
));
}
}
ServiceResponse
<
Page
<
StoreDTO
>>
pageServiceResponse
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
1
,
20000
);
log
.
info
(
"storeResule:{}"
,
JSON
.
toJSONString
(
pageServiceResponse
));
if
(
pageServiceResponse
.
isSuccess
()
&&
pageServiceResponse
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
pageServiceResponse
.
getResult
().
getResult
())){
...
...
@@ -142,11 +130,11 @@ public class StoreSearchUtils {
}
return
false
;
}).
collect
(
Collectors
.
toList
());
}
else
{
resultList
=
storeInfoIdList
;
}
}
}
}
else
{
resultList
=
storeSearchJsonWhenNull
(
storeAuth
,
tempStoreIdListf
);
}
if
(
CollectionUtils
.
isNotEmpty
(
resultList
)){
RedisUtil
.
setCache
(
key
,
1
,
10L
,
TimeUnit
.
MINUTES
);
...
...
@@ -157,23 +145,6 @@ public class StoreSearchUtils {
return
resultList
;
}
private
List
<
Integer
>
storeSearchJsonWhenNull
(
StoreAuth
storeAuth
,
final
List
<
Integer
>
tempStoreIdListf
)
{
if
(
CollectionUtils
.
isNotEmpty
(
storeAuth
.
getStoreInfoIdList
())){
return
storeAuth
.
getStoreInfoIdList
().
stream
().
filter
(
s
->
{
if
(
CollectionUtils
.
isNotEmpty
(
tempStoreIdListf
)){
if
(
tempStoreIdListf
.
contains
(
s
)){
return
false
;
}
else
{
return
true
;
}
}
else
{
return
true
;
}
}).
collect
(
Collectors
.
toList
());
}
return
new
ArrayList
<>();
}
public
List
<
String
>
onLineStoreSearch
(
Integer
userId
,
Integer
enterpriseId
,
String
searchJson
){
OnLineAuth
onlineStoreAuth
=
this
.
dataAuthUtils
.
getOnlineStore
(
userId
,
enterpriseId
);
log
.
info
(
"onlineStoreAuth:{}"
,
JSON
.
toJSONString
(
onlineStoreAuth
));
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreWidgetController.java
View file @
2400ef70
This diff is collapsed.
Click to expand it.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/qo/StoreSearchQo.java
View file @
2400ef70
...
...
@@ -28,6 +28,10 @@ public class StoreSearchQo {
*/
private
Integer
hasWgs
=
0
;
private
String
storeBrand
;
private
String
resourceType
;
public
Integer
getAll
()
{
return
all
;
}
...
...
@@ -115,4 +119,20 @@ public class StoreSearchQo {
public
void
setHasWgs
(
Integer
hasWgs
)
{
this
.
hasWgs
=
hasWgs
;
}
public
String
getStoreBrand
()
{
return
storeBrand
;
}
public
void
setStoreBrand
(
String
storeBrand
)
{
this
.
storeBrand
=
storeBrand
;
}
public
String
getResourceType
()
{
return
resourceType
;
}
public
void
setResourceType
(
String
resourceType
)
{
this
.
resourceType
=
resourceType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/MbrVo.java
View file @
2400ef70
...
...
@@ -9,6 +9,7 @@ package com.gic.cloud.web.vo;
public
class
MbrVo
{
private
String
mbrAreaId
;
private
String
mbrAreaName
;
private
Integer
ownType
;
public
String
getMbrAreaId
()
{
return
mbrAreaId
;
...
...
@@ -25,4 +26,12 @@ public class MbrVo {
public
void
setMbrAreaName
(
String
mbrAreaName
)
{
this
.
mbrAreaName
=
mbrAreaName
;
}
public
Integer
getOwnType
()
{
return
ownType
;
}
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/OnLineStoreVo.java
View file @
2400ef70
...
...
@@ -12,6 +12,7 @@ public class OnLineStoreVo {
private
String
idChain
;
private
String
nameChain
;
private
Integer
hasChildren
=
0
;
private
Integer
ownType
;
public
Integer
getHasChildren
()
{
...
...
@@ -53,4 +54,12 @@ public class OnLineStoreVo {
public
void
setNameChain
(
String
nameChain
)
{
this
.
nameChain
=
nameChain
;
}
public
Integer
getOwnType
()
{
return
ownType
;
}
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
View file @
2400ef70
...
...
@@ -14,6 +14,10 @@ public class StoreGroupItemsVo {
private
Integer
isStore
=
0
;
private
Integer
hasChildren
=
0
;
private
Integer
hasAttention
=
0
;
/**
* 1自有 2共享
*/
private
Integer
ownType
;
public
Integer
getId
()
{
return
id
;
...
...
@@ -70,4 +74,12 @@ public class StoreGroupItemsVo {
public
void
setHasAttention
(
Integer
hasAttention
)
{
this
.
hasAttention
=
hasAttention
;
}
public
Integer
getOwnType
()
{
return
ownType
;
}
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
View file @
2400ef70
...
...
@@ -15,6 +15,10 @@ public class StoreSearchVo {
private
Integer
channel
;
private
Integer
hasAttention
=
0
;
private
Integer
hasChildren
=
0
;
/**
* 1自有 2共享
*/
private
Integer
ownType
;
public
String
getId
()
{
return
id
;
...
...
@@ -79,4 +83,12 @@ public class StoreSearchVo {
public
void
setHasChildren
(
Integer
hasChildren
)
{
this
.
hasChildren
=
hasChildren
;
}
public
Integer
getOwnType
()
{
return
ownType
;
}
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreTypeVo.java
View file @
2400ef70
...
...
@@ -9,6 +9,10 @@ package com.gic.cloud.web.vo;
public
class
StoreTypeVo
{
private
String
id
;
private
String
name
;
/**
* 1自有 2共享
*/
private
Integer
ownType
;
public
String
getId
()
{
return
id
;
...
...
@@ -25,4 +29,12 @@ public class StoreTypeVo {
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getOwnType
()
{
return
ownType
;
}
public
void
setOwnType
(
Integer
ownType
)
{
this
.
ownType
=
ownType
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreWidgetIndexVo.java
View file @
2400ef70
...
...
@@ -15,6 +15,10 @@ public class StoreWidgetIndexVo {
private
Integer
attentionCount
=
0
;
private
Integer
singleRegion
=
0
;
private
Integer
hasWgs
=
0
;
/**
* 是否显示资源类型 1是 0否
*/
private
Integer
resourceType
=
0
;
public
Integer
getType
()
{
return
type
;
...
...
@@ -55,4 +59,12 @@ public class StoreWidgetIndexVo {
public
void
setHasWgs
(
Integer
hasWgs
)
{
this
.
hasWgs
=
hasWgs
;
}
public
Integer
getResourceType
()
{
return
resourceType
;
}
public
void
setResourceType
(
Integer
resourceType
)
{
this
.
resourceType
=
resourceType
;
}
}
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