Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
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-webapp-plug
Commits
56239398
Commit
56239398
authored
Jul 17, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询门店选择器配置
parent
a59a1351
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
1 deletions
+115
-1
pom.xml
pom.xml
+10
-1
ScreeningController.java
...java/com/gic/plug/web/controller/ScreeningController.java
+105
-0
No files found.
pom.xml
View file @
56239398
...
...
@@ -107,7 +107,16 @@
<artifactId>
gic-thirdparty-sdk
</artifactId>
<version>
${gic-thirdparty-sdk}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
widget-screening-api
</artifactId>
<version>
${widget-screening-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-enterprise-base-api
</artifactId>
<version>
${gic-enterprise-base-api}
</version>
</dependency>
</dependencies>
<build>
...
...
src/main/java/com/gic/plug/web/controller/ScreeningController.java
0 → 100644
View file @
56239398
package
com
.
gic
.
plug
.
web
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.widget.screening.api.dto.*
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.gic.widget.screening.api.service.EsScreeningInitService
;
import
com.gic.widget.screening.api.service.EsScreeningSearchService
;
import
com.gic.widget.screening.api.service.EsScreeningTemplateService
;
/**
*
*/
@Controller
public
class
ScreeningController
{
private
Logger
LOGGER
=
LogManager
.
getLogger
(
ScreeningController
.
class
);
@Autowired
private
EsScreeningInitService
esScreeningInitService
;
@Autowired
private
EsScreeningTemplateService
esScreeningTemplateService
;
@Autowired
private
EsScreeningSearchService
esScreeningSearchService
;
/**
*
* @Title: getScreeningTemplate
* @Description: 获取模板
* @author xugh
* @return
* @throws
*/
@RequestMapping
(
"get-screening-template"
)
@ResponseBody
public
RestResponse
getScreeningTemplate
()
{
List
<
EsScreeningTemplateDTO
>
list
=
this
.
esScreeningTemplateService
.
queryEsScreeningTemplateList
();
return
RestResponse
.
success
(
list
);
}
/**
*
* @Title: getScreeningInitData
* @Description: 获取初始化筛选条件
* @author xugh
* @param sceneCode
* @return
* @throws
*/
@RequestMapping
(
"get-screening-init-data"
)
@ResponseBody
public
RestResponse
getScreeningInitData
(
@RequestParam
(
defaultValue
=
"member"
)
String
sceneCode
)
{
String
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
().
toString
();
if
(
Constants
.
STORE_SCENECODE
.
equals
(
sceneCode
)){
enterpriseId
=
Constants
.
INDEX_ENTERPRISEID
;
}
List
<
EsScreeningEnterpriseCategorySceneInfoDTO
>
list
=
this
.
esScreeningInitService
.
queryEsScreeningByEnterpriseAndScene
(
enterpriseId
,
sceneCode
);
List
<
EsScreeningChainDetailDTO
>
all
=
new
ArrayList
<>();
for
(
EsScreeningEnterpriseCategorySceneInfoDTO
dto
:
list
)
{
String
categoryId
=
dto
.
getSceneCategoryId
();
EsScreeningChainDetailDTO
item
=
this
.
esScreeningInitService
.
findRootChainByCategoryId
(
categoryId
);
all
.
add
(
item
);
}
return
RestResponse
.
success
(
all
);
}
@RequestMapping
(
"get-screening-data"
)
@ResponseBody
public
RestResponse
getScreeningData
(
String
widgetChainId
)
{
List
<
EsScreeningChainDetailDTO
>
list
=
this
.
esScreeningInitService
.
queryEsScreeningByParentChainId
(
widgetChainId
);
return
RestResponse
.
success
(
list
);
}
@RequestMapping
(
"get-screening-chain-detail"
)
@ResponseBody
public
RestResponse
getScreeningChainDetail
(
String
parentChainId
,
String
widgetFieldKey
)
{
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
parentChainId
,
widgetFieldKey
);
return
RestResponse
.
success
(
dto
);
}
@RequestMapping
(
"get-screening-widget-chain-detail"
)
@ResponseBody
public
Object
getScreeningWidgetDetail
(
String
widgetChainId
){
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
widgetChainId
);
return
RestResponse
.
success
(
dto
);
}
}
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