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
7a6b52a9
Commit
7a6b52a9
authored
Mar 16, 2020
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
8b1576dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
+23
-11
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+2
-1
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+11
-5
GoodsRightsSelectorController.java
...g/web/controller/goods/GoodsRightsSelectorController.java
+3
-1
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+7
-4
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
7a6b52a9
...
@@ -35,7 +35,8 @@ public class GoodsBrandController {
...
@@ -35,7 +35,8 @@ 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
(),
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
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/GoodsDomainController.java
View file @
7a6b52a9
...
@@ -54,7 +54,9 @@ public class GoodsDomainController {
...
@@ -54,7 +54,9 @@ 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
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
,
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
);
...
@@ -63,14 +65,18 @@ public class GoodsDomainController {
...
@@ -63,14 +65,18 @@ public class GoodsDomainController {
// 是否最高权限
// 是否最高权限
boolean
isHighestRights
=
true
;
boolean
isHighestRights
=
true
;
JSONObject
json
=
null
;
JSONObject
json
=
null
;
if
(
UserDetailUtils
.
getUserDetail
().
getUser
ResourceInfo
().
getGoodsResourceId
()
!=
null
)
{
if
(
UserDetailUtils
.
getUserDetail
().
getUser
Info
().
getSuperAdmin
()
!=
1
)
{
isHighestRights
=
false
;
isHighestRights
=
false
;
if
(
selectorDTOServiceResponse
.
isSuccess
())
{
if
(
selectorDTOServiceResponse
.
isSuccess
())
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
selectorDTOServiceResponse
.
getResult
();
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
selectorDTOServiceResponse
.
getResult
();
if
(
goodsRightsSelectorDTO
!=
null
)
{
if
(
goodsRightsSelectorDTO
!=
null
)
{
json
=
JSONObject
.
parseObject
(
goodsRightsSelectorDTO
.
getGoodsRightsDomains
());
if
(
goodsRightsSelectorDTO
.
getHasRights
()
==
0
)
{
if
(
json
.
isEmpty
())
{
json
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
Collections
.
EMPTY_LIST
));
isHighestRights
=
true
;
}
else
{
json
=
JSONObject
.
parseObject
(
goodsRightsSelectorDTO
.
getGoodsRightsDomains
());
if
(
json
.
isEmpty
())
{
isHighestRights
=
true
;
}
}
}
}
}
}
}
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsRightsSelectorController.java
View file @
7a6b52a9
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -80,7 +81,8 @@ public class GoodsRightsSelectorController {
...
@@ -80,7 +81,8 @@ public class GoodsRightsSelectorController {
@RequestMapping
(
"/get-goods-rights-selector"
)
@RequestMapping
(
"/get-goods-rights-selector"
)
public
RestResponse
getGoodsRightsSelector
(
Long
goodsRightsSelectorId
)
{
public
RestResponse
getGoodsRightsSelector
(
Long
goodsRightsSelectorId
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
goodsRightsSelectorId
,
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
goodsRightsSelectorId
,
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(
serviceResponse
.
isSuccess
())
{
if
(
serviceResponse
.
isSuccess
())
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
serviceResponse
.
getResult
();
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
serviceResponse
.
getResult
();
return
RestResponse
.
success
(
EntityUtil
.
changeEntityByOrika
(
GoodsRightsSelectorVO
.
class
,
goodsRightsSelectorDTO
));
return
RestResponse
.
success
(
EntityUtil
.
changeEntityByOrika
(
GoodsRightsSelectorVO
.
class
,
goodsRightsSelectorDTO
));
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
7a6b52a9
...
@@ -60,7 +60,8 @@ public class GoodsSelectorController {
...
@@ -60,7 +60,8 @@ 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
(),
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
,
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
());
}
}
...
@@ -81,7 +82,8 @@ public class GoodsSelectorController {
...
@@ -81,7 +82,8 @@ public class GoodsSelectorController {
public
RestResponse
goodsSelectorShow
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
public
RestResponse
goodsSelectorShow
(
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
(),
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
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
());
}
}
...
@@ -103,7 +105,7 @@ public class GoodsSelectorController {
...
@@ -103,7 +105,7 @@ public class GoodsSelectorController {
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
if
(
goodsSelectorId
==
null
)
{
if
(
goodsSelectorId
==
null
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
Constant
.
TEST_ENTERPRISE_ID
);
Constant
.
TEST_ENTERPRISE_ID
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
()
);
if
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
==
null
)
{
if
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
()
==
null
)
{
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"没有权限"
);
return
RestResponse
.
failure
(
ErrorCodeEnums
.
MAll_ERR
.
getCode
(),
"没有权限"
);
}
}
...
@@ -116,7 +118,8 @@ public class GoodsSelectorController {
...
@@ -116,7 +118,8 @@ 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
(),
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getGoodsResourceId
(),
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