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
6d121d86
Commit
6d121d86
authored
Oct 08, 2019
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
4fdb48f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+19
-0
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+21
-2
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
6d121d86
...
...
@@ -56,6 +56,25 @@ public class GoodsBrandController {
}
}
}
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
);
}
/**
* 权限商品筛选器的品牌接口
* @param pageSize
* @param currentPage
* @param search
* @param goodsDomainId
* @return
*/
@RequestMapping
(
"/goods-brand-list-for-rights"
)
public
RestResponse
goodsBrandListForRights
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
)
{
return
findBrandListByParams
(
currentPage
,
pageSize
,
goodsDomainId
,
search
);
}
private
RestResponse
findBrandListByParams
(
int
currentPage
,
int
pageSize
,
Long
goodsDomainId
,
String
search
)
{
List
<
Long
>
branIdList
=
new
ArrayList
<>();
ServiceResponse
<
Page
<
BrandDTO
>>
serviceResponse
=
brandApiService
.
findBrandPage
(
currentPage
,
pageSize
,
goodsDomainId
,
search
,
branIdList
,
SortType
.
sortDescType
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsDomainController.java
View file @
6d121d86
...
...
@@ -29,6 +29,22 @@ public class GoodsDomainController {
private
GoodsRightsSelectorApiService
goodsRightsSelectorApiService
;
/**
* @Title: getAllGoodsDomianListWith
* @Description: 权限筛选器选择权限
* @author majia
* @return com.gic.commons.webapi.reponse.RestResponse
* @throws
*/
@RequestMapping
(
"/get-all-goods-domain-list-for-rights"
)
public
RestResponse
getAllGoodsDomainListForRights
()
{
ServiceResponse
<
List
<
GoodsDomainDTO
>>
serviceResponse
=
goodsDomainApiService
.
listAll
(
Constant
.
TEST_ENTERPRISE_ID
,
null
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
return
listGoodsDomain
(
true
,
serviceResponse
.
getResult
(),
null
);
}
/**
* @Title: getAllGoodsDomianListWith
* @Description: 查询企业下所有的域,拼接成channelVO返回
* @author majia
...
...
@@ -36,7 +52,7 @@ public class GoodsDomainController {
* @throws
*/
@RequestMapping
(
"/get-all-goods-domain-list"
)
p
rivate
RestResponse
getAllGoodsDomianListWith
()
{
p
ublic
RestResponse
getAllGoodsDomianList
()
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
...
...
@@ -61,7 +77,10 @@ public class GoodsDomainController {
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
List
<
GoodsDomainDTO
>
goodsDomainDTOList
=
serviceResponse
.
getResult
();
return
listGoodsDomain
(
isHighestRights
,
serviceResponse
.
getResult
(),
json
);
}
private
RestResponse
listGoodsDomain
(
boolean
isHighestRights
,
List
<
GoodsDomainDTO
>
goodsDomainDTOList
,
JSONObject
json
)
{
Map
<
String
,
List
<
GoodsDomainDTO
>>
map
=
new
TreeMap
<>();
if
(
CollectionUtils
.
isEmpty
(
goodsDomainDTOList
))
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
...
...
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