Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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-platform-auth
Commits
f202e2d8
Commit
f202e2d8
authored
Feb 25, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资源授权通知调整
parent
878bb044
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
310 additions
and
18 deletions
+310
-18
CustomAreaDTO.java
...uth-api/src/main/java/com/gic/auth/dto/CustomAreaDTO.java
+111
-0
UnionEnterpriseAuthResNoticeDTO.java
...ava/com/gic/auth/dto/UnionEnterpriseAuthResNoticeDTO.java
+110
-0
UserResourceChangeInfoDTO.java
...main/java/com/gic/auth/dto/UserResourceChangeInfoDTO.java
+66
-0
ResourceGroupApiServiceImpl.java
.../auth/service/outer/impl/ResourceGroupApiServiceImpl.java
+19
-18
ResourceGroupUtils.java
.../com/gic/auth/utils/resourcegroup/ResourceGroupUtils.java
+4
-0
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/dto/CustomAreaDTO.java
0 → 100644
View file @
f202e2d8
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 资源组用户域授权信息
* @ClassName:
* @Description:
* @author guojuxing
* @date 2021/2/25 9:59 AM
*/
public
class
CustomAreaDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
9035915394117084382L
;
/**
* 用户域 0:不授予 1:授予
*/
private
Integer
customUser
;
/**
* 用户域配置json转为类
*/
private
List
<
ResourceGroupCustomUserDTO
>
customUserList
;
/**
* 线下门店订单 1:用户在授权管辖门店范围内的订单 2:用户下所有订单
*/
private
Integer
storeOrderArea
;
/**
* 微盟商城订单 1:用户在授权店铺范围内的订单 2:不授予
*/
private
Integer
weimobOrderArea
;
/**
* 微盟店铺多选,weimob_order_area选择1时选择店铺
*/
private
List
<
Long
>
weimobStoreId
;
/**
* 短信签名
*/
private
List
<
Long
>
smsId
;
public
Integer
getCustomUser
()
{
return
customUser
;
}
public
CustomAreaDTO
setCustomUser
(
Integer
customUser
)
{
this
.
customUser
=
customUser
;
return
this
;
}
public
List
<
ResourceGroupCustomUserDTO
>
getCustomUserList
()
{
return
customUserList
;
}
public
CustomAreaDTO
setCustomUserList
(
List
<
ResourceGroupCustomUserDTO
>
customUserList
)
{
this
.
customUserList
=
customUserList
;
return
this
;
}
public
Integer
getStoreOrderArea
()
{
return
storeOrderArea
;
}
public
CustomAreaDTO
setStoreOrderArea
(
Integer
storeOrderArea
)
{
this
.
storeOrderArea
=
storeOrderArea
;
return
this
;
}
public
Integer
getWeimobOrderArea
()
{
return
weimobOrderArea
;
}
public
CustomAreaDTO
setWeimobOrderArea
(
Integer
weimobOrderArea
)
{
this
.
weimobOrderArea
=
weimobOrderArea
;
return
this
;
}
public
List
<
Long
>
getWeimobStoreId
()
{
return
weimobStoreId
;
}
public
CustomAreaDTO
setWeimobStoreId
(
List
<
Long
>
weimobStoreId
)
{
this
.
weimobStoreId
=
weimobStoreId
;
return
this
;
}
public
List
<
Long
>
getSmsId
()
{
return
smsId
;
}
public
CustomAreaDTO
setSmsId
(
List
<
Long
>
smsId
)
{
this
.
smsId
=
smsId
;
return
this
;
}
@Override
public
String
toString
()
{
return
"CustomAreaDTO{"
+
"customUser="
+
customUser
+
", customUserList="
+
customUserList
+
", storeOrderArea="
+
storeOrderArea
+
", weimobOrderArea="
+
weimobOrderArea
+
", weimobStoreId="
+
weimobStoreId
+
", smsId="
+
smsId
+
'}'
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/UnionEnterpriseAuthResNoticeDTO.java
0 → 100644
View file @
f202e2d8
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 联合商户资源授权通知
* @ClassName:
* @Description:
* @author guojuxing
* @date 2021/2/24 4:50 PM
*/
public
class
UnionEnterpriseAuthResNoticeDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7222957448764839407L
;
/**
* 自有商户ID
*/
private
Integer
ownEnterpriseId
;
/**
* 联合商户ID
*/
private
Integer
unionEnterpriseId
;
/**
* 门店资源
*/
private
Long
storeResource
;
/**
* 商品资源
*/
private
Long
goodsResourceId
;
/**
* 用户域的域数据变更信息
*/
private
List
<
UserResourceChangeInfoDTO
>
userResourceInfoList
;
/**
* 最新的资源组用户域配置信息
*/
private
CustomAreaDTO
customAreaDTO
;
public
Long
getStoreResource
()
{
return
storeResource
;
}
public
UnionEnterpriseAuthResNoticeDTO
setStoreResource
(
Long
storeResource
)
{
this
.
storeResource
=
storeResource
;
return
this
;
}
public
Long
getGoodsResourceId
()
{
return
goodsResourceId
;
}
public
UnionEnterpriseAuthResNoticeDTO
setGoodsResourceId
(
Long
goodsResourceId
)
{
this
.
goodsResourceId
=
goodsResourceId
;
return
this
;
}
public
List
<
UserResourceChangeInfoDTO
>
getUserResourceInfoList
()
{
return
userResourceInfoList
;
}
public
UnionEnterpriseAuthResNoticeDTO
setUserResourceInfoList
(
List
<
UserResourceChangeInfoDTO
>
userResourceInfoList
)
{
this
.
userResourceInfoList
=
userResourceInfoList
;
return
this
;
}
public
Integer
getOwnEnterpriseId
()
{
return
ownEnterpriseId
;
}
public
UnionEnterpriseAuthResNoticeDTO
setOwnEnterpriseId
(
Integer
ownEnterpriseId
)
{
this
.
ownEnterpriseId
=
ownEnterpriseId
;
return
this
;
}
public
Integer
getUnionEnterpriseId
()
{
return
unionEnterpriseId
;
}
public
UnionEnterpriseAuthResNoticeDTO
setUnionEnterpriseId
(
Integer
unionEnterpriseId
)
{
this
.
unionEnterpriseId
=
unionEnterpriseId
;
return
this
;
}
public
CustomAreaDTO
getCustomAreaDTO
()
{
return
customAreaDTO
;
}
public
UnionEnterpriseAuthResNoticeDTO
setCustomAreaDTO
(
CustomAreaDTO
customAreaDTO
)
{
this
.
customAreaDTO
=
customAreaDTO
;
return
this
;
}
@Override
public
String
toString
()
{
return
"UnionEnterpriseAuthResNoticeDTO{"
+
"ownEnterpriseId="
+
ownEnterpriseId
+
", unionEnterpriseId="
+
unionEnterpriseId
+
", storeResource="
+
storeResource
+
", goodsResourceId="
+
goodsResourceId
+
", userResourceInfoList="
+
userResourceInfoList
+
", customAreaDTO="
+
customAreaDTO
+
'}'
;
}
}
gic-platform-auth-api/src/main/java/com/gic/auth/dto/UserResourceChangeInfoDTO.java
0 → 100644
View file @
f202e2d8
package
com
.
gic
.
auth
.
dto
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 用户域资源域数据(小程序、服务号、会员卡等)变更情况信息
* @ClassName:
* @Description:
* @author guojuxing
* @date 2021/2/24 4:53 PM
*/
public
class
UserResourceChangeInfoDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5480272198512708835L
;
/**
* 域数据类型 CuTypeEnum枚举
*/
private
Integer
type
;
/**
* 增加的域ID
*/
private
List
<
Long
>
addList
;
/**
* 删除的域ID集合
*/
private
List
<
Long
>
deleteList
;
public
Integer
getType
()
{
return
type
;
}
public
UserResourceChangeInfoDTO
setType
(
Integer
type
)
{
this
.
type
=
type
;
return
this
;
}
public
List
<
Long
>
getAddList
()
{
return
addList
;
}
public
UserResourceChangeInfoDTO
setAddList
(
List
<
Long
>
addList
)
{
this
.
addList
=
addList
;
return
this
;
}
public
List
<
Long
>
getDeleteList
()
{
return
deleteList
;
}
public
UserResourceChangeInfoDTO
setDeleteList
(
List
<
Long
>
deleteList
)
{
this
.
deleteList
=
deleteList
;
return
this
;
}
@Override
public
String
toString
()
{
return
"UserResourceChangeInfoDTO{"
+
"type="
+
type
+
", addList="
+
addList
+
", deleteList="
+
deleteList
+
'}'
;
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/ResourceGroupApiServiceImpl.java
View file @
f202e2d8
package
com
.
gic
.
auth
.
service
.
outer
.
impl
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.auth.constant.ResourceHoldEnum
;
import
com.gic.auth.dto.*
;
import
com.gic.auth.entity.TabSysUser
;
import
com.gic.auth.service.*
;
import
com.gic.auth.utils.resourcegroup.ResourceGroupUtils
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.union.UnionEnterpriseAuthDTO
;
import
com.gic.enterprise.dto.union.UnionEnterpriseAuthResNoticeDTO
;
import
com.gic.enterprise.dto.union.UserResourceChangeInfoDTO
;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.UnionEnterpriseAuthApiService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.store.service.StoreWidgetApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -27,13 +13,24 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.application.center.api.service.AuthorizeService
;
import
com.gic.auth.dto.*
;
import
com.gic.auth.entity.TabSysResourceGroup
;
import
com.gic.auth.service.*
;
import
com.gic.auth.utils.resourcegroup.ResourceGroupUtils
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.dto.union.UnionEnterpriseAuthDTO
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.enterprise.service.UnionEnterpriseAuthApiService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.store.service.StoreWidgetApiService
;
/**
* 资源组
...
...
@@ -104,6 +101,10 @@ public class ResourceGroupApiServiceImpl implements ResourceGroupApiService{
unionEnterpriseAuthResNoticeDTO
.
setStoreResource
(
newResourceGroup
.
getStoreResource
());
unionEnterpriseAuthResNoticeDTO
.
setOwnEnterpriseId
(
ownEnterpriseId
);
unionEnterpriseAuthResNoticeDTO
.
setUnionEnterpriseId
(
unionEnterpriseId
);
CustomUserAreaDTO
customUserAreaDTO
=
ResourceGroupUtils
.
getResource
(
ResourceGroupUtils
.
CUSTOM_RESOURCE
,
EntityUtil
.
changeEntityNew
(
TabSysResourceGroup
.
class
,
newResourceGroup
));
unionEnterpriseAuthResNoticeDTO
.
setCustomAreaDTO
(
EntityUtil
.
changeEntityNew
(
CustomAreaDTO
.
class
,
customUserAreaDTO
));
List
<
UserResourceChangeInfoDTO
>
userResourceInfoList
=
new
ArrayList
<>();
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/utils/resourcegroup/ResourceGroupUtils.java
View file @
f202e2d8
...
...
@@ -65,6 +65,10 @@ public class ResourceGroupUtils {
return
map
.
get
(
resourceGroupType
).
getResourceData
(
tabSysResourceGroup
);
}
public
static
<
T
>
T
getResource
(
Integer
resourceGroupType
,
TabSysResourceGroup
tabSysResourceGroup
)
{
return
map
.
get
(
resourceGroupType
).
getResourceData
(
tabSysResourceGroup
);
}
/**
* 查询全部资源
* @param userId
...
...
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