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
0b173859
Commit
0b173859
authored
Jul 28, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询支持多个门店控件id聚合
parent
7f85c6a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
30 deletions
+5
-30
StoreWidgetApiServiceImpl.java
...c/store/service/outer/impl/StoreWidgetApiServiceImpl.java
+5
-30
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreWidgetApiServiceImpl.java
View file @
0b173859
...
...
@@ -79,14 +79,9 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
public
ServiceResponse
<
Page
<
StoreDTO
>>
listStoreByStoreWidgetId
(
Integer
enterpriseId
,
Integer
storeWidgetId
,
int
pageNum
,
int
pageSize
)
{
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
);
if
(
storeWidgetDTO
!=
null
){
String
authSearchParam
=
storeWidgetDTO
.
getAuthSearchParam
();
String
searchParam
=
storeWidgetDTO
.
getSearchParam
();
StoreSearchDTO
dto
=
new
StoreSearchDTO
();
dto
.
setEnterpriseId
(
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
authSearchParam
)
&&
!
"{}"
.
equals
(
authSearchParam
)){
dto
.
setAuthSearchJson
(
authSearchParam
);
}
dto
.
setSearchJson
(
searchParam
);
dto
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
));
return
this
.
storeApiService
.
listStore
(
dto
,
pageNum
,
pageSize
);
}
return
ServiceResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"门店控件id不存在"
);
...
...
@@ -96,14 +91,9 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
public
ServiceResponse
<
Page
<
Integer
>>
listStoreIdByStoreWidgetId
(
Integer
enterpriseId
,
Integer
storeWidgetId
,
int
pageNum
,
int
pageSize
)
{
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
);
if
(
storeWidgetDTO
!=
null
){
String
authSearchParam
=
storeWidgetDTO
.
getAuthSearchParam
();
String
searchParam
=
storeWidgetDTO
.
getSearchParam
();
StoreSearchDTO
dto
=
new
StoreSearchDTO
();
dto
.
setEnterpriseId
(
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
authSearchParam
)
&&
!
"{}"
.
equals
(
authSearchParam
)){
dto
.
setAuthSearchJson
(
authSearchParam
);
}
dto
.
setSearchJson
(
searchParam
);
dto
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
));
ServiceResponse
<
Page
<
StoreDTO
>>
response
=
this
.
storeApiService
.
listStore
(
dto
,
pageNum
,
pageSize
,
StoreESFieldsEnum
.
STOREID
.
getField
()
+
""
);
Page
<
Integer
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
...
...
@@ -124,14 +114,9 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
public
ServiceResponse
<
Page
<
Integer
>>
listStoreInfoIdByStoreWidgetId
(
Integer
enterpriseId
,
Integer
storeWidgetId
,
int
pageNum
,
int
pageSize
)
{
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
);
if
(
storeWidgetDTO
!=
null
){
String
authSearchParam
=
storeWidgetDTO
.
getAuthSearchParam
();
String
searchParam
=
storeWidgetDTO
.
getSearchParam
();
StoreSearchDTO
dto
=
new
StoreSearchDTO
();
dto
.
setEnterpriseId
(
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
authSearchParam
)
&&
!
"{}"
.
equals
(
authSearchParam
)){
dto
.
setAuthSearchJson
(
authSearchParam
);
}
dto
.
setSearchJson
(
searchParam
);
dto
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
));
ServiceResponse
<
Page
<
StoreDTO
>>
response
=
this
.
storeApiService
.
listStore
(
dto
,
pageNum
,
pageSize
,
StoreESFieldsEnum
.
STOREINFOID
.
getField
()
+
""
);
Page
<
Integer
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
...
...
@@ -187,14 +172,9 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
public
ServiceResponse
exist
(
Integer
enterpriseId
,
Integer
storeWidgetId
,
Integer
storeId
)
{
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
);
if
(
storeWidgetDTO
!=
null
){
String
authSearchParam
=
storeWidgetDTO
.
getAuthSearchParam
();
String
searchParam
=
storeWidgetDTO
.
getSearchParam
();
StoreSearchDTO
dto
=
new
StoreSearchDTO
();
dto
.
setEnterpriseId
(
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
authSearchParam
)
&&
!
"{}"
.
equals
(
authSearchParam
)){
dto
.
setAuthSearchJson
(
authSearchParam
);
}
dto
.
setSearchJson
(
searchParam
);
dto
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
));
dto
.
setStoreIds
(
storeId
+
""
);
ServiceResponse
<
Long
>
response
=
this
.
storeApiService
.
queryStoreCountFromES
(
dto
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
>
0
){
...
...
@@ -213,14 +193,9 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
public
ServiceResponse
existByStoreInfoId
(
Integer
enterpriseId
,
Integer
storeWidgetId
,
Integer
storeInfoId
)
{
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
);
if
(
storeWidgetDTO
!=
null
){
String
authSearchParam
=
storeWidgetDTO
.
getAuthSearchParam
();
String
searchParam
=
storeWidgetDTO
.
getSearchParam
();
StoreSearchDTO
dto
=
new
StoreSearchDTO
();
dto
.
setEnterpriseId
(
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
authSearchParam
)
&&
!
"{}"
.
equals
(
authSearchParam
)){
dto
.
setAuthSearchJson
(
authSearchParam
);
}
dto
.
setSearchJson
(
searchParam
);
dto
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
));
dto
.
setStoreInfoIds
(
storeInfoId
+
""
);
ServiceResponse
<
Long
>
response
=
this
.
storeApiService
.
queryStoreCountFromES
(
dto
);
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
>
0
){
...
...
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