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
f7ade72d
Commit
f7ade72d
authored
Apr 09, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店标签回写
parent
47326ba1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
29 deletions
+39
-29
ScreeningController.java
...java/com/gic/plug/web/controller/ScreeningController.java
+0
-26
StoreController.java
...ain/java/com/gic/plug/web/controller/StoreController.java
+39
-3
No files found.
src/main/java/com/gic/plug/web/controller/ScreeningController.java
View file @
f7ade72d
...
@@ -131,30 +131,4 @@ public class ScreeningController {
...
@@ -131,30 +131,4 @@ public class ScreeningController {
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
widgetChainId
);
EsScreeningChainDetailDTO
dto
=
this
.
esScreeningInitService
.
findChainDetail
(
widgetChainId
);
return
RestResponse
.
success
(
dto
);
return
RestResponse
.
success
(
dto
);
}
}
@RequestMapping
(
"get-user-store-resource"
)
@ResponseBody
public
RestResponse
getUserStoreResouce
()
throws
ClassNotFoundException
{
if
(
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
()
!=
1
){
ServiceResponse
<
UserResourceDTO
>
resource
=
this
.
userResourceApiService
.
getResourceByUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
if
(
resource
.
isSuccess
()
&&
resource
.
getResult
()
!=
null
)
{
ServiceResponse
<
ResourceDTO
>
serviceResource
=
this
.
resourceApiService
.
getResource
(
resource
.
getResult
().
getResourceId
());
if
(
serviceResource
.
isSuccess
()
&&
serviceResource
.
getResult
()
!=
null
){
ServiceResponse
<
StoreWidgetDTO
>
storeWidget
=
this
.
storeWidgetApiService
.
getStoreWidget
(
serviceResource
.
getResult
().
getStoreResource
().
intValue
());
if
(
storeWidget
.
isSuccess
()
&&
storeWidget
.
getResult
()
!=
null
){
StoreResourceVO
vo
=
new
StoreResourceVO
();
vo
.
setAuthMode
(
storeWidget
.
getResult
().
getAuthMode
());
vo
.
setSearchJson
(
storeWidget
.
getResult
().
getSearchParam
());
vo
.
setSceenBack
(
this
.
getScreenBack
(
storeWidget
.
getResult
().
getSearchParam
()));
return
RestResponse
.
success
(
vo
);
}
}
}
}
return
RestResponse
.
success
(
new
StoreResourceVO
());
}
}
}
src/main/java/com/gic/plug/web/controller/StoreController.java
View file @
f7ade72d
...
@@ -4,12 +4,18 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,12 +4,18 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ResourceDTO
;
import
com.gic.auth.dto.UserResourceDTO
;
import
com.gic.auth.service.ResourceApiService
;
import
com.gic.auth.service.UserResourceApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.plug.web.qo.StoreWidgetCountQO
;
import
com.gic.plug.web.qo.StoreWidgetCountQO
;
import
com.gic.plug.web.qo.StoreWidgetQO
;
import
com.gic.plug.web.qo.StoreWidgetQO
;
import
com.gic.plug.web.strategy.init.StrategyInit
;
import
com.gic.plug.web.vo.StoreRegionVO
;
import
com.gic.plug.web.vo.StoreRegionVO
;
import
com.gic.plug.web.vo.StoreResourceVO
;
import
com.gic.plug.web.vo.StoreVO
;
import
com.gic.plug.web.vo.StoreVO
;
import
com.gic.plug.web.vo.StoreWidgetVO
;
import
com.gic.plug.web.vo.StoreWidgetVO
;
import
com.gic.search.business.api.constant.enums.OperateEnum
;
import
com.gic.search.business.api.constant.enums.OperateEnum
;
...
@@ -44,6 +50,14 @@ public class StoreController {
...
@@ -44,6 +50,14 @@ public class StoreController {
private
StoreApiService
storeApiService
;
private
StoreApiService
storeApiService
;
@Autowired
@Autowired
private
StoreWidgetApiService
storeWidgetApiService
;
private
StoreWidgetApiService
storeWidgetApiService
;
@Autowired
private
StrategyInit
strategyInit
;
@Autowired
private
StoreWidgetApiService
storeWidgetApiService
;
@Autowired
private
UserResourceApiService
userResourceApiService
;
@Autowired
private
ResourceApiService
resourceApiService
;
@RequestMapping
(
"/list-store-region"
)
@RequestMapping
(
"/list-store-region"
)
public
RestResponse
listStoreRegion
(
String
search
)
{
public
RestResponse
listStoreRegion
(
String
search
)
{
...
@@ -103,7 +117,7 @@ public class StoreController {
...
@@ -103,7 +117,7 @@ public class StoreController {
}
}
@RequestMapping
(
"get-store-widget"
)
@RequestMapping
(
"get-store-widget"
)
public
RestResponse
getStoreWidget
(
Integer
storeWidgetId
){
public
RestResponse
getStoreWidget
(
Integer
storeWidgetId
)
throws
ClassNotFoundException
{
ServiceResponse
<
StoreWidgetDTO
>
response
=
this
.
storeWidgetApiService
.
getStoreWidget
(
storeWidgetId
);
ServiceResponse
<
StoreWidgetDTO
>
response
=
this
.
storeWidgetApiService
.
getStoreWidget
(
storeWidgetId
);
StoreWidgetVO
storeWidgetVO
=
EntityUtil
.
changeEntityByJSON
(
StoreWidgetVO
.
class
,
response
.
getResult
());
StoreWidgetVO
storeWidgetVO
=
EntityUtil
.
changeEntityByJSON
(
StoreWidgetVO
.
class
,
response
.
getResult
());
storeWidgetVO
.
setScreenBack
(
this
.
getScreenBack
(
storeWidgetVO
.
getSearchParam
()));
storeWidgetVO
.
setScreenBack
(
this
.
getScreenBack
(
storeWidgetVO
.
getSearchParam
()));
...
@@ -112,11 +126,33 @@ public class StoreController {
...
@@ -112,11 +126,33 @@ public class StoreController {
@RequestMapping
(
"screen-back"
)
@RequestMapping
(
"screen-back"
)
@ResponseBody
@ResponseBody
public
Object
screenBack
(
String
param
){
public
Object
screenBack
(
String
param
)
throws
ClassNotFoundException
{
return
RestResponse
.
success
(
this
.
getScreenBack
(
param
));
return
RestResponse
.
success
(
this
.
getScreenBack
(
param
));
}
}
private
String
getScreenBack
(
String
param
)
{
@RequestMapping
(
"get-user-store-resource"
)
@ResponseBody
public
RestResponse
getUserStoreResouce
()
throws
ClassNotFoundException
{
if
(
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
()
!=
1
){
ServiceResponse
<
UserResourceDTO
>
resource
=
this
.
userResourceApiService
.
getResourceByUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
if
(
resource
.
isSuccess
()
&&
resource
.
getResult
()
!=
null
)
{
ServiceResponse
<
ResourceDTO
>
serviceResource
=
this
.
resourceApiService
.
getResource
(
resource
.
getResult
().
getResourceId
());
if
(
serviceResource
.
isSuccess
()
&&
serviceResource
.
getResult
()
!=
null
){
ServiceResponse
<
StoreWidgetDTO
>
storeWidget
=
this
.
storeWidgetApiService
.
getStoreWidget
(
serviceResource
.
getResult
().
getStoreResource
().
intValue
());
if
(
storeWidget
.
isSuccess
()
&&
storeWidget
.
getResult
()
!=
null
){
StoreResourceVO
vo
=
new
StoreResourceVO
();
vo
.
setAuthMode
(
storeWidget
.
getResult
().
getAuthMode
());
vo
.
setSearchJson
(
storeWidget
.
getResult
().
getSearchParam
());
vo
.
setSceenBack
(
this
.
getScreenBack
(
storeWidget
.
getResult
().
getSearchParam
()));
return
RestResponse
.
success
(
vo
);
}
}
}
}
return
RestResponse
.
success
(
new
StoreResourceVO
());
}
private
String
getScreenBack
(
String
param
)
throws
ClassNotFoundException
{
if
(
StringUtils
.
isBlank
(
param
)){
if
(
StringUtils
.
isBlank
(
param
)){
return
""
;
return
""
;
}
}
...
...
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