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
ffbda0a6
Commit
ffbda0a6
authored
Mar 18, 2020
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUGFIX
parent
8e44147a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
18 deletions
+20
-18
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+3
-1
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+4
-3
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+13
-14
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
ffbda0a6
...
@@ -35,7 +35,9 @@ public class GoodsBrandController {
...
@@ -35,7 +35,9 @@ public class GoodsBrandController {
@RequestMapping
(
"/goods-brand-list"
)
@RequestMapping
(
"/goods-brand-list"
)
public
RestResponse
goodsBrandList
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
,
String
channelCode
)
{
public
RestResponse
goodsBrandList
(
int
pageSize
,
int
currentPage
,
String
search
,
Long
goodsDomainId
,
String
channelCode
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsDomainController.java
View file @
ffbda0a6
...
@@ -54,9 +54,10 @@ public class GoodsDomainController {
...
@@ -54,9 +54,10 @@ public class GoodsDomainController {
*/
*/
@RequestMapping
(
"/get-all-goods-domain-list"
)
@RequestMapping
(
"/get-all-goods-domain-list"
)
public
RestResponse
getAllGoodsDomianList
()
{
public
RestResponse
getAllGoodsDomianList
()
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
if
(!
selectorDTOServiceResponse
.
isSuccess
()
||
selectorDTOServiceResponse
.
getResult
()
==
null
||
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
selectorDTOServiceResponse
.
getResult
().
getHasRights
()
==
Constant
.
NO
)
{
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
ffbda0a6
...
@@ -65,8 +65,10 @@ public class GoodsSelectorController {
...
@@ -65,8 +65,10 @@ public class GoodsSelectorController {
public
RestResponse
goodsSelectorSave
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
public
RestResponse
goodsSelectorSave
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
}
}
...
@@ -85,13 +87,11 @@ public class GoodsSelectorController {
...
@@ -85,13 +87,11 @@ public class GoodsSelectorController {
@RequestMapping
(
"goods-selector-show"
)
@RequestMapping
(
"goods-selector-show"
)
public
RestResponse
goodsSelectorShow
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
public
RestResponse
goodsSelectorShow
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
if
(
UserDetailUtils
.
getUserDetail
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"请重新登录"
);
}
log
.
info
(
"getUserDetail:{}"
,
JSONObject
.
toJSONString
(
UserDetailUtils
.
getUserDetail
()));
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
...
@@ -113,12 +113,9 @@ public class GoodsSelectorController {
...
@@ -113,12 +113,9 @@ public class GoodsSelectorController {
@RequestMapping
(
"change-goods-rights-for-selector"
)
@RequestMapping
(
"change-goods-rights-for-selector"
)
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
if
(
goodsSelectorId
==
null
)
{
if
(
goodsSelectorId
==
null
)
{
if
(
UserDetailUtils
.
getUserDetail
().
getUserInfo
()
==
null
)
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"没有权限"
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
}
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
log
.
info
(
"getUserDetail:{}"
,
JSONObject
.
toJSONString
(
UserDetailUtils
.
getUserDetail
()));
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(
serviceResponse
.
getResult
()
==
null
)
{
if
(
serviceResponse
.
getResult
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"没有权限"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"没有权限"
);
}
}
...
@@ -128,7 +125,9 @@ public class GoodsSelectorController {
...
@@ -128,7 +125,9 @@ public class GoodsSelectorController {
goodsRightsSelectorDTO
.
setGoodsRightsSearchValue
(
serviceResponse
.
getResult
().
getGoodsRightsSearchValue
());
goodsRightsSelectorDTO
.
setGoodsRightsSearchValue
(
serviceResponse
.
getResult
().
getGoodsRightsSearchValue
());
return
RestResponse
.
success
(
goodsRightsSelectorDTO
);
return
RestResponse
.
success
(
goodsRightsSelectorDTO
);
}
}
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
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