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
7482a248
Commit
7482a248
authored
Sep 29, 2019
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新商品权限
parent
65456c42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+6
-1
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+5
-1
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+2
-2
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
7482a248
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -33,10 +34,14 @@ public class GoodsBrandController {
@RequestMapping
(
"/goods-brand-list"
)
public
RestResponse
goodsBrandList
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
,
String
channelCode
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
// 是否最高权限
List
<
Long
>
branIdList
=
new
ArrayList
<>();
if
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
!=
null
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(
selectorDTOServiceResponse
.
isSuccess
())
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
selectorDTOServiceResponse
.
getResult
();
if
(
goodsRightsSelectorDTO
!=
null
)
{
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsDomainController.java
View file @
7482a248
...
...
@@ -37,13 +37,17 @@ public class GoodsDomainController {
*/
@RequestMapping
(
"/get-all-goods-domain-list"
)
private
RestResponse
getAllGoodsDomianListWith
()
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
ServiceResponse
<
List
<
GoodsDomainDTO
>>
serviceResponse
=
goodsDomainApiService
.
listAll
(
Constant
.
TEST_ENTERPRISE_ID
,
null
);
// 是否最高权限
boolean
isHighestRights
=
true
;
JSONObject
json
=
null
;
if
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
!=
null
)
{
isHighestRights
=
false
;
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(
selectorDTOServiceResponse
.
isSuccess
())
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
selectorDTOServiceResponse
.
getResult
();
if
(
goodsRightsSelectorDTO
!=
null
)
{
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
7482a248
...
...
@@ -58,7 +58,7 @@ public class GoodsSelectorController {
public
RestResponse
goodsSelectorSave
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
46703961214504960L
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
}
...
...
@@ -78,7 +78,7 @@ public class GoodsSelectorController {
@RequestMapping
(
"change-goods-rights-for-selector"
)
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
48157557076766720L
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
Constant
.
TEST_GOODS_RIGHTS_SELECTOR_ID
);
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
}
...
...
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