Merge remote-tracking branch 'origin/master' into feature/REQ-2300
# Conflicts: # tyr-api/src/main/java/cn/axzo/tyr/client/common/enums/RowPermissionEnum.java # tyr-api/src/main/java/cn/axzo/tyr/client/model/data/object/AttributePermissionBO.java # tyr-api/src/main/java/cn/axzo/tyr/client/model/data/object/DataObjectRuleBO.java # tyr-server/src/main/java/cn/axzo/tyr/server/service/impl/ProductServiceImpl.java
This commit is contained in:
commit
4f48057a59
@ -6,9 +6,9 @@
|
||||
|
||||
dev环境启动参数:
|
||||
-Dspring.datasource.url=jdbc:mysql://172.16.2.197:3311/pudge-dev?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&serverTimezone=Asia/Shanghai&useSSL=true&verifyServerCertificate=false&rewriteBatchedStatements=true
|
||||
-Drocketmq.name-server=114.116.202.128:9876
|
||||
-Drocketmq.name-server=172.16.2.82:9876
|
||||
-DCUSTOM_ENV=dev
|
||||
-Dspring.profiles.active=dev
|
||||
-Dspring.redis.host=123.249.44.111
|
||||
-Dspring.redis.host=172.16.2.23
|
||||
-Dspring.redis.port=31270
|
||||
-Dserver.port=8080
|
||||
@ -26,5 +26,12 @@
|
||||
<groupId>cn.axzo.basics</groupId>
|
||||
<artifactId>basics-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.foundation</groupId>
|
||||
<artifactId>dao-support-lib</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@ -22,7 +22,7 @@ public enum AttrPermissionEnum {
|
||||
UNIT_COOPERATE_SUBORDINATE(7, "本单位及下级协同(直属+合作)单位数据"),
|
||||
|
||||
UNIT_ALL_SUBORDINATE(8, "本单位及以下协同(直属+合作)单位数据"),
|
||||
WORKSPACE(9, "本项目部数据"),
|
||||
WORKSPACE(9, "本项目数据"),
|
||||
EQUAL_TO_ROW(10, "同行级数据权限"),
|
||||
|
||||
UNIT_ONLY_EXCLUDE_TEAM(11, "仅本单位数据(不包含班组)"),
|
||||
|
||||
@ -23,6 +23,10 @@ public enum FeatureResourceType {
|
||||
PAGE(2, "页面"),
|
||||
APP_ENTRY(3, "应用入口"),
|
||||
COMPONENT(4, "组件"),
|
||||
ROOT(5, "ROOT"),
|
||||
GROUP(6, "分组"),
|
||||
// 用户pc端菜单直接的分割分组线
|
||||
MENU_PARTITION_GROUP(7, "菜单分割分组"),
|
||||
;
|
||||
|
||||
private static final Map<Integer, FeatureResourceType> MAPPING = new HashMap<>();
|
||||
@ -50,7 +54,9 @@ public enum FeatureResourceType {
|
||||
public static List<Integer> navTypes() {
|
||||
return Arrays.asList(FeatureResourceType.MENU.getCode(),
|
||||
FeatureResourceType.PAGE.getCode(),
|
||||
FeatureResourceType.APP_ENTRY.getCode());
|
||||
FeatureResourceType.APP_ENTRY.getCode(),
|
||||
FeatureResourceType.ROOT.getCode(),
|
||||
FeatureResourceType.GROUP.getCode());
|
||||
}
|
||||
|
||||
public static List<Integer> pageTypes() {
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.tyr.client.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @date 2024/7/2
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PageElementFeatureResourceRelationTypeEnum {
|
||||
/**
|
||||
* 默认类型
|
||||
*/
|
||||
DEFAULT(0, "默认类型"),
|
||||
|
||||
/**
|
||||
* 页面路由
|
||||
*/
|
||||
PAGE_ROUTE(1, "页面路由"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.tyr.client.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/18
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PageElementTypeEnum {
|
||||
|
||||
PAGE("PAGE", "页面"),
|
||||
COMPONENT("COMPONENT", "组件"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package cn.axzo.tyr.client.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/7/24
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PermissionRelationOperateLogSceneEnum {
|
||||
|
||||
/**
|
||||
* oms同步
|
||||
*/
|
||||
OMS_SYNC("OMS_SYNC", "oms同步"),
|
||||
|
||||
/**
|
||||
* oms后台更新资源绑定的角色
|
||||
*/
|
||||
OMS_FEATURE_RESOURCE_BIND_ROLE("OMS_FEATURE_RESOURCE_BIND_ROLE", "oms后台更新资源绑定的角色"),
|
||||
|
||||
/**
|
||||
* oms后台更新角色绑定资源绑定的
|
||||
*/
|
||||
OMS_ROLE_BIND_FEATURE_RESOURCE("OMS_ROLE_BIND_FEATURE_RESOURCE", "oms后台更新角色绑定的资源"),
|
||||
|
||||
/**
|
||||
* [老]oms后台更新角色绑定资源绑定的
|
||||
*/
|
||||
OLD_OMS_ROLE_BIND_FEATURE("OLD_OMS_ROLE_BIND_FEATURE", "[老]oms后台更新角色绑定的资源"),
|
||||
|
||||
/**
|
||||
* oms后台更新资源绑定的页面元素
|
||||
*/
|
||||
OMS_FEATURE_RESOURCE_BIND_ELEMENT("OMS_FEATURE_RESOURCE_BIND_ELEMENT", "oms后台更新资源绑定的页面元素"),
|
||||
|
||||
/**
|
||||
* oms后台更新产品榜的资源
|
||||
*/
|
||||
OMS_PRODUCT_BIND_FEATURE_RESOURCE("OMS_PRODUCT_BIND_FEATURE_RESOURCE", "oms后台更新产品榜的资源"),
|
||||
|
||||
/**
|
||||
* [老]oms后台更新产品权限点
|
||||
*/
|
||||
OLD_OMS_PRODUCT__UPDATE("OLD_OMS_PRODUCT__UPDATE", "[老]oms后台更新产品"),
|
||||
|
||||
/**
|
||||
* [老]oms后台更新产品权限点
|
||||
*/
|
||||
OLD_OMS_PRODUCT_PERMISSION_POINT__SAVE_BATCH("OLD_OMS_PRODUCT_PERMISSION_POINT__SAVE_BATCH", "[老]oms后台更新产品权限点"),
|
||||
|
||||
/**
|
||||
* [老]角色分组新增/更新
|
||||
*/
|
||||
OLD_OMS_ROLE_GROUP__SAVE_OR_UPDATE("OLD_OMS_ROLE_GROUP__SAVE_OR_UPDATE", "[老]角色分组新增/更新"),
|
||||
|
||||
/**
|
||||
* [老]角色分组删除
|
||||
*/
|
||||
OLD_OMS_ROLE_GROUP__DELETE("OLD_OMS_ROLE_GROUP__DELETE", "[老]角色分组删除"),
|
||||
|
||||
/**
|
||||
* [老]权限点删除
|
||||
*/
|
||||
OLD_OMS_SAAS_FEATURE__DELETE("OLD_OMS_SAAS_FEATURE__DELETE", "[老]权限点删除"),
|
||||
|
||||
/**
|
||||
* [老]权限点新增/更新
|
||||
*/
|
||||
OLD_OMS_SAAS_FEATURE__SAVE_OR_UPDATE("OLD_OMS_SAAS_FEATURE__SAVE_OR_UPDATE", "[老]权限点新增/更新"),
|
||||
|
||||
/**
|
||||
* oms后台添加API
|
||||
*/
|
||||
OMS_API_INSERT("OMS_API_INSERT", "oms后台添加API"),
|
||||
|
||||
/**
|
||||
* oms后台更新API
|
||||
*/
|
||||
OMS_API_UPDATE("OMS_API_UPDATE", "oms后台更新API"),
|
||||
|
||||
/**
|
||||
* oms后台删除API
|
||||
*/
|
||||
OMS_API_DELETE("OMS_API_DELETE", "oms后台删除API"),
|
||||
|
||||
/**
|
||||
* oms后台同步API
|
||||
*/
|
||||
OMS_API_SYNC("OMS_API_SYNC", "oms后台同步API"),
|
||||
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.axzo.tyr.client.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/5/13
|
||||
*/
|
||||
public enum ProductModuleFeatureRelationTypeEnum {
|
||||
|
||||
FEATURE(0, "FEATURE"),
|
||||
FEATURE_RESOURCE(1, "FEATURE_RESOURCE")
|
||||
;
|
||||
@Getter
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
public final Integer code;
|
||||
public final String desc;
|
||||
|
||||
ProductModuleFeatureRelationTypeEnum(Integer code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@ -20,12 +20,12 @@ import java.util.stream.Collectors;
|
||||
@AllArgsConstructor
|
||||
public enum RoleTypeEnum {
|
||||
|
||||
//角色类型:common 普通角色 super_admin超级管理员(禁止删除) admin子管理员(禁止删除) init初始化内置角色 auto_own自定义角色(禁止删除)<承载向用户单独分配的自定义权限>
|
||||
COMMON("common", "普通角色",false),
|
||||
//角色类型:common 自定义角色 super_admin超级管理员(禁止删除) admin子管理员(禁止删除) init初始化内置角色 auto_own自定义角色(禁止删除)<承载向用户单独分配的自定义权限>
|
||||
COMMON("common", "自定义角色",false),
|
||||
SUPER_ADMIN("super_admin", "超级管理员",true),
|
||||
ADMIN("admin", "子管理员",true),
|
||||
INIT("init", "初始化内置角色",false),
|
||||
AUTO_OWN("auto_own", "自定义角色",false);
|
||||
INIT("init", "初始化内置角色-标准角色",false),
|
||||
AUTO_OWN("auto_own", "虚拟角色(自定义权限使用)",false);
|
||||
|
||||
@EnumValue
|
||||
private final String value;
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.req.DeleteFeatureResourceReq;
|
||||
import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq;
|
||||
import cn.axzo.tyr.client.model.req.GetFeatureResourceTreeReq;
|
||||
import cn.axzo.tyr.client.model.req.ResourceSyncReq;
|
||||
import cn.axzo.tyr.client.model.req.FeatureResourceTreeSaveReq;
|
||||
import cn.axzo.tyr.client.model.res.FeatureResourceDetailResp;
|
||||
import cn.axzo.tyr.client.model.res.FeatureResourceTreeNode;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 功能资源API接口
|
||||
@ -44,7 +46,7 @@ public interface FeatureResourceApi {
|
||||
|
||||
/** 删除菜单/页面/组件 **/
|
||||
@PostMapping("/api/featureResource/delete")
|
||||
ApiResult<Void> deleteFeatureResource(@RequestParam Long featureId, @RequestParam Long operatorId);
|
||||
ApiResult<Void> deleteFeatureResource(@Validated @RequestBody DeleteFeatureResourceReq req);
|
||||
|
||||
|
||||
/** 重排序菜单/页面/组件 **/
|
||||
@ -58,4 +60,8 @@ public interface FeatureResourceApi {
|
||||
/** 从基准环境查询功能资源树 **/
|
||||
@PostMapping("/api/featureResource/getBaseTree")
|
||||
ApiResult<List<FeatureResourceTreeNode>> getBaseTree(@RequestBody @Valid GetFeatureResourceTreeReq req);
|
||||
|
||||
/** 通过featureResourceIds查询对应的featureCode **/
|
||||
@PostMapping("/api/featureResource/listFeatureCodeByFeatureResourceIds")
|
||||
ApiResult<Map<Long, String>> listFeatureCodeByFeatureResourceIds(@RequestParam List<Long> featureResourceIds);
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.req.*;
|
||||
import cn.axzo.tyr.client.model.res.GetUserHasPermissionPageElementResp;
|
||||
import cn.axzo.tyr.client.model.res.PageElementResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 页面及元素相关接口
|
||||
*
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/18
|
||||
*/
|
||||
@FeignClient(name = "tyr", url = "${axzo.service.tyr:http://tyr:8080}")
|
||||
public interface PageElementApi {
|
||||
|
||||
/** 页面及元素上报 **/
|
||||
@PostMapping("/api/pageElement/report")
|
||||
ApiResult<Void> report(@RequestBody @Valid PageElementReportReq req);
|
||||
|
||||
/** 查询页面资源 **/
|
||||
@PostMapping("/api/pageElement/getPageElement")
|
||||
ApiResult<List<PageElementResp>> getPageElement(@RequestBody @Valid GetPageElementReq req);
|
||||
|
||||
/** 编辑页面、页面组件的元素 **/
|
||||
@PostMapping("/api/pageElement/modifyPageElementRelation")
|
||||
ApiResult<Void> modifyPageElementRelation(@RequestBody @Valid ModifyPageElementRelationDTO req);
|
||||
|
||||
/** 分页查询页面资源 **/
|
||||
@PostMapping("/api/pageElement/page")
|
||||
ApiPageResult<PageElementResp> page(@RequestBody @Valid PageQueryElementReq req);
|
||||
|
||||
/** 根据用户传入的页面code,查询用户有权限的元素code **/
|
||||
@PostMapping("/api/pageElement/getUserHasPermissionPageElement")
|
||||
ApiResult<GetUserHasPermissionPageElementResp> getUserHasPermissionPageElement(@RequestBody @Valid GetUserHasPermissionPageElementReq req);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.req.PermissionOperateLogReq;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/7/25
|
||||
*/
|
||||
@FeignClient(name = "tyr", url = "${axzo.service.tyr:http://tyr:8080}")
|
||||
public interface PermissionOperateLogApi {
|
||||
|
||||
/** API关联操作日志记录 **/
|
||||
@PostMapping("/api/permissionOperateLog/save")
|
||||
ApiResult<Void> save(@RequestBody @Valid PermissionOperateLogReq req);
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.permission.DeletePermissionPointRequest;
|
||||
import cn.axzo.tyr.client.model.permission.PermissionPointDTO;
|
||||
import cn.axzo.tyr.client.model.permission.PermissionPointListQueryRequest;
|
||||
import cn.axzo.tyr.client.model.permission.PermissionPointMoveRequest;
|
||||
@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -48,6 +50,10 @@ public interface PermissionPointApi {
|
||||
@PostMapping(value = "/api/v1/permissionPoint/delete/{permissionId}")
|
||||
ApiResult<List<String>> deletePermissionPoint(@PathVariable Long permissionId);
|
||||
|
||||
/** 删除权限点 **/
|
||||
@PostMapping(value = "/api/v1/permissionPoint/delete/v2/deletePermissionPoint")
|
||||
ApiResult<List<String>> deletePermissionPointV2(@Valid @RequestBody DeletePermissionPointRequest request);
|
||||
|
||||
|
||||
/** 位置移动 **/
|
||||
@PostMapping(value = "/api/v1/permissionPoint/move")
|
||||
|
||||
@ -5,8 +5,14 @@ import cn.axzo.tyr.client.model.req.NavTreeReq;
|
||||
import cn.axzo.tyr.client.model.req.PagePermissionReq;
|
||||
import cn.axzo.tyr.client.model.req.PagePermissionResp;
|
||||
import cn.axzo.tyr.client.model.req.PermissionCheckReq;
|
||||
import cn.axzo.tyr.client.model.req.TreePermissionReq;
|
||||
import cn.axzo.tyr.client.model.req.TreeProductFeatureResourceReq;
|
||||
import cn.axzo.tyr.client.model.res.FeatureResourceDTO;
|
||||
import cn.axzo.tyr.client.model.res.NavTreeResp;
|
||||
import cn.axzo.tyr.client.model.res.ProductFeatureResourceResp;
|
||||
import cn.axzo.tyr.client.model.res.TreePermissionResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@ -25,6 +31,7 @@ public interface PermissionQueryApi {
|
||||
|
||||
/** 返回有权限的导航菜单页面 **/
|
||||
@PostMapping(value = "/api/v3/permission/query/getNavTree")
|
||||
@Deprecated
|
||||
ApiResult<List<NavTreeResp>> getNavTree(@RequestBody @Valid NavTreeReq req);
|
||||
|
||||
/** 页面权限详情:页面自身及所有下级 **/
|
||||
@ -34,4 +41,30 @@ public interface PermissionQueryApi {
|
||||
/** 鉴权接口 **/
|
||||
@PostMapping(value = "/api/v3/permission/query/hasPermission")
|
||||
ApiResult<Boolean> hasPermission(@RequestBody @Valid PermissionCheckReq req);
|
||||
|
||||
/**
|
||||
* 查询租户的权限树
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/api/v3/productPermission/tree")
|
||||
ApiResult<List<ProductFeatureResourceResp>> treeProduct(@RequestBody @Validated TreeProductFeatureResourceReq request);
|
||||
|
||||
/**
|
||||
* 查询租户的权限点list
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/api/v3/productPermission/list")
|
||||
ApiResult<List<FeatureResourceDTO>> listFeatureResource(@RequestBody @Validated TreeProductFeatureResourceReq request);
|
||||
|
||||
/**
|
||||
* 查询用户有权限的菜单资源树
|
||||
* getNavTree已经废弃,不在原方法上改的原因:OMS端现在没有保存角色的菜单权限,且不通用,不能传入指定类型的节点和树种某个节点下的子节点
|
||||
* 待oms端把菜单的权限点保存且使用前端的页面元素后就可以切换这个接口
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/api/v3/permission/featureResource/tree")
|
||||
ApiResult<List<TreePermissionResp>> treePermission(@RequestBody @Validated TreePermissionReq req);
|
||||
}
|
||||
|
||||
@ -2,7 +2,9 @@ package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.product.OldUpdateFeatureRelationRequestV2;
|
||||
import cn.axzo.tyr.client.model.product.ProductAddReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductDetailReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductFeatureRelationSearchReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductFeatureRelationUpdateReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductFeatureRelationVO;
|
||||
@ -10,6 +12,10 @@ import cn.axzo.tyr.client.model.product.ProductSearchListReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductSearchPageReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductUpdateReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductVO;
|
||||
import cn.axzo.tyr.client.model.req.ProductSaveReq;
|
||||
import cn.axzo.tyr.client.model.req.UpdateProductStatusReq;
|
||||
import cn.axzo.tyr.client.model.res.GovernmentTerminalResp;
|
||||
import cn.axzo.tyr.client.model.res.WorkspaceProductResp;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@ -105,6 +111,16 @@ public interface ProductApi {
|
||||
@PostMapping("api/auth/product/feature/relation/update")
|
||||
ApiResult<Boolean> updateFeatureRelation(@Validated @RequestBody List<ProductFeatureRelationUpdateReq> req);
|
||||
|
||||
/**
|
||||
* 更新产品与权限点的关联关系
|
||||
* <p/>携带操作人员信息
|
||||
*
|
||||
* @param req {@link ProductFeatureRelationUpdateReq}
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("api/auth/product/feature/relation/v2/update")
|
||||
ApiResult<Boolean> updateFeatureRelationV2(@Validated @RequestBody OldUpdateFeatureRelationRequestV2 req);
|
||||
|
||||
/**
|
||||
* 查询指定工作台关联的服务包下的产品权限点
|
||||
*
|
||||
@ -113,4 +129,48 @@ public interface ProductApi {
|
||||
*/
|
||||
@PostMapping("api/auth/product/feature/query")
|
||||
ApiResult<Map<Long, List<ProductFeatureRelationVO>>> queryProductFeatureRelationByWorkspace(@RequestBody Set<Long> workspaceIds);
|
||||
|
||||
|
||||
/**
|
||||
* 产品上下架
|
||||
*
|
||||
* @param req 产品id及状态
|
||||
* @return 是否更新成功
|
||||
*/
|
||||
@PostMapping("api/auth/product/updateStatus")
|
||||
ApiResult<Void> updateStatus(@Validated @RequestBody UpdateProductStatusReq req);
|
||||
|
||||
|
||||
/**
|
||||
* 保存、更新产品(v2版本)
|
||||
*
|
||||
* @param req 产品信息
|
||||
* @return 返回产品ID
|
||||
*/
|
||||
@PostMapping("api/auth/product/saveOrUpdate")
|
||||
ApiResult<Long> saveOrUpdate(@Validated @RequestBody ProductSaveReq req);
|
||||
|
||||
/**
|
||||
* 获取政务端列表
|
||||
*
|
||||
* @param terminal 政务端
|
||||
* @return {@link GovernmentTerminalResp}
|
||||
*/
|
||||
@GetMapping("api/auth/product/getGovernmentTerminal")
|
||||
ApiResult<List<GovernmentTerminalResp>> getGovernmentTerminal(@RequestParam @NotNull(message = "terminal不能为空") String terminal);
|
||||
|
||||
/**
|
||||
* 根据租户类型查询产品信息(新增租户、开通管理)
|
||||
*
|
||||
* @param workspaceType 租户类型
|
||||
* @return 租户产品信息
|
||||
*/
|
||||
@GetMapping("api/auth/product/getWorkspaceProduct")
|
||||
ApiResult<WorkspaceProductResp> getWorkspaceProduct(@RequestParam @NotNull(message = "workspaceType不能为空") String workspaceType);
|
||||
|
||||
/**
|
||||
* 获取指定ID的产品详细信息
|
||||
*/
|
||||
@PostMapping("api/auth/product/getDetail")
|
||||
ApiResult<ProductVO> getDetail(@Validated @RequestBody ProductDetailReq req);
|
||||
}
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.foundation.page.PageResp;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.req.ListSaasRoleGroupParam;
|
||||
import cn.axzo.tyr.client.model.req.PageSaasRoleGroupParam;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleGroupReq;
|
||||
import cn.axzo.tyr.client.model.req.SaasRoleGroupDeleteRequest;
|
||||
import cn.axzo.tyr.client.model.req.UpdateRoleGroupOffsetReq;
|
||||
import cn.axzo.tyr.client.model.res.SaasRoleGroupDTO;
|
||||
import cn.axzo.tyr.client.model.vo.SaasRoleGroupVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -53,6 +58,14 @@ public interface SaasRoleGroupApi {
|
||||
@PostMapping("/api/saasRoleGroup/delete")
|
||||
ApiResult<Void> delete(@RequestParam @NotEmpty List<Long> ids);
|
||||
|
||||
/**
|
||||
* 删除角色分组
|
||||
* @param request 角色分组ID
|
||||
* @return 返回删除角色分组状态
|
||||
*/
|
||||
@PostMapping("/api/saasRoleGroup/v2/delete")
|
||||
ApiResult<Void> deleteV2(@RequestBody @Valid SaasRoleGroupDeleteRequest request);
|
||||
|
||||
/**
|
||||
*
|
||||
* 通过categoryCode查询分组
|
||||
@ -72,4 +85,20 @@ public interface SaasRoleGroupApi {
|
||||
*/
|
||||
@PostMapping("/api/role/group/offset/update")
|
||||
ApiResult<Void> updateRoleGroupOffset(@Valid @RequestBody UpdateRoleGroupOffsetReq request);
|
||||
|
||||
/**
|
||||
* 角色分组page接口
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/saasRoleGroup/page")
|
||||
ApiResult<PageResp<SaasRoleGroupDTO>> page(@RequestBody PageSaasRoleGroupParam request);
|
||||
|
||||
/**
|
||||
* 角色分组list接口
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/saasRoleGroup/list")
|
||||
ApiResult<List<SaasRoleGroupDTO>> list(@RequestBody ListSaasRoleGroupParam request);
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import cn.axzo.tyr.client.model.req.ListRoleReq;
|
||||
import cn.axzo.tyr.client.model.req.PageRoleReq;
|
||||
import cn.axzo.tyr.client.model.req.QueryByIdentityIdTypeReq;
|
||||
import cn.axzo.tyr.client.model.req.QueryRoleByNameReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleGroupReq;
|
||||
import cn.axzo.tyr.client.model.req.QuerySaasRoleReq;
|
||||
import cn.axzo.tyr.client.model.req.RoleWithUserQueryReq;
|
||||
import cn.axzo.tyr.client.model.req.TreeRoleReq;
|
||||
|
||||
@ -2,8 +2,11 @@ package cn.axzo.tyr.client.feign;
|
||||
|
||||
import cn.axzo.framework.domain.web.result.ApiPageResult;
|
||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||
import cn.axzo.tyr.client.model.roleuser.RoleUserUpdateReq;
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.GetUserAutoOwnRoleResp;
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.GetUserFeatureResourceIdsResp;
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.SaasRoleUserDTO;
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.SaasRoleUserV2DTO;
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.SuperAminInfoResp;
|
||||
import cn.axzo.tyr.client.model.roleuser.req.*;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
@ -70,6 +73,12 @@ public interface TyrSaasRoleUserApi {
|
||||
@PostMapping("/api/saas-role-user/list")
|
||||
ApiResult<List<SaasRoleUserDTO>> roleUserList(@RequestBody @Valid RoleUserParam param);
|
||||
|
||||
/**
|
||||
* 用户角色列表 限制500条
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/list/v2")
|
||||
ApiResult<List<SaasRoleUserV2DTO>> roleUserListV2(@RequestBody @Valid ListRoleUserRelationParam param);
|
||||
|
||||
/**
|
||||
* 批量查询超管, 只能批量获取单个工作台台下的超管,业务系统需要根据返回的identityId和identityType查询identityProfile查询用户明细信息
|
||||
*/
|
||||
@ -106,11 +115,25 @@ public interface TyrSaasRoleUserApi {
|
||||
* 保存/更新 用户自定义权限,每次传入新的featureIds都会覆盖原来的所有featureIds
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/save-or-update-auto-own-role")
|
||||
ApiResult<Void> saveOrUpdateAutoOwnRole(@RequestBody @Valid AutoOwnRoleUserReq req);
|
||||
ApiResult<Void> saveOrUpdateAutoOwnRole(@RequestBody @Valid AutoOwnRoleUserReq req);
|
||||
|
||||
/**
|
||||
* 查询用户自定义角色和权限
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/get-auto-own-role")
|
||||
ApiResult<GetUserAutoOwnRoleResp> getUserAutoOwnRole(@RequestBody @Valid GetUserAutoOwnRoleReq req);
|
||||
ApiResult<GetUserAutoOwnRoleResp> getUserAutoOwnRole(@RequestBody @Valid GetUserAutoOwnRoleReq req);
|
||||
|
||||
/**
|
||||
* 查询用户权限(featureResourceId)
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/get-user-feature-resource-ids")
|
||||
ApiResult<GetUserFeatureResourceIdsResp> getUserFeatureResourceIds(@RequestBody @Valid GetUserFeatureResourceIdsReq req);
|
||||
|
||||
/**
|
||||
* 根据id更新数据
|
||||
* @param roleUserUpdateReqs 参数列表
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/batch-update-by-id")
|
||||
ApiResult<Boolean> batchUpdateById(@RequestBody @Valid List<RoleUserUpdateReq> roleUserUpdateReqs);
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@ -21,11 +23,11 @@ public class BaseFeatureResourceDO {
|
||||
/** 资源名称 **/
|
||||
private String featureName;
|
||||
|
||||
/** 资源类型 1-菜单 2-页面 3-应用入口 4-组件 **/
|
||||
/** 资源类型 1-菜单 2-页面 3-应用入口 4-组件 5-ROOT根节点 **/
|
||||
private Integer featureType;
|
||||
|
||||
/** 资源编码 **/
|
||||
private String featureCode;
|
||||
private String uniCode;
|
||||
|
||||
/** 状态 0-隐藏 1-显示 **/
|
||||
private Integer status;
|
||||
@ -38,4 +40,10 @@ public class BaseFeatureResourceDO {
|
||||
|
||||
/** 组件类型 **/
|
||||
private Integer componentType;
|
||||
|
||||
/** 组件元素的code列表 */
|
||||
private List<String> pageElementCodes;
|
||||
|
||||
/** 图片资源对象 **/
|
||||
private FeatureResourceExtraDO extra;
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package cn.axzo.tyr.client.model.base;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/24
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FeatureResourceExtraDO implements Serializable {
|
||||
|
||||
/**
|
||||
* 选中的图标
|
||||
*/
|
||||
private String activeIcon;
|
||||
|
||||
/**
|
||||
* 更多图标
|
||||
*/
|
||||
private String moreIcon;
|
||||
}
|
||||
@ -33,7 +33,7 @@ public class DefaultDataObjectRuleBO {
|
||||
|
||||
/**
|
||||
* 行级数据权限(单选) 1:仅本人数据 2:本人及下属数据 3:仅本部门数据 4:本部门及以下数据
|
||||
* 5:仅本单位数据 6:本单位及下级直属单位数据 7:本单位及下级协同(直属+合作)单位数据 8:本单位及以下协同(直属+合作)单位数据 9:本项目部数据
|
||||
* 5:仅本单位数据 6:本单位及下级直属单位数据 7:本单位及下级协同(直属+合作)单位数据 8:本单位及以下协同(直属+合作)单位数据 9:本项目数据
|
||||
*/
|
||||
private Integer rowPermission;
|
||||
/**
|
||||
|
||||
@ -23,11 +23,11 @@ public enum DictWorkSpaceTypeEnum {
|
||||
ENT("ent", "企业工作台", 7,1, "单位租户"),
|
||||
|
||||
/**
|
||||
* 项目部工作台
|
||||
* 项目工作台
|
||||
*/
|
||||
PROJ("proj", "项目部工作台",1,2, "项目租户"),
|
||||
PROJ("proj", "项目工作台",1,2, "项目租户"),
|
||||
|
||||
GOVERNMENT("government", "政务监管平台",3,3, "政务监管平台"),
|
||||
GOVERNMENT("gov", "政务监管平台",3,3, "政务监管平台"),
|
||||
|
||||
/**
|
||||
* OMS工作台
|
||||
|
||||
@ -9,7 +9,7 @@ import java.util.Map;
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PermissionScopeType {
|
||||
WORKSPACE("workspace", "项目部"),
|
||||
WORKSPACE("workspace", "项目"),
|
||||
OU ("ou", "单位"),
|
||||
;
|
||||
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package cn.axzo.tyr.client.model.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/5/6
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ProductModuleCategoryEnum {
|
||||
|
||||
/**
|
||||
* 产品版本
|
||||
*/
|
||||
PRODUCT_VERSION("PRODUCT_VERSION", "产品版本"),
|
||||
|
||||
/**
|
||||
* 增值服务包
|
||||
*/
|
||||
ADD_VALUE_SERVICE("ADD_VALUE_SERVICE", "增值服务包"),
|
||||
|
||||
/**
|
||||
* 通用产品
|
||||
*/
|
||||
GENERAL_SERVICE("GENERAL_SERVICE", "通用产品"),
|
||||
|
||||
/**
|
||||
* 硬件产品
|
||||
*/
|
||||
HARD_WARE("HARD_WARE", "硬件产品"),
|
||||
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private String code;
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 通过value值获取枚举类型
|
||||
*
|
||||
* @param code code值
|
||||
* @return
|
||||
*/
|
||||
public static ProductModuleCategoryEnum getByCode(String code) {
|
||||
return Arrays.stream(values()).filter(l -> l.getCode().equals(code)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
return Optional.ofNullable(getByCode(code)).map(ProductModuleCategoryEnum::getDesc).orElse(null);
|
||||
}
|
||||
|
||||
public static List<String> ALL_CATEGORY_CODE = Lists.newArrayList(PRODUCT_VERSION.getCode(), ADD_VALUE_SERVICE.getCode(), GENERAL_SERVICE.getCode(), HARD_WARE.getCode());
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package cn.axzo.tyr.client.model.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/5/6
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WorkspaceTypeCodeEnum {
|
||||
|
||||
/**
|
||||
* 企业
|
||||
*/
|
||||
GENERAL_ENT("1", "企业"),
|
||||
|
||||
/**
|
||||
* 项目
|
||||
*/
|
||||
GENERAL_PROJECT("2", "项目"),
|
||||
|
||||
/**
|
||||
* 政务
|
||||
*/
|
||||
GOVERNMENT("3", "政务"),
|
||||
|
||||
/**
|
||||
* 班组
|
||||
*/
|
||||
TEAM("5", "班组"),
|
||||
|
||||
/**
|
||||
* OMS
|
||||
*/
|
||||
OMS("6", "OMS"),
|
||||
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private String code;
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 通过value值获取枚举类型
|
||||
*
|
||||
* @param code code值
|
||||
* @return
|
||||
*/
|
||||
public static WorkspaceTypeCodeEnum getByCode(String code) {
|
||||
return Arrays.stream(values()).filter(l -> l.getCode().equals(code)).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
return Optional.ofNullable(getByCode(code)).map(WorkspaceTypeCodeEnum::getDesc).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台允许新增的租户类型
|
||||
*/
|
||||
public static final List<WorkspaceTypeCodeEnum> ALLOW_ADD_WORKSPACE_TYPE_CODE_ENUM = Lists.newArrayList(GENERAL_ENT, GENERAL_PROJECT, GOVERNMENT);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.axzo.tyr.client.model.permission;
|
||||
|
||||
import cn.axzo.tyr.client.model.vo.OperatorRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class DeletePermissionPointRequest extends OperatorRequest {
|
||||
|
||||
@NotNull
|
||||
private Long permissionId;
|
||||
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.client.model.permission;
|
||||
|
||||
import cn.axzo.tyr.client.model.vo.Operator;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@ -160,6 +161,12 @@ public class PermissionPointDTO {
|
||||
/** 业务编码 **/
|
||||
private String businessNo;
|
||||
|
||||
private Operator operator;
|
||||
|
||||
public Operator determineOperator() {
|
||||
return operator == null ? Operator.absent() : operator;
|
||||
}
|
||||
|
||||
public Long mergeFitOuTypeBit() {
|
||||
if (this.fitOuTypeList == null || this.fitOuTypeList.isEmpty()) {
|
||||
return null;
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.tyr.client.model.product;
|
||||
|
||||
import cn.axzo.tyr.client.model.vo.OperatorRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class OldUpdateFeatureRelationRequestV2 extends OperatorRequest {
|
||||
|
||||
private List<ProductFeatureRelationUpdateReq> relations;
|
||||
private Map<String, Object> externalLogs = new ConcurrentHashMap<>();
|
||||
|
||||
public void addExternalLogThreadSafe(String key, Object value) {
|
||||
externalLogs.put(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.axzo.tyr.client.model.product;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/20
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProductDetailReq {
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
@Min(value = 1, message = "")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 是否查询功能权限点
|
||||
*/
|
||||
@Builder.Default
|
||||
private Boolean queryFeatureScope = Boolean.FALSE;
|
||||
}
|
||||
@ -34,4 +34,8 @@ public class ProductFeatureRelationSearchReq {
|
||||
*/
|
||||
private String dictCode;
|
||||
|
||||
/**
|
||||
* 关系类型
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
|
||||
@ -41,4 +41,6 @@ public class ProductFeatureRelationUpdateReq {
|
||||
* 权限点 ID
|
||||
*/
|
||||
private List<Long> featureIds = new ArrayList<>();
|
||||
|
||||
private Integer featureRelationType;
|
||||
}
|
||||
|
||||
@ -40,4 +40,9 @@ public class ProductFeatureRelationVO {
|
||||
* 权限点 ID
|
||||
*/
|
||||
private Long featureId;
|
||||
|
||||
/**
|
||||
* 关联类型(0:saas_feature,1:saas_feature_resource)
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
|
||||
@ -27,9 +27,18 @@ public class ProductSearchPageReq extends PageRequest {
|
||||
*/
|
||||
private Long dictWorkspaceTypeId;
|
||||
|
||||
/**
|
||||
* 租户编码(工作台编码)
|
||||
*/
|
||||
private Long dictWorkspaceTypeCode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
private String productCategory;
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.client.model.product;
|
||||
|
||||
import cn.axzo.tyr.client.model.vo.Operator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@ -69,4 +70,9 @@ public class ProductUpdateReq {
|
||||
*/
|
||||
private List<Integer> ouTypes;
|
||||
|
||||
private Operator operator;
|
||||
|
||||
public Operator determineOperator() {
|
||||
return operator == null ? Operator.absent() : operator;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 产品模型
|
||||
@ -97,4 +98,148 @@ public class ProductVO {
|
||||
*/
|
||||
private List<Integer> ouTypes;
|
||||
|
||||
/**
|
||||
* 产品类型
|
||||
* PRODUCT_VERSON:产品版本类型、ADD_VALUE_SERVICE:增值服务类型、
|
||||
* GENERAL_SERVICE:通用产品类型、HARD_WARE:硬件产品类型
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 产品类型名称
|
||||
*/
|
||||
private String productCategoryDesc;
|
||||
|
||||
/**
|
||||
* 版本升级序列(数字越小,版本越低,不能降级,只能升级) <企业、项目产品>
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 人数上限 <企业、项目产品>
|
||||
*/
|
||||
private Integer maxPersonCount;
|
||||
|
||||
/**
|
||||
* 最大项目数 <企业产品>
|
||||
*/
|
||||
private Integer maxWorkspaceCount;
|
||||
|
||||
/**
|
||||
* 价格(单位:分)
|
||||
*/
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* 产品详情
|
||||
*/
|
||||
private List<Sku> skus;
|
||||
|
||||
/**
|
||||
* 素材<仅硬件产品支持>
|
||||
*/
|
||||
private Material material;
|
||||
|
||||
/**
|
||||
* 功能范围(政务产品,只取根节点的featureId,后台取拉群所选根节点的所有子节点featureId)
|
||||
*/
|
||||
private List<FeatureScope> featureScopes;
|
||||
|
||||
/**
|
||||
* 新老产品标记,前端确认查询权限树的接口。0:旧权限,1:新权限树
|
||||
*/
|
||||
private Integer relationType;
|
||||
|
||||
/**
|
||||
* 功能范围(非政务产品)
|
||||
*/
|
||||
private List<ProductFeatureRelation> relations;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Sku {
|
||||
|
||||
/**
|
||||
* SKU名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Material {
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private List<String> images;
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private List<String> videos;
|
||||
|
||||
/**
|
||||
* 详情大图
|
||||
*/
|
||||
private List<String> detailImages;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class FeatureScope {
|
||||
|
||||
/**
|
||||
* 政务端featureResourceId
|
||||
*/
|
||||
private Long governmentFeatureResourceId;
|
||||
|
||||
/**
|
||||
* 功能资源名称
|
||||
*/
|
||||
private String featureResourceName;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ProductFeatureRelation {
|
||||
|
||||
/**
|
||||
* 单位类型
|
||||
*/
|
||||
private Long dictCodeId;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private Integer totalCount;
|
||||
|
||||
/**
|
||||
* 勾选的最末级 feature 的 ID 集合
|
||||
*/
|
||||
private List<Long> featureIds;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DeleteFeatureResourceReq {
|
||||
|
||||
@NotNull(message = "featureId不能为空")
|
||||
private Long featureId;
|
||||
|
||||
@NotNull(message = "operatorId不能为空")
|
||||
private Long operatorId;
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class FeatureIdPair {
|
||||
|
||||
/**
|
||||
* 区分新老菜单资源树
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
private Set<Long> featureIds;
|
||||
}
|
||||
@ -22,7 +22,7 @@ public class FeatureResourceTreeSaveReq extends BaseFeatureResourceDO {
|
||||
/** 路由地址 **/
|
||||
private String linkUrl;
|
||||
|
||||
/** 路由类型 1-PC 2-小程序 3-原生 **/
|
||||
/** 路由类型 1-PC 2-小程序 3-原生 4-h5**/
|
||||
private Integer linkType;
|
||||
|
||||
/** APP适配参数 **/
|
||||
@ -34,6 +34,16 @@ public class FeatureResourceTreeSaveReq extends BaseFeatureResourceDO {
|
||||
/** 授权类型 0-全部角色 1-指定角色 **/
|
||||
private Integer authType;
|
||||
|
||||
/**
|
||||
* 应用范围(租户类型):1:企业工作台 2;项目工作台
|
||||
*/
|
||||
private Long workspaceType;
|
||||
|
||||
/**
|
||||
* 最低版本序列,主要支持版本灰度策略
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/** 页面组件对象 **/
|
||||
private List<FeatureComponentSaveReq> componentSaveReqList;
|
||||
|
||||
|
||||
@ -29,10 +29,17 @@ public class FeatureRoleRelationReq {
|
||||
/** 功能Id **/
|
||||
private Long featureId;
|
||||
|
||||
/**
|
||||
* 菜单资源的类型
|
||||
*/
|
||||
private Integer featureType;
|
||||
|
||||
/** 应用的角色Id列表 **/
|
||||
private List<Long> roleIds;
|
||||
|
||||
/** 授权类型 0-全部角色 1-指定角色 **/
|
||||
private Integer authType;
|
||||
|
||||
private String terminal;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,4 +27,16 @@ public class GetFeatureResourceTreeReq {
|
||||
|
||||
/** feature类型列表 **/
|
||||
private List<Integer> featureTypes;
|
||||
|
||||
/**
|
||||
* 应用范围(原租户类型):1:企业租户 2;项目租户
|
||||
* 只有页面和应用会配置应用范围
|
||||
*/
|
||||
private Long workspaceType;
|
||||
|
||||
/**
|
||||
* 是否过滤掉空菜单(没有子页面和组件的菜单过滤不返回)
|
||||
*/
|
||||
@Builder.Default
|
||||
private Boolean needFilterBlankMenu = Boolean.FALSE;
|
||||
}
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GetPageElementReq {
|
||||
|
||||
/**
|
||||
* 页面的featureResourceId
|
||||
*/
|
||||
@NotNull(message = "页面的featureResourceId不能为空")
|
||||
@Min(value = 1, message = "页面的featureResourceId有误")
|
||||
private Long featureResourceId;
|
||||
|
||||
/**
|
||||
* 是否只查询组件已选择的元素
|
||||
*/
|
||||
@Builder.Default
|
||||
private Boolean querySelectedOnly = Boolean.FALSE;
|
||||
|
||||
/**
|
||||
* 查询的关联类型,默认全查
|
||||
* 如果要过滤页面路由的,relationTypes传[0]
|
||||
*/
|
||||
@Builder.Default
|
||||
private List<Integer> relationTypes = Lists.newArrayList(0, 1);
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/17
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GetUserHasPermissionPageElementReq {
|
||||
|
||||
/** 页面的元素 **/
|
||||
@NotBlank(message = "页面的元素不能为空")
|
||||
private String pageElementCode;
|
||||
|
||||
/** 登录端 **/
|
||||
@NotBlank(message = "登录端不能为空")
|
||||
private String terminal;
|
||||
|
||||
/** 人员ID **/
|
||||
@NotNull(message = "人员ID不能为空")
|
||||
@Min(value = 1, message = "人员ID有误")
|
||||
private Long personId;
|
||||
|
||||
/** 单位ID **/
|
||||
@NotNull(message = "单位ID不能为空")
|
||||
@Min(value = 1, message = "单位ID有误")
|
||||
private Long ouId;
|
||||
|
||||
/** 租户ID **/
|
||||
@NotNull(message = "租户ID不能为空")
|
||||
@Min(value = 1, message = "租户ID有误")
|
||||
private Long workspaceId;
|
||||
}
|
||||
@ -1,9 +1,8 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.framework.auth.domain.TerminalInfo;
|
||||
import cn.axzo.tyr.client.common.enums.WorkspaceJoinType;
|
||||
import cn.axzo.tyr.client.model.enums.FeatureType;
|
||||
import cn.axzo.tyr.client.model.enums.IdentityType;
|
||||
import cn.axzo.tyr.client.model.res.IdentityAuthRes;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@ -13,18 +12,11 @@ import lombok.NoArgsConstructor;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.axzo.tyr.client.common.enums.WorkspaceJoinType.ENT_GROUP;
|
||||
import static cn.axzo.tyr.client.common.enums.WorkspaceJoinType.ENT_TEAM;
|
||||
import static cn.axzo.tyr.client.common.enums.WorkspaceJoinType.PROJ_GROUP;
|
||||
import static cn.axzo.tyr.client.common.enums.WorkspaceJoinType.PROJ_TEAM;
|
||||
|
||||
/**
|
||||
* @author tanjie@axzo.cn
|
||||
* @date 2023/10/13 15:23
|
||||
@ -72,6 +64,22 @@ public class IdentityAuthReq {
|
||||
/** 是否使用缓存 - 默认true **/
|
||||
@Builder.Default
|
||||
private boolean useCache = true;
|
||||
public IdentityAuthRes toEmpty() {
|
||||
IdentityAuthRes result = new IdentityAuthRes();
|
||||
result.setIdentity(this.getIdentityId());
|
||||
result.setIdentityType(this.getIdentityType());
|
||||
result.setPersonId(this.getPersonId());
|
||||
|
||||
List<IdentityAuthRes.WorkspacePermission> permissions = this.getWorkspaceOusPairs().stream()
|
||||
.map(workspaceOuPair -> IdentityAuthRes.WorkspacePermission.builder()
|
||||
.workspaceId(workspaceOuPair.getWorkspaceId())
|
||||
.ouId(workspaceOuPair.getOuId())
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
result.setPermissions(permissions);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void distinctOUWorkspacePair() {
|
||||
if (CollectionUtil.isEmpty(this.workspaceOusPairs)) {
|
||||
|
||||
@ -44,6 +44,12 @@ public class ListPermissionFromRoleGroupReq {
|
||||
/** 角色组ID **/
|
||||
private List<Long> roleGroupIds;
|
||||
|
||||
/**
|
||||
* 原接口使用方有的需要2,有的需要3,当时加这个出了问题,默认为3
|
||||
* 1-仅查当前code 2-对应code角色组及子级角色组 3-仅对应code角色组的子级
|
||||
*/
|
||||
private Integer categoryType;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
|
||||
@ -13,23 +13,63 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
public class ListRoleReq {
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private List<Long> roleIds;
|
||||
|
||||
/**
|
||||
* 租户类型:DictWorkSpaceTypeEnum
|
||||
*/
|
||||
private Integer workspaceType;
|
||||
|
||||
/**
|
||||
* 是否显示
|
||||
*/
|
||||
private Boolean isDisplay;
|
||||
|
||||
/**
|
||||
* 角色权限码
|
||||
*/
|
||||
private String roleCode;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private List<Long> workspaceIds;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private List<Long> ouIds;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 角色类型:RoleTypeEnum
|
||||
* super_admin:超级管理员
|
||||
* admin:管理员
|
||||
* init:初始化内置角色-标准角色
|
||||
* auto_own:虚拟角色(自定义权限使用)
|
||||
* common:自定义角色
|
||||
*/
|
||||
private List<String> roleTypes;
|
||||
|
||||
/**
|
||||
* 是否需要角色下的权限信息
|
||||
*/
|
||||
private Boolean needPermission;
|
||||
|
||||
/**
|
||||
* 是否需要角色对应的角色分组信息
|
||||
*/
|
||||
private Boolean needRoleGroup;
|
||||
|
||||
/**
|
||||
* 是否需要角色对应的用户信息
|
||||
*/
|
||||
private Boolean needRoleUser;
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ListSaasRoleGroupParam {
|
||||
|
||||
@CriteriaField(field = "workspaceTypeCode", operator = Operator.EQ)
|
||||
private Integer workspaceTypeCode;
|
||||
|
||||
@CriteriaField(field = "workspaceId", operator = Operator.EQ)
|
||||
private Long workspaceId;
|
||||
|
||||
@CriteriaField(field = "ouId", operator = Operator.EQ)
|
||||
private Long ouId;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needRole;
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ModifyPageElementRelationDTO {
|
||||
|
||||
/**
|
||||
* 操作人ID
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 组件所属端
|
||||
*/
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 组件code
|
||||
*/
|
||||
private String featureResourceUniCode;
|
||||
|
||||
/**
|
||||
* 页面元素编码列表
|
||||
*/
|
||||
private List<String> pageElementCodes;
|
||||
|
||||
/**
|
||||
* 绑定关系
|
||||
*/
|
||||
@Builder.Default
|
||||
private Integer relationType = 0;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageElementFeatureResourceRelationReq implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
|
||||
@CriteriaField(field = "featureResourceUniCode", operator = Operator.IN)
|
||||
private List<String> featureResourceUniCodes;
|
||||
|
||||
@CriteriaField(field = "pageElementCode", operator = Operator.IN)
|
||||
private Set<String> pageElementCodes;
|
||||
|
||||
@CriteriaField(field = "terminal", operator = Operator.EQ)
|
||||
private String terminal;
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageElementReportReq {
|
||||
|
||||
/**
|
||||
* 端
|
||||
*/
|
||||
@NotBlank(message = "端信息不能为空")
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 上报秘钥
|
||||
*/
|
||||
@NotBlank(message = "上报秘钥不能为空")
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 创建人名
|
||||
*/
|
||||
@NotBlank(message = "创建人名不能为空")
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 页面元素列表
|
||||
*/
|
||||
@NotEmpty(message = "页面元素不能为空")
|
||||
private List<PageElement> pageElements;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class PageElement {
|
||||
|
||||
/**
|
||||
* 元素编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 元素名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 元素类型(PAGE:页面,COMPONENT:页面里的组件)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 子元素(只包含一级)
|
||||
*/
|
||||
private List<PageElement> children;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import cn.axzo.tyr.client.common.enums.FeatureResourceType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PagePgroupPermissionRelationReq implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
|
||||
@CriteriaField(field = "id", operator = Operator.IN)
|
||||
private List<Long> ids;
|
||||
|
||||
@CriteriaField(field = "groupId", operator = Operator.IN)
|
||||
private List<Long> groupIds;
|
||||
|
||||
@CriteriaField(field = "featureId", operator = Operator.IN)
|
||||
private List<Long> featureIds;
|
||||
|
||||
@CriteriaField(field = "type", operator = Operator.EQ)
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 查询菜单树节点类型
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private List<FeatureResourceType> featureResourceTypes;
|
||||
|
||||
/**
|
||||
* 端,查询权限点时,会根据端过滤,增加效率,目前只有CMS端的新版本才冗余了端
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 新老版本两个情况,可以配对查询
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private List<FeatureIdPair> featureIdPairs;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageProductFeatureRelationReq implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
|
||||
@CriteriaField(field = "id", operator = Operator.IN)
|
||||
private List<Long> ids;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageQueryElementReq {
|
||||
|
||||
/**
|
||||
* 端
|
||||
*/
|
||||
@NotBlank(message = "端不能为空")
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 页面元素组件类型
|
||||
*/
|
||||
private List<String> elementTypes;
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*/
|
||||
private String searchKey;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
@Builder.Default
|
||||
private Long page = 1L;
|
||||
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
@Builder.Default
|
||||
private Long pageSize = 100L;
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import cn.axzo.foundation.page.PageResp;
|
||||
import cn.axzo.tyr.client.common.enums.FeatureResourceType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageSaasFeatureResourceReq implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
|
||||
@CriteriaField(field = "id", operator = Operator.IN)
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 授权类型0-全部角色 1-指定角色
|
||||
* FeatureResourceAuthType.ALL_ROLE
|
||||
*/
|
||||
@CriteriaField(field = "authType", operator = Operator.EQ)
|
||||
private Integer authType;
|
||||
|
||||
/**
|
||||
* 资源所属端
|
||||
*/
|
||||
@CriteriaField(field = "terminal", operator = Operator.EQ)
|
||||
private String terminal;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Long parentId;
|
||||
|
||||
@CriteriaField(field = "featureType", operator = Operator.IN)
|
||||
private List<Integer> featureResourceTypes;
|
||||
|
||||
@CriteriaField(field = "path", operator = Operator.SW)
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* CMS端saas_feature_resource.feature_codes已经废弃,后续其他端也会这样迁移
|
||||
* 新的存在saas_page_element_feature_resource_relation
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needFeatureCodes;
|
||||
|
||||
@CriteriaField(field = "uniCode", operator = Operator.IN)
|
||||
private Set<String> uniCodes;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Set<String> paths;
|
||||
|
||||
public PageResp toEmpty() {
|
||||
return PageResp.builder()
|
||||
.current(this.getPage())
|
||||
.size(this.getPageSize())
|
||||
.total(0)
|
||||
.data(Collections.emptyList())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageSaasRoleGroupParam extends ListSaasRoleGroupParam implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
|
||||
}
|
||||
@ -34,6 +34,8 @@ public class PermissionCheckReq {
|
||||
@NotNull(message = "租户ID不能为空")
|
||||
private Long workspaceId;
|
||||
|
||||
/** 登录端 **/
|
||||
/**
|
||||
* 登录端,历史的cms和cmp,cm端没有给端,给了会有问题
|
||||
*/
|
||||
private String terminal;
|
||||
}
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 创建新路由请求
|
||||
*
|
||||
* @version V1.0
|
||||
* @author: ZhanSiHu
|
||||
* @date: 2023/9/11 10:33
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PermissionOperateLogReq implements Serializable {
|
||||
|
||||
|
||||
@NotBlank(message = "表名不能为空")
|
||||
private String tableName;
|
||||
|
||||
@NotNull(message = "操作人ID不能为空")
|
||||
@Min(value = 1, message = "操作人ID有误")
|
||||
private Long operatorId;
|
||||
|
||||
@NotBlank(message = "场景不能为空")
|
||||
private String scene;
|
||||
|
||||
private String sceneId;
|
||||
|
||||
private Object requestData;
|
||||
|
||||
private Object operateData;
|
||||
}
|
||||
@ -0,0 +1,189 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/4/26
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductSaveReq {
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空")
|
||||
@Length(max = 35, message = "产品名称长度不能超过 35 个字符")
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 产品icon
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 产品所属租户类型
|
||||
*/
|
||||
@NotNull(message = "租户类型不能为空")
|
||||
private Long dictWorkspaceTypeId;
|
||||
|
||||
/**
|
||||
* 产品类型
|
||||
*/
|
||||
@NotBlank(message = "产品类型不能为空")
|
||||
private String productCategory;
|
||||
|
||||
/**
|
||||
* 版本升级序列(数字越小,版本越低,不能降级,只能升级) <企业、项目产品>
|
||||
*/
|
||||
@Min(value = 0, message = "版本升级序列有误")
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 人数上限 <企业、项目产品>
|
||||
*/
|
||||
@Min(value = 0, message = "人数上限有误")
|
||||
private Integer maxPersonCount;
|
||||
|
||||
/**
|
||||
* 最大项目数 <企业产品>
|
||||
*/
|
||||
@Min(value = 0, message = "最大项目数有误")
|
||||
private Integer maxWorkspaceCount;
|
||||
|
||||
/**
|
||||
* 价格(单位:分) <企业、项目产品>
|
||||
*/
|
||||
@Min(value = 0, message = "价格有误")
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* SKU列表
|
||||
*/
|
||||
@Valid
|
||||
private List<Sku> skus;
|
||||
|
||||
/**
|
||||
* 素材<仅硬件产品支持>
|
||||
*/
|
||||
private Material material;
|
||||
|
||||
/**
|
||||
* 功能范围(政务产品,只取根节点的featureId,后台取拉群所选根节点的所有子节点featureId)
|
||||
*/
|
||||
private FeatureScope featureScope;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
private Long operator;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Sku {
|
||||
|
||||
/**
|
||||
* SKU名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
@Min(value = 1, message = "数量有误")
|
||||
private Integer count;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Material {
|
||||
|
||||
/**
|
||||
* 图片素材
|
||||
*/
|
||||
private List<String> images;
|
||||
|
||||
/**
|
||||
* 视频素材
|
||||
*/
|
||||
private List<String> videos;
|
||||
|
||||
/**
|
||||
* 详情介绍大图
|
||||
*/
|
||||
private List<String> detailImages;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class FeatureScope {
|
||||
|
||||
/**
|
||||
* 政务端featureResourceId
|
||||
*/
|
||||
private List<Long> governmentFeatureResourceIds;
|
||||
|
||||
/**
|
||||
* 产品与功能点的关联关系
|
||||
*/
|
||||
private List<ProductFeatureRelation> relations;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class ProductFeatureRelation {
|
||||
/**
|
||||
* 单位类型
|
||||
*/
|
||||
private Long dictCodeId;
|
||||
|
||||
/**
|
||||
* 勾选的最末级 feature 的 ID 集合
|
||||
*/
|
||||
private Set<Long> featureIds;
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ -16,7 +17,7 @@ public class QuerySaasRoleGroupReq {
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 项目部id(不传或者传-1查询的是标准分组)
|
||||
* 项目id(不传或者传-1查询的是标准分组)
|
||||
*/
|
||||
private List<Long> workspaceIds;
|
||||
|
||||
@ -46,4 +47,6 @@ public class QuerySaasRoleGroupReq {
|
||||
private List<Long> roleIds;
|
||||
|
||||
private Long parentId;
|
||||
|
||||
private Set<Long> parentIds;
|
||||
}
|
||||
|
||||
@ -29,4 +29,6 @@ public class ResourceSyncReq {
|
||||
/** 操作人personId **/
|
||||
@NotNull(message = "操作人ID不能为空")
|
||||
private Long operatorId;
|
||||
|
||||
private String traceId;
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.tyr.client.model.vo.OperatorRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class SaasRoleGroupDeleteRequest extends OperatorRequest {
|
||||
|
||||
@NotEmpty(message = "ids不能为空")
|
||||
private List<Long> ids;
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.tyr.client.common.enums.FeatureResourceType;
|
||||
import cn.axzo.tyr.client.model.base.WorkspaceOUPair;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TreePermissionReq {
|
||||
|
||||
@NotNull(message = "人员ID不能为空")
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 端
|
||||
*/
|
||||
@NotNull(message = "端不能为空")
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 项目与企业
|
||||
*/
|
||||
@NotEmpty(message = "项目与企业对不能为空")
|
||||
private List<WorkspaceOUPair> workspaceOUPairs;
|
||||
|
||||
/**
|
||||
* 查询菜单树节点类型
|
||||
*/
|
||||
private List<FeatureResourceType> featureResourceTypes;
|
||||
|
||||
/**
|
||||
* 菜单节点的uniCode
|
||||
*/
|
||||
private String uniCode;
|
||||
|
||||
/**
|
||||
* 是否需要返回权限码
|
||||
*/
|
||||
private boolean needFeatureCodes;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TreeProductFeatureResourceReq {
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@NotNull(message = "workspaceId不能为空")
|
||||
private Long workspaceId;
|
||||
|
||||
private String terminal;
|
||||
}
|
||||
@ -25,7 +25,7 @@ public class TreeRoleReq {
|
||||
private Boolean isDisplay;
|
||||
|
||||
/**
|
||||
* 项目部id(不传或者传-1查询的是标准分组)
|
||||
* 项目id(不传或者传-1查询的是标准分组)
|
||||
*/
|
||||
private List<Long> workspaceIds;
|
||||
|
||||
|
||||
@ -0,0 +1,35 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/4/26
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UpdateProductStatusReq {
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
@NotNull(message = "产品ID不能为空")
|
||||
@Min(value = 1, message = "产品ID有误")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@Min(value = 0, message = "状态有误")
|
||||
@Max(value = 1, message = "状态有误")
|
||||
private Integer status;
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.tyr.client.model.base.FeatureResourceExtraDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -7,6 +8,7 @@ import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 功能资源DTO
|
||||
@ -38,7 +40,7 @@ public class FeatureResourceDTO implements Serializable {
|
||||
private String featureName;
|
||||
|
||||
/**
|
||||
* 资源类型1-菜单 2-页面 3-应用入口 4-组件
|
||||
* 资源类型1-菜单 2-页面 3-应用入口 4-组件 5-root 6-分组
|
||||
*/
|
||||
private Integer featureType;
|
||||
|
||||
@ -88,7 +90,7 @@ public class FeatureResourceDTO implements Serializable {
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 路由类型1-PC 2-小程序 3-原生
|
||||
* 路由类型1-PC 2-小程序 3-原生 4-h5
|
||||
*/
|
||||
private Integer linkType;
|
||||
|
||||
@ -110,7 +112,7 @@ public class FeatureResourceDTO implements Serializable {
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
private String extra;
|
||||
private FeatureResourceExtraDO extra;
|
||||
|
||||
/**
|
||||
* 授权类型0-全部角色 1-指定角色
|
||||
@ -136,4 +138,24 @@ public class FeatureResourceDTO implements Serializable {
|
||||
* 更新人
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 应用范围(租户类型):1:企业工作台 2;项目工作台
|
||||
*/
|
||||
private Long workspaceType;
|
||||
|
||||
/**
|
||||
* 最低版本序列,主要支持版本灰度策略
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 唯一编码,用于pre环境菜单同步
|
||||
*/
|
||||
private String uniCode;
|
||||
|
||||
/**
|
||||
* 页面元素对象
|
||||
*/
|
||||
private List<PageElementBasicDTO> pageElements;
|
||||
}
|
||||
|
||||
@ -24,6 +24,8 @@ public class FeatureResourceTreeNode extends FeatureResourceDTO implements IBase
|
||||
|
||||
private List<FeatureResourceTreeNode> children;
|
||||
|
||||
private List<String> roleCodes;
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public Long getNodeCode() {
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/17
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GetUserHasPermissionPageElementResp {
|
||||
|
||||
/**
|
||||
* 页面元素的elementCodes
|
||||
*/
|
||||
private List<String> pageElementCodes;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/4/30
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GovernmentTerminalResp {
|
||||
|
||||
/**
|
||||
* 功能资源ID
|
||||
*/
|
||||
private Long featureResourceId;
|
||||
|
||||
/**
|
||||
* 功能资源名称
|
||||
*/
|
||||
private String featureResourceName;
|
||||
}
|
||||
@ -61,6 +61,11 @@ public class IdentityAuthRes {
|
||||
// private FeatureType featureType;
|
||||
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 应用范围(租户类型):1:企业工作台 2;项目工作台
|
||||
*/
|
||||
private Long workspaceType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.tyr.client.model.enums.IdentityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -55,6 +57,11 @@ public class ListPermissionFromRoleGroupResp {
|
||||
*/
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 角色编码
|
||||
*/
|
||||
private String roleCode;
|
||||
|
||||
/**
|
||||
* 权限集ID
|
||||
*/
|
||||
@ -66,8 +73,22 @@ public class ListPermissionFromRoleGroupResp {
|
||||
*/
|
||||
private Set<Long> simpleFeatureInfos;
|
||||
|
||||
/**
|
||||
* 权限点及是否为新旧权限点
|
||||
*/
|
||||
private Set<FeatureInfo> featureInfos;
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class FeatureInfo {
|
||||
private Long featureId;
|
||||
/** 0:saas_feature,1:saas_feature_resource **/
|
||||
private Integer relationType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/19
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageElementBasicDTO {
|
||||
|
||||
/**
|
||||
* 页面、元素ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组件编码
|
||||
*/
|
||||
private String uniCode;
|
||||
|
||||
/**
|
||||
* 页面、元素编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 页面、元素名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 绑定关系
|
||||
* @see cn.axzo.tyr.client.common.enums.PageElementFeatureResourceRelationTypeEnum
|
||||
*/
|
||||
private Integer relationType;
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/6/14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageElementResp {
|
||||
|
||||
/**
|
||||
* 元素ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 元素的组编码
|
||||
*/
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 元素编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 元素名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 元素类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 页面路由地址
|
||||
*/
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 是否已勾选
|
||||
*/
|
||||
private Boolean selected;
|
||||
|
||||
/**
|
||||
* 子元素(只包含一级)
|
||||
*/
|
||||
private List<PageElementResp> children;
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.basics.common.model.IBaseTree;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductFeatureResourceResp implements IBaseTree<ProductFeatureResourceResp, Long> {
|
||||
|
||||
/**
|
||||
* 权限id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限编码
|
||||
*/
|
||||
private String featureCode;
|
||||
|
||||
/**
|
||||
* 权限名字
|
||||
*/
|
||||
private String featureName;
|
||||
|
||||
/**
|
||||
* 资源类型1-菜单 2-页面 3-应用入口 4-组件
|
||||
*/
|
||||
private Integer featureType;
|
||||
|
||||
/**
|
||||
* 资源所属端
|
||||
*/
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 展示顺序
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
/**
|
||||
* 父节点id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 子节点信息
|
||||
*/
|
||||
private List<ProductFeatureResourceResp> children;
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public Long getNodeCode() {
|
||||
return this.getId();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public Long getParentNodeCode() {
|
||||
return this.getParentId();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public List<ProductFeatureResourceResp> getNodeChildren() {
|
||||
return this.children;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNodeChildren(List<ProductFeatureResourceResp> nodeChildren) {
|
||||
this.children = nodeChildren;
|
||||
}
|
||||
}
|
||||
@ -23,8 +23,21 @@ public class RoleTreeRes {
|
||||
*/
|
||||
private String workspaceTypeCode;
|
||||
|
||||
/**
|
||||
* 租户类型
|
||||
*/
|
||||
private String workspaceType;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
|
||||
@ -0,0 +1,146 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.tyr.client.model.base.FeatureResourceExtraDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SaasFeatureResourceResp {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Date createAt;
|
||||
|
||||
private Date updateAt;
|
||||
|
||||
/**
|
||||
* 资源编码-权限码
|
||||
*/
|
||||
private Set<String> featureCodes;
|
||||
|
||||
/**
|
||||
* 资源名称
|
||||
*/
|
||||
private String featureName;
|
||||
|
||||
/**
|
||||
* 资源类型1-菜单 2-页面 3-应用入口 4-组件;5-root节点
|
||||
*/
|
||||
private Integer featureType;
|
||||
|
||||
/**
|
||||
* 资源所属端
|
||||
*/
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 组件细分类型 1-跳转子页面 2-跳转公共组件 3-弹出窗口 4-下拉项 5-操作按钮 6-数据卡片 7-站外跳转
|
||||
*/
|
||||
private Integer componentType;
|
||||
|
||||
/**
|
||||
* 上级资源ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 资源ID层级路径, 逗号分隔
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 展示顺序
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
/**
|
||||
* 资源状态 0-隐藏 1-展示
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 资源图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 跳转类型 1-站内跳转 2-站外跳转
|
||||
*/
|
||||
private Integer redirectType;
|
||||
|
||||
/**
|
||||
* 资源跳转URI
|
||||
*/
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 路由类型1-PC 2-小程序 3-原生
|
||||
*/
|
||||
private Integer linkType;
|
||||
|
||||
/**
|
||||
* APP适配参数
|
||||
*/
|
||||
private String linkExt;
|
||||
|
||||
/**
|
||||
* 小程序id
|
||||
*/
|
||||
private Integer appItemId;
|
||||
|
||||
/**
|
||||
* 资源同步版本
|
||||
*/
|
||||
private Integer syncVersion;
|
||||
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
@TableField(value = "extra", typeHandler = FastjsonTypeHandler.class)
|
||||
private FeatureResourceExtraDO extra;
|
||||
|
||||
/**
|
||||
* 授权类型0-全部角色 1-指定角色
|
||||
*/
|
||||
private Integer authType;
|
||||
|
||||
/**
|
||||
* 子级鉴权类型 0-不鉴权1-鉴权
|
||||
*/
|
||||
private Integer subAuthType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 应用范围(租户类型):1:企业工作台 2;项目工作台
|
||||
*/
|
||||
private Long workspaceType;
|
||||
|
||||
/**
|
||||
* 最低版本序列,主要支持版本灰度策略
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 唯一编码,用于pre环境菜单同步
|
||||
*/
|
||||
private String uniCode;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SaasPermissionRelationRes {
|
||||
|
||||
/**
|
||||
* 菜单资源树节点id
|
||||
*/
|
||||
private Long featureId;
|
||||
|
||||
/**
|
||||
* 新旧菜单资源数标识
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 菜单资源树节点类型
|
||||
*/
|
||||
private Integer featureType;
|
||||
}
|
||||
@ -17,4 +17,10 @@ public class SaasPermissionRes {
|
||||
* 资源编码-权限码
|
||||
*/
|
||||
private String featureCode;
|
||||
|
||||
/**
|
||||
* 资源所属端
|
||||
*/
|
||||
private String terminal;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SaasRoleGroupDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 工作台类型字典code
|
||||
*/
|
||||
private String workspaceTypeCode;
|
||||
|
||||
/**
|
||||
* 单位类型字典code
|
||||
*/
|
||||
private String ouTypeCode;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属工作台id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
|
||||
/**
|
||||
* 所属单位id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 分组CODE
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 分类CODE, 用于代班长,小组长的权限分类。
|
||||
*/
|
||||
private String categoryCode;
|
||||
|
||||
/**
|
||||
* 上级分组id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 角色信息
|
||||
*/
|
||||
private List<SaasRoleRes> saasRoles;
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.tyr.client.model.roleuser.dto.SaasRoleUserV2DTO;
|
||||
import cn.axzo.tyr.client.model.vo.SaasPermissionGroupVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@ -107,4 +108,31 @@ public class SaasRoleRes {
|
||||
* 角色权限
|
||||
*/
|
||||
private List<SaasPermissionRes> saasPermissions;
|
||||
|
||||
/**
|
||||
* 角色对应的人员信息
|
||||
*/
|
||||
private List<SaasRoleUserV2DTO.SaasRoleUser> saasRoleUsers;
|
||||
|
||||
/**
|
||||
* 角色关联的权限点id信息,没有featureCode,直接查询的pgPermissionRelation
|
||||
*/
|
||||
private List<SaasPermissionRelationRes> permissionRelations;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class SaasRoleUser {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 用户名字
|
||||
*/
|
||||
private String realName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
|
||||
import cn.axzo.basics.common.model.IBaseTree;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TreePermissionResp implements IBaseTree<TreePermissionResp, Long> {
|
||||
|
||||
/**
|
||||
* 菜单树节点id
|
||||
*/
|
||||
private Long featureId;
|
||||
|
||||
/**
|
||||
* 菜单树节点名字
|
||||
*/
|
||||
private String featureName;
|
||||
|
||||
/**
|
||||
* 菜单资源类型1-菜单 2-页面 3-应用入口 4-组件 5-root节点 6-分组
|
||||
*/
|
||||
private Integer featureType;
|
||||
|
||||
/**
|
||||
* 跳转类型 1-站内跳转 2-站外跳转
|
||||
*/
|
||||
private Integer redirectType;
|
||||
|
||||
/**
|
||||
* 资源跳转URI
|
||||
*/
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 菜单树节点对应的前端featureCodes
|
||||
*/
|
||||
private Set<String> featureCodes;
|
||||
|
||||
/** 图标 **/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 选中的图标
|
||||
*/
|
||||
private String activeIcon;
|
||||
|
||||
/**
|
||||
* 更多图标
|
||||
*/
|
||||
private String moreIcon;
|
||||
|
||||
/**
|
||||
* 上级资源ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 资源状态 0-隐藏 1-展示
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 菜单页面编码,端唯一
|
||||
*/
|
||||
private String uniCode;
|
||||
|
||||
/**
|
||||
* 展示顺序
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
/**
|
||||
* 菜单树子节点信息
|
||||
*/
|
||||
private List<TreePermissionResp> children;
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public Long getNodeCode() {
|
||||
return this.getFeatureId();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public Long getParentNodeCode() {
|
||||
return this.getParentId();
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
@Override
|
||||
public List<TreePermissionResp> getNodeChildren() {
|
||||
return this.getChildren();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNodeChildren(List<TreePermissionResp> nodeChildren) {
|
||||
this.children = nodeChildren;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/4/28
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WorkspaceProductResp {
|
||||
|
||||
/**
|
||||
* 产品版本产品
|
||||
*/
|
||||
private List<Product> productVersions;
|
||||
|
||||
/**
|
||||
* 增值服务产品
|
||||
*/
|
||||
private List<Product> addValueServices;
|
||||
|
||||
/**
|
||||
* 通用服务产品
|
||||
*/
|
||||
private List<Product> generalServices;
|
||||
|
||||
/**
|
||||
* 硬件服务产品
|
||||
*/
|
||||
private List<Product> hardware;
|
||||
|
||||
/**
|
||||
* 政务产品
|
||||
*/
|
||||
private List<Product> governmentProduct;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Product {
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String productName;
|
||||
|
||||
/**
|
||||
* 人数上限 <企业、项目产品>
|
||||
*/
|
||||
private Integer maxPersonCount;
|
||||
|
||||
/**
|
||||
* 最大项目数 <企业产品>
|
||||
*/
|
||||
private Integer maxWorkspaceCount;
|
||||
|
||||
/**
|
||||
* 版本升级序列(数字越小,版本越低,不能降级,只能升级) <企业、项目产品>
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* SKU列表
|
||||
*/
|
||||
private List<Sku> skus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Sku {
|
||||
|
||||
/**
|
||||
* SKU名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
}
|
||||
|
||||
public static WorkspaceProductResp init() {
|
||||
return WorkspaceProductResp.builder()
|
||||
.productVersions(Lists.newArrayList())
|
||||
.addValueServices(Lists.newArrayList())
|
||||
.generalServices(Lists.newArrayList())
|
||||
.hardware(Lists.newArrayList())
|
||||
.governmentProduct(Lists.newArrayList())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.tyr.client.model.roleuser;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Builder
|
||||
public class RoleUserUpdateReq {
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
@Min(value = 0L)
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
@Min(value = 0L)
|
||||
private Long identityId;
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
@Min(value = 0L)
|
||||
private Long naturalPersonId;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.tyr.client.model.roleuser.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @version 1.0
|
||||
* @date 2024/5/22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GetUserFeatureResourceIdsResp {
|
||||
|
||||
/**
|
||||
* 资源ID列表
|
||||
*/
|
||||
private Set<Long> featureResourceIds;
|
||||
}
|
||||
@ -6,6 +6,8 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author haiyangjin
|
||||
* @date 2023/9/14
|
||||
@ -94,4 +96,9 @@ public class SaasRoleUserDTO {
|
||||
* '是否启用'
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateAt;
|
||||
}
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.axzo.tyr.client.model.roleuser.dto;
|
||||
|
||||
import cn.axzo.tyr.client.model.res.SaasPermissionRelationRes;
|
||||
import cn.axzo.tyr.client.model.res.SaasPermissionRes;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SaasRoleUserV2DTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
private SaasRoleUser saasRoleUser;
|
||||
|
||||
private SaasRole saasRole;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class SaasRoleUser {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 用户名字
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 单位Id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class SaasRole {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色类型:
|
||||
* cn.axzo.tyr.client.common.enums.RoleTypeEnum
|
||||
*/
|
||||
private String roleType;
|
||||
|
||||
private Long workspaceId;
|
||||
|
||||
private Long ownerOuId;
|
||||
|
||||
/**
|
||||
* 产品单位类型
|
||||
* 1:总包 2:建设单位 3:监理单位 4:劳务分包 5:专业分包 6:OMS通用 7:企业通用 8:企业内班组 9:项目内班组
|
||||
*/
|
||||
private Integer productUnitType;
|
||||
|
||||
/**
|
||||
* 角色权限
|
||||
*/
|
||||
private List<SaasPermissionRes> saasPermissions;
|
||||
|
||||
/**
|
||||
* 角色关联的权限点id信息,没有featureCode,直接查询的pgPermissionRelation
|
||||
*/
|
||||
private List<SaasPermissionRelationRes> permissionRelations;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package cn.axzo.tyr.client.model.roleuser.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author likunpeng
|
||||
* @date 2024/4/2
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GetUserFeatureResourceIdsReq {
|
||||
|
||||
/**
|
||||
* 工作台id
|
||||
*/
|
||||
@NotNull(message = "workspaceId不能为空")
|
||||
private Long workspaceId;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
@NotNull(message = "ouId不能为空")
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 自然人id
|
||||
*/
|
||||
@NotNull(message = "personId不能为空")
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 查询的角色类型列表
|
||||
*/
|
||||
private List<Long> roleIds;
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
package cn.axzo.tyr.client.model.roleuser.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.dao.support.wrapper.Operator;
|
||||
import cn.axzo.tyr.client.common.enums.FeatureResourceType;
|
||||
import cn.axzo.tyr.client.model.enums.IdentityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ListRoleUserRelationParam {
|
||||
|
||||
@CriteriaField(field = "roleId", operator = Operator.IN)
|
||||
private List<Long> roleIds;
|
||||
|
||||
@CriteriaField(field = "naturalPersonId", operator = Operator.IN)
|
||||
private List<Long> personIds;
|
||||
|
||||
@CriteriaField(field = "ouId", operator = Operator.EQ)
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 身份类型 1:工人 2:从业人员 3:班组长 4:运营人员 5:政务人员
|
||||
*/
|
||||
@CriteriaField(field = "identityType", operator = Operator.EQ)
|
||||
private IdentityType identityType;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needUsers;
|
||||
|
||||
/**
|
||||
* 自然人Id
|
||||
*/
|
||||
@CriteriaField(field = "naturalPersonId", operator = Operator.EQ)
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 身份Id
|
||||
*/
|
||||
@CriteriaField(field = "identityId", operator = Operator.EQ)
|
||||
private Long identityId;
|
||||
|
||||
/**
|
||||
* workspaceId和ouId配对查询
|
||||
* 例如:((workspaceId = ## and ouId = ##) or (workspaceId = ## and ouId = ##))
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private List<WorkspaceOuPair> workspaceOuPairs;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needRole;
|
||||
|
||||
/**
|
||||
* 从saas_feature中查询权限点
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needRolePermissionOld;
|
||||
|
||||
/**
|
||||
* 根据权限点id过滤
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private List<Long> featureIds;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needPermissionRelation;
|
||||
|
||||
/**
|
||||
* 查询菜单树节点类型
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private List<FeatureResourceType> featureResourceTypes;
|
||||
|
||||
/**
|
||||
* 新旧权限点,needPermissionRelation = true时最好带上,因为新旧权限点会有冲突的情况发生
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private Integer type;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
private String terminal;
|
||||
|
||||
/**
|
||||
* 权限点从saas_feature_resource表查询
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
private Boolean needPermission;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class WorkspaceOuPair {
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
private Long ouId;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.axzo.tyr.client.model.roleuser.req;
|
||||
|
||||
import cn.axzo.foundation.dao.support.wrapper.CriteriaField;
|
||||
import cn.axzo.foundation.page.IPageReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageRoleUserRelationParam extends ListRoleUserRelationParam implements IPageReq {
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer page;
|
||||
|
||||
@CriteriaField(ignore = true)
|
||||
Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序:使用示例,createTime__DESC
|
||||
*/
|
||||
@CriteriaField(ignore = true)
|
||||
List<String> sort;
|
||||
}
|
||||
@ -69,6 +69,10 @@ public class RoleUserReq {
|
||||
*/
|
||||
private boolean isRecycleModel;
|
||||
|
||||
/**
|
||||
* 操作人
|
||||
*/
|
||||
private Long operator;
|
||||
/**
|
||||
* 更新时是否覆盖特殊角色
|
||||
* 这些角色id是在nacos上的配置,在cms的单位管理-通讯录不会回显该角色
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package cn.axzo.tyr.client.model.vo;
|
||||
|
||||
import cn.axzo.framework.auth.domain.ContextInfo;
|
||||
import cn.axzo.framework.auth.domain.ContextInfoHolder;
|
||||
import cn.axzo.framework.auth.domain.UserInfo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Data
|
||||
public class Operator {
|
||||
|
||||
private String realName;
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* For a gateway like yoke
|
||||
*/
|
||||
public static Operator fromAuthContext() {
|
||||
ContextInfo ctx = ContextInfoHolder.get();
|
||||
if (ctx == null) {
|
||||
return absent();
|
||||
}
|
||||
UserInfo userInfo = ctx.getUserInfo();
|
||||
if (userInfo == null) {
|
||||
return absent();
|
||||
}
|
||||
Operator operator = new Operator();
|
||||
operator.setRealName(userInfo.getRealName());
|
||||
operator.setPersonId(userInfo.getPersonId());
|
||||
return operator;
|
||||
}
|
||||
|
||||
public static Operator absent() {
|
||||
Operator operator = new Operator();
|
||||
operator.setRealName("");
|
||||
operator.setPersonId(0L);
|
||||
return operator;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.tyr.client.model.vo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class OperatorRequest {
|
||||
|
||||
private Operator operator;
|
||||
|
||||
public Operator determineOperator() {
|
||||
return operator == null ? Operator.absent() : operator;
|
||||
}
|
||||
}
|
||||
@ -70,4 +70,10 @@ public class SaasRoleGroupVO {
|
||||
* 上级分组id
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
private Operator operator;
|
||||
|
||||
public Operator determineOperator() {
|
||||
return operator == null ? Operator.absent() : operator;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class SaveOrUpdatePermissionGroupVO {
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 已选择的项目部
|
||||
* 已选择的项目
|
||||
*/
|
||||
@Valid
|
||||
private List<PermissionGroupScopeVO> selectedWorkspace;
|
||||
|
||||
@ -99,7 +99,7 @@ public class SaveOrUpdateRoleVO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目部类型字典code
|
||||
* 项目类型字典code
|
||||
*/
|
||||
private String workspaceTypeCode;
|
||||
}
|
||||
|
||||
@ -103,8 +103,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.pokonyan</groupId>
|
||||
<artifactId>pokonyan</artifactId>
|
||||
<groupId>cn.axzo.foundation</groupId>
|
||||
<artifactId>dao-support-lib</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -122,6 +123,21 @@
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.foundation</groupId>
|
||||
<artifactId>common-lib</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.axzo.basics</groupId>
|
||||
<artifactId>basics-profiles-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.axzo.platform</groupId>
|
||||
<artifactId>apisix-plat-api</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package cn.axzo.tyr.server;
|
||||
|
||||
import cn.axzo.pokonyan.config.mybatisplus.EntityMetaObjectHandler;
|
||||
import cn.axzo.tyr.server.config.RocketMQEventConfiguration;
|
||||
import cn.axzo.tyr.server.job.CMSRoleJobHandler;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -20,6 +21,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableDiscoveryClient
|
||||
@MapperScan(value = {"cn.axzo.tyr.server.repository.mapper"})
|
||||
@SpringBootApplication(scanBasePackages = "cn.axzo")
|
||||
@Import(RocketMQEventConfiguration.class)
|
||||
public class TyrApplication {
|
||||
public static void main(String[] args) {
|
||||
ConfigurableApplicationContext run = SpringApplication.run(TyrApplication.class, args);
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package cn.axzo.tyr.server;
|
||||
|
||||
import cn.axzo.tyr.server.config.RocketMQEventConfiguration;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@ -15,6 +17,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableFeignClients(basePackages = {"cn.axzo"})
|
||||
@Log4j2
|
||||
@EnableAsync
|
||||
@Import(RocketMQEventConfiguration.class)
|
||||
public class TyrServerDevApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package cn.axzo.tyr.server;
|
||||
|
||||
import cn.axzo.tyr.server.config.RocketMQEventConfiguration;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@ -16,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableFeignClients(basePackages = {"cn.axzo"})
|
||||
@Log4j2
|
||||
@EnableAsync
|
||||
@Import(RocketMQEventConfiguration.class)
|
||||
public class TyrServerPreApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
@ -28,6 +31,8 @@ public class TyrServerPreApplication {
|
||||
System.setProperty("spring.redis.port", "6379");
|
||||
System.setProperty("spring.redis.host", "172.16.1.76");
|
||||
|
||||
System.setProperty("rocketmq.name-server", "172.16.2.82:9876");
|
||||
|
||||
SpringApplication application = new SpringApplication(TyrServerPreApplication.class);
|
||||
ApplicationContext applicationContext = application.run(args);
|
||||
Environment env = applicationContext.getEnvironment();
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package cn.axzo.tyr.server;
|
||||
|
||||
import cn.axzo.tyr.server.config.RocketMQEventConfiguration;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@ -16,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@EnableFeignClients(basePackages = {"cn.axzo"})
|
||||
@Log4j2
|
||||
@EnableAsync
|
||||
@Import(RocketMQEventConfiguration.class)
|
||||
public class TyrServerTestApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
package cn.axzo.tyr.server.config;
|
||||
|
||||
import cn.axzo.framework.auth.config.FeignContextInfoInterceptor;
|
||||
import cn.axzo.framework.auth.domain.*;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author chenwenjian
|
||||
* @version 1.0
|
||||
* @date 2024/6/19 12:44
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ContextInfoFillInterceptor implements HandlerInterceptor {
|
||||
@Override
|
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
|
||||
HandlerInterceptor.super.postHandle(request, response, handler, modelAndView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
|
||||
ContextInfoHolder.clear();
|
||||
HandlerInterceptor.super.afterCompletion(request, response, handler, ex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
String lite = request.getHeader(FeignContextInfoInterceptor.LITE);
|
||||
if (StrUtil.isNotBlank(lite)) {
|
||||
try {
|
||||
ContextInfo.LiteSaasContext liteSaasContext = JSONUtil.toBean(lite, ContextInfo.LiteSaasContext.class);
|
||||
String serverName = request.getHeader(FeignContextInfoInterceptor.SERVICE_NAME);
|
||||
if (Objects.nonNull(liteSaasContext)) {
|
||||
ContextInfo contextInfo = new ContextInfo();
|
||||
contextInfo.setWorkspaceId(liteSaasContext.getWorkspaceId());
|
||||
contextInfo.setWorkspaceType(liteSaasContext.getWorkspaceType());
|
||||
contextInfo.setOuId(liteSaasContext.getOuId());
|
||||
contextInfo.setOuType(liteSaasContext.getOuType());
|
||||
contextInfo.setSaasTenantId(liteSaasContext.getSaasTennantId());
|
||||
|
||||
UserInfo userInfo = new UserInfo();
|
||||
userInfo.setIdentityId(liteSaasContext.getIdentityId());
|
||||
userInfo.setIdentityType(liteSaasContext.getIdentityType());
|
||||
userInfo.setPersonId(liteSaasContext.getPersonId());
|
||||
userInfo.setAcntId(liteSaasContext.getAcntId());
|
||||
userInfo.setRealName(liteSaasContext.getRealName());
|
||||
contextInfo.setUserInfo(userInfo);
|
||||
|
||||
TerminalInfo terminalInfo = new TerminalInfo(liteSaasContext.getTerminal());
|
||||
contextInfo.setTerminalInfo(terminalInfo);
|
||||
|
||||
SystemAndDeviceInfo systemAndDeviceInfo = new SystemAndDeviceInfo();
|
||||
systemAndDeviceInfo.setIpAddress(liteSaasContext.getIpAddress());
|
||||
contextInfo.setSystemAndDeviceInfo(systemAndDeviceInfo);
|
||||
|
||||
ContextInfoHolder.set(contextInfo);
|
||||
log.info("ContextInfo parsing success! server: {}, contextInfo: {}", StrUtil.isNotBlank(serverName) ? serverName : "unknown", lite);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("ContextInfo parsing failure! {}", e.getMessage());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
log.warn("Can not get LiteSaasContext!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user