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
68025b48
Commit
68025b48
authored
Jul 15, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
449fcf2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
22 deletions
+37
-22
StoreWidgetController.java
...a/com/gic/cloud/web/controller/StoreWidgetController.java
+37
-22
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreWidgetController.java
View file @
68025b48
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
...
...
@@ -257,30 +258,44 @@ public class StoreWidgetController {
}
}
}
else
{
//线上店铺
List
<
StoreSearchVo
>
list
=
new
ArrayList
<>();
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
search
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
for
(
ShopDTO
dto
:
result
){
StoreSearchVo
storeSearchVo
=
new
StoreSearchVo
();
storeSearchVo
.
setId
(
dto
.
getId
().
toString
());
storeSearchVo
.
setName
(
dto
.
getName
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
list
.
add
(
storeSearchVo
);
}
}
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
search
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
for
(
WmStoreDTO
wmStoreDTO
:
result1
){
StoreSearchVo
storeSearchVo
=
new
StoreSearchVo
();
storeSearchVo
.
setId
(
wmStoreDTO
.
getWmStoreId
());
storeSearchVo
.
setName
(
wmStoreDTO
.
getWmMainAccount
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
list
.
add
(
storeSearchVo
);
OnLineAuth
onlineStore
=
this
.
dataAuthUtils
.
getOnlineStore
(
userId
,
enterpriseId
);
if
(
onlineStore
.
isHasAuth
()){
List
<
StoreSearchVo
>
list
=
new
ArrayList
<>();
List
<
OnLineStore
>
onlineStoreList
=
onlineStore
.
getList
();
for
(
OnLineStore
onLineStore
:
onlineStoreList
){
if
(
onLineStore
.
getChannel
()
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
search
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
for
(
ShopDTO
dto
:
result
){
if
(
onLineStore
.
getStoreIdList
().
contains
(
dto
.
getId
().
toString
())){
StoreSearchVo
storeSearchVo
=
new
StoreSearchVo
();
storeSearchVo
.
setId
(
dto
.
getId
().
toString
());
storeSearchVo
.
setName
(
dto
.
getName
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
list
.
add
(
storeSearchVo
);
}
}
}
}
if
(
onLineStore
.
getChannel
()
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
search
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
for
(
WmStoreDTO
wmStoreDTO
:
result1
){
if
(
onLineStore
.
getStoreIdList
().
contains
(
wmStoreDTO
.
getWmStoreId
())){
StoreSearchVo
storeSearchVo
=
new
StoreSearchVo
();
storeSearchVo
.
setId
(
wmStoreDTO
.
getWmStoreId
());
storeSearchVo
.
setName
(
wmStoreDTO
.
getWmMainAccount
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
list
.
add
(
storeSearchVo
);
}
}
}
}
}
page
.
setResult
(
list
);
page
.
setTotalCount
(
list
.
size
());
page
.
setTotalPage
(
1
);
}
page
.
setResult
(
list
);
page
.
setTotalCount
(
list
.
size
());
page
.
setTotalPage
(
1
);
}
return
RestResponse
.
success
(
page
);
}
...
...
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