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
09ed68a0
Commit
09ed68a0
authored
Jan 15, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整新的资源组
parent
06e6fc35
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
18 deletions
+17
-18
StoreController.java
...ain/java/com/gic/plug/web/controller/StoreController.java
+2
-2
GoodsBrandController.java
...m/gic/plug/web/controller/goods/GoodsBrandController.java
+2
-2
GoodsDomainController.java
.../gic/plug/web/controller/goods/GoodsDomainController.java
+2
-2
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+7
-7
StoreRegionAuthUtil.java
...main/java/com/gic/plug/web/utils/StoreRegionAuthUtil.java
+2
-2
StoreResourceAuthUtils.java
...n/java/com/gic/plug/web/utils/StoreResourceAuthUtils.java
+2
-3
No files found.
src/main/java/com/gic/plug/web/controller/StoreController.java
View file @
09ed68a0
...
@@ -108,8 +108,8 @@ public class StoreController {
...
@@ -108,8 +108,8 @@ public class StoreController {
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setStoreGroupId
(
storeGroupId
);
storeSearchDTO
.
setStoreGroupId
(
storeGroupId
);
storeSearchDTO
.
setSearch
(
search
);
storeSearchDTO
.
setSearch
(
search
);
if
(
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
!=
null
){
if
(
UserDetailUtils
.
getUserDetail
().
get
Store
ResourceInfo
()
!=
null
){
storeSearchDTO
.
setStoreResource
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getStoreResource
(
));
storeSearchDTO
.
setStoreResource
(
Long
.
valueOf
(
UserDetailUtils
.
getUserDetail
().
getStoreResourceInfo
().
getStoreResourceId
()
));
}
}
String
returnFields
=
StoreESFieldsEnum
.
STOREID
.
getField
()+
","
+
StoreESFieldsEnum
.
STORECODE
.
getField
()+
","
+
StoreESFieldsEnum
.
STORENAME
.
getField
();
String
returnFields
=
StoreESFieldsEnum
.
STOREID
.
getField
()+
","
+
StoreESFieldsEnum
.
STORECODE
.
getField
()+
","
+
StoreESFieldsEnum
.
STORENAME
.
getField
();
ServiceResponse
serviceResponse
=
storeApiService
.
listStore
(
storeSearchDTO
,
ServiceResponse
serviceResponse
=
storeApiService
.
listStore
(
storeSearchDTO
,
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsBrandController.java
View file @
09ed68a0
...
@@ -59,8 +59,8 @@ public class GoodsBrandController extends BaseGoodsController {
...
@@ -59,8 +59,8 @@ public class GoodsBrandController extends BaseGoodsController {
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
}
}
else
{
}
else
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
==
null
?
null
:
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
().
getGoodsResourceId
();
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDtoServiceResponse
=
goodsRightsSelectorApiService
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
()
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
()
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
,
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsDomainController.java
View file @
09ed68a0
...
@@ -78,8 +78,8 @@ public class GoodsDomainController extends BaseGoodsController {
...
@@ -78,8 +78,8 @@ public class GoodsDomainController extends BaseGoodsController {
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
return
RestResponse
.
success
(
Collections
.
EMPTY_LIST
);
}
}
}
else
{
}
else
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
==
null
?
null
:
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
().
getGoodsResourceId
();
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
ServiceResponse
<
GoodsRightsSelectorDTO
>
selectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
selectorDtoServiceResponse
.
isSuccess
()
||
selectorDtoServiceResponse
.
getResult
()
==
null
||
if
(!
selectorDtoServiceResponse
.
isSuccess
()
||
selectorDtoServiceResponse
.
getResult
()
==
null
||
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
09ed68a0
...
@@ -68,8 +68,8 @@ public class GoodsSelectorController extends BaseGoodsController {
...
@@ -68,8 +68,8 @@ public class GoodsSelectorController extends BaseGoodsController {
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
(
getEnterpriseId
());
goodsSelectorDTO
.
setEnterpriseId
(
getEnterpriseId
());
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
==
null
?
null
:
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
().
getGoodsResourceId
();
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
...
@@ -94,8 +94,8 @@ public class GoodsSelectorController extends BaseGoodsController {
...
@@ -94,8 +94,8 @@ public class GoodsSelectorController extends BaseGoodsController {
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
(
getEnterpriseId
());
goodsSelectorDTO
.
setEnterpriseId
(
getEnterpriseId
());
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
==
null
?
null
:
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
().
getGoodsResourceId
();
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
...
@@ -118,7 +118,7 @@ public class GoodsSelectorController extends BaseGoodsController {
...
@@ -118,7 +118,7 @@ public class GoodsSelectorController extends BaseGoodsController {
@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
)
{
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
UserResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getUser
ResourceInfo
().
getGoodsResourceId
();
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
GoodsResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
getGoods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(
serviceResponse
.
getResult
()
==
null
)
{
if
(
serviceResponse
.
getResult
()
==
null
)
{
...
@@ -130,8 +130,8 @@ public class GoodsSelectorController extends BaseGoodsController {
...
@@ -130,8 +130,8 @@ public class GoodsSelectorController extends BaseGoodsController {
goodsRightsSelectorDTO
.
setGoodsRightsSearchValue
(
serviceResponse
.
getResult
().
getGoodsRightsSearchValue
());
goodsRightsSelectorDTO
.
setGoodsRightsSearchValue
(
serviceResponse
.
getResult
().
getGoodsRightsSearchValue
());
return
RestResponse
.
success
(
goodsRightsSelectorDTO
);
return
RestResponse
.
success
(
goodsRightsSelectorDTO
);
}
}
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
()
==
null
?
null
:
Long
resourceId
=
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
()
==
null
?
null
:
UserDetailUtils
.
getUserDetail
().
get
User
ResourceInfo
().
getGoodsResourceId
();
UserDetailUtils
.
getUserDetail
().
get
Goods
ResourceInfo
().
getGoodsResourceId
();
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDtoServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
resourceId
,
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
());
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
if
(!
goodsRightsSelectorDtoServiceResponse
.
isSuccess
())
{
...
...
src/main/java/com/gic/plug/web/utils/StoreRegionAuthUtil.java
View file @
09ed68a0
...
@@ -25,8 +25,8 @@ public class StoreRegionAuthUtil {
...
@@ -25,8 +25,8 @@ public class StoreRegionAuthUtil {
public
static
Set
<
String
>
getUserRegion
(
StoreWidgetApiService
storeWidgetApiService
){
public
static
Set
<
String
>
getUserRegion
(
StoreWidgetApiService
storeWidgetApiService
){
Set
<
String
>
authRegionSet
=
new
HashSet
<>();
Set
<
String
>
authRegionSet
=
new
HashSet
<>();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
if
(
userDetail
.
getUserInfo
().
getSuperAdmin
()
!=
1
&&
userDetail
.
get
User
ResourceInfo
()
!=
null
){
if
(
userDetail
.
getUserInfo
().
getSuperAdmin
()
!=
1
&&
userDetail
.
get
Store
ResourceInfo
()
!=
null
){
Long
storeResource
=
userDetail
.
getUserResourceInfo
().
getStoreResource
(
);
Long
storeResource
=
Long
.
valueOf
(
userDetail
.
getStoreResourceInfo
().
getStoreResourceId
()
);
if
(
storeResource
!=
null
){
if
(
storeResource
!=
null
){
ServiceResponse
<
StoreWidgetDTO
>
storeWidget
=
storeWidgetApiService
.
getStoreWidget
(
storeResource
.
intValue
());
ServiceResponse
<
StoreWidgetDTO
>
storeWidget
=
storeWidgetApiService
.
getStoreWidget
(
storeResource
.
intValue
());
if
(
storeWidget
.
getResult
()
!=
null
){
if
(
storeWidget
.
getResult
()
!=
null
){
...
...
src/main/java/com/gic/plug/web/utils/StoreResourceAuthUtils.java
View file @
09ed68a0
...
@@ -32,7 +32,7 @@ public class StoreResourceAuthUtils {
...
@@ -32,7 +32,7 @@ public class StoreResourceAuthUtils {
*/
*/
public
static
Set
<
String
>
getAuthData
(
String
field
,
StoreWidgetApiService
storeWidgetApiService
)
{
public
static
Set
<
String
>
getAuthData
(
String
field
,
StoreWidgetApiService
storeWidgetApiService
)
{
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
UserDetail
userDetail
=
UserDetailUtils
.
getUserDetail
();
boolean
isAdmin
=
userDetail
.
getUserInfo
().
getSuperAdmin
()
==
1
||
userDetail
.
get
User
ResourceInfo
()
==
null
;
boolean
isAdmin
=
userDetail
.
getUserInfo
().
getSuperAdmin
()
==
1
||
userDetail
.
get
Store
ResourceInfo
()
==
null
;
//超管
//超管
if
(
isAdmin
)
{
if
(
isAdmin
)
{
return
getAuthDataWhenAdmin
();
return
getAuthDataWhenAdmin
();
...
@@ -106,8 +106,7 @@ public class StoreResourceAuthUtils {
...
@@ -106,8 +106,7 @@ public class StoreResourceAuthUtils {
* @return
* @return
*/
*/
private
static
Integer
getStoreWidgetId
()
{
private
static
Integer
getStoreWidgetId
()
{
//todo 前端资源组对齐后,调整最新接口
return
UserDetailUtils
.
getUserDetail
().
getStoreResourceInfo
().
getStoreResourceId
();
return
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getStoreResource
().
intValue
();
}
}
private
static
boolean
isStoreField
(
String
field
)
{
private
static
boolean
isStoreField
(
String
field
)
{
...
...
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