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
86318a22
Commit
86318a22
authored
Jul 22, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询支持多个门店控件id聚合
parent
13c9a261
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
0 deletions
+87
-0
StoreSearchDTO.java
...e-api/src/main/java/com/gic/store/dto/StoreSearchDTO.java
+54
-0
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+33
-0
No files found.
gic-store-api/src/main/java/com/gic/store/dto/StoreSearchDTO.java
View file @
86318a22
...
...
@@ -29,6 +29,12 @@ public class StoreSearchDTO implements Serializable {
private
Integer
completeStatus
;
private
List
<
Integer
>
storeResourceList
;
private
Integer
erpStatus
;
private
String
storeGroupIds
;
private
String
regionIds
;
private
String
storeTypes
;
private
String
storeStatuss
;
private
String
erpStatuss
;
private
String
storeTags
;
public
Integer
getStoreGroupId
()
{
return
storeGroupId
;
...
...
@@ -232,4 +238,52 @@ public class StoreSearchDTO implements Serializable {
this
.
erpStatus
=
erpStatus
;
return
this
;
}
public
String
getStoreGroupIds
()
{
return
storeGroupIds
;
}
public
void
setStoreGroupIds
(
String
storeGroupIds
)
{
this
.
storeGroupIds
=
storeGroupIds
;
}
public
String
getRegionIds
()
{
return
regionIds
;
}
public
void
setRegionIds
(
String
regionIds
)
{
this
.
regionIds
=
regionIds
;
}
public
String
getStoreTypes
()
{
return
storeTypes
;
}
public
void
setStoreTypes
(
String
storeTypes
)
{
this
.
storeTypes
=
storeTypes
;
}
public
String
getStoreStatuss
()
{
return
storeStatuss
;
}
public
void
setStoreStatuss
(
String
storeStatuss
)
{
this
.
storeStatuss
=
storeStatuss
;
}
public
String
getErpStatuss
()
{
return
erpStatuss
;
}
public
void
setErpStatuss
(
String
erpStatuss
)
{
this
.
erpStatuss
=
erpStatuss
;
}
public
String
getStoreTags
()
{
return
storeTags
;
}
public
void
setStoreTags
(
String
storeTags
)
{
this
.
storeTags
=
storeTags
;
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
86318a22
...
...
@@ -1531,6 +1531,39 @@ public class StoreApiServiceImpl implements StoreApiService {
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
LOCATION
.
getField
(),
OperateEnum
.
OPERATE_LOCATION
,
storeSearchDTO
.
getLatitude
()+
","
+
storeSearchDTO
.
getLongitude
());
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreGroupIds
())){
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
STOREGROUPIDLIST
.
getField
(),
OperateEnum
.
OPERATE_ARR_CONTAIN
,
storeSearchDTO
.
getStoreGroupIds
().
replaceAll
(
","
,
" "
));
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getRegionIds
())){
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
REGIONID
.
getField
(),
OperateEnum
.
OPERATE_ARR_CONTAIN
,
storeSearchDTO
.
getRegionIds
().
replaceAll
(
","
,
" "
));
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreTypes
())){
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
STORETYPE
.
getField
(),
OperateEnum
.
OPERATE_ARR_CONTAIN
,
storeSearchDTO
.
getStoreTypes
().
replaceAll
(
","
,
" "
));
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreStatuss
())){
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
STATUS
.
getField
(),
OperateEnum
.
OPERATE_ARR_CONTAIN
,
storeSearchDTO
.
getStoreStatuss
().
replaceAll
(
","
,
" "
));
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getErpStatuss
())){
json
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
StoreESFieldsEnum
.
ERPSTATUS
.
getField
(),
OperateEnum
.
OPERATE_ARR_CONTAIN
,
storeSearchDTO
.
getErpStatuss
().
replaceAll
(
","
,
" "
));
jsonObjectList
.
add
(
json
);
}
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreTags
())){
String
[]
arr
=
storeSearchDTO
.
getStoreTags
().
split
(
","
);
List
<
TabStoreTag
>
storeTags
=
this
.
storeTagService
.
listByEnterprise
(
storeSearchDTO
.
getEnterpriseId
());
storeTags
.
stream
().
filter
(
tag
->
{
for
(
String
s
:
arr
)
{
if
(
tag
.
getStoreTagId
().
intValue
()
==
Integer
.
valueOf
(
s
))
{
return
true
;
}
}
return
false
;
}).
map
(
tag
->
storeSearchDTO
.
getStoreResourceList
().
add
(
tag
.
getStoreTagId
()));
}
String
storeWidgetJSON
=
this
.
buildStoreWidgetJSON
(
storeSearchDTO
.
getStoreResource
()
==
null
?
null
:
storeSearchDTO
.
getStoreResource
().
intValue
(),
json
,
jsonObjectList
);
/*****如果存在没有门店权限的门店控件id,直接返回*****/
if
(
StringUtils
.
isNotBlank
(
storeWidgetJSON
))
{
...
...
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