diff --git a/src/main/java/neatlogic/module/process/api/catalog/CalalogBreadcrumbSearchApi.java b/src/main/java/neatlogic/module/process/api/catalog/CalalogBreadcrumbSearchApi.java index ad6e1efdd7efc268a500ac0745521e36ad38cacc..61a3f00728601df12cedc14d30081cf9675d4a49 100644 --- a/src/main/java/neatlogic/module/process/api/catalog/CalalogBreadcrumbSearchApi.java +++ b/src/main/java/neatlogic/module/process/api/catalog/CalalogBreadcrumbSearchApi.java @@ -85,7 +85,7 @@ public class CalalogBreadcrumbSearchApi extends PrivateApiComponentBase { JSONObject resultObj = new JSONObject(); resultObj.put("breadcrumbList", new ArrayList<>()); //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if (CollectionUtils.isEmpty(currentUserAuthorizedChannelUuidList)) { return resultObj; } diff --git a/src/main/java/neatlogic/module/process/api/catalog/CatalogTreeSearchApi.java b/src/main/java/neatlogic/module/process/api/catalog/CatalogTreeSearchApi.java index 0d59049416dbc344400035957c07c8548b065ec6..98c4614bdc15ed22d833131d1b83e71f94d42d1b 100755 --- a/src/main/java/neatlogic/module/process/api/catalog/CatalogTreeSearchApi.java +++ b/src/main/java/neatlogic/module/process/api/catalog/CatalogTreeSearchApi.java @@ -74,7 +74,7 @@ public class CatalogTreeSearchApi extends PrivateApiComponentBase { return new ArrayList<>(); } //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if(CollectionUtils.isEmpty(currentUserAuthorizedChannelUuidList)) { return new ArrayList<>(); } diff --git a/src/main/java/neatlogic/module/process/api/catalog/relation/CalalogBreadcrumbApi.java b/src/main/java/neatlogic/module/process/api/catalog/relation/CalalogBreadcrumbApi.java index f3847532681779d34f0d1de94cc66e3d41157e1d..ac3cadc6c498336022f1adbebe5a9e961d8e8664 100755 --- a/src/main/java/neatlogic/module/process/api/catalog/relation/CalalogBreadcrumbApi.java +++ b/src/main/java/neatlogic/module/process/api/catalog/relation/CalalogBreadcrumbApi.java @@ -108,7 +108,7 @@ public class CalalogBreadcrumbApi extends PrivateApiComponentBase { } AuthenticationInfoVo authenticationInfoVo = UserContext.get().getAuthenticationInfoVo(); //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); /** 2021-10-11 开晚会时确认用户个人设置任务授权不包括服务上报权限 **/ // String agentUuid = userMapper.getUserUuidByAgentUuidAndFunc(UserContext.get().getUserUuid(true), "processtask"); // if(StringUtils.isNotBlank(agentUuid)){ diff --git a/src/main/java/neatlogic/module/process/api/catalog/relation/CatalogTreeApi.java b/src/main/java/neatlogic/module/process/api/catalog/relation/CatalogTreeApi.java index 8bff3e8e7b81792a14be7b654d1e659c7c7404a1..a413e95dcea25f47a1503c2236a4f5828e93dfe5 100755 --- a/src/main/java/neatlogic/module/process/api/catalog/relation/CatalogTreeApi.java +++ b/src/main/java/neatlogic/module/process/api/catalog/relation/CatalogTreeApi.java @@ -102,7 +102,7 @@ public class CatalogTreeApi extends PrivateApiComponentBase { // } if(CollectionUtils.isNotEmpty(currentUserAuthorizedCatalogUuidList)) { //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); /** 2021-10-11 开晚会时确认用户个人设置任务授权不包括服务上报权限 **/ // if(StringUtils.isNotBlank(agentUuid)){ // AuthenticationInfoVo agentAuthenticationInfoVo = authenticationInfoService.getAuthenticationInfo(agentUuid); diff --git a/src/main/java/neatlogic/module/process/api/channel/ChannelGetApi.java b/src/main/java/neatlogic/module/process/api/channel/ChannelGetApi.java index 3122c595a9ab7e4cdddc7bebd95f1820fd0eae71..e9b73f039f48f2bdcb769fa741d678f79f22d904 100644 --- a/src/main/java/neatlogic/module/process/api/channel/ChannelGetApi.java +++ b/src/main/java/neatlogic/module/process/api/channel/ChannelGetApi.java @@ -5,6 +5,7 @@ import neatlogic.framework.auth.core.AuthAction; import neatlogic.framework.common.constvalue.ApiParamType; import neatlogic.framework.dto.AuthorityVo; import neatlogic.framework.process.auth.PROCESS_BASE; +import neatlogic.framework.process.constvalue.CatalogChannelAuthorityAction; import neatlogic.module.process.dao.mapper.catalog.ChannelMapper; import neatlogic.framework.process.dto.ChannelPriorityVo; import neatlogic.framework.process.dto.ChannelVo; @@ -18,6 +19,8 @@ import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; @Service @AuthAction(action = PROCESS_BASE.class) @@ -71,7 +74,10 @@ public class ChannelGetApi extends PrivateApiComponentBase { } channel.setPriorityUuidList(priorityUuidList); List authorityVoList = channelMapper.getChannelAuthorityListByChannelUuid(uuid); - channel.setAuthorityVoList(authorityVoList); + List viewAuthorityVoList = authorityVoList.stream().filter(e -> Objects.equals(e.getAction(), CatalogChannelAuthorityAction.VIEW.getValue())).collect(Collectors.toList()); + channel.setViewAuthorityList(AuthorityVo.getAuthorityList(viewAuthorityVoList)); + List reportAuthorityVoList = authorityVoList.stream().filter(e -> Objects.equals(e.getAction(), CatalogChannelAuthorityAction.REPORT.getValue())).collect(Collectors.toList()); + channel.setReportAuthorityList(AuthorityVo.getAuthorityList(reportAuthorityVoList)); if(channelMapper.checkChannelIsFavorite(UserContext.get().getUserUuid(true), uuid) == 0) { channel.setIsFavorite(0); }else { diff --git a/src/main/java/neatlogic/module/process/api/channel/ChannelSaveApi.java b/src/main/java/neatlogic/module/process/api/channel/ChannelSaveApi.java index 51b83b38a8343ffc4b58262f299b909ce8317784..cb3e46fa8bc4afd6f91cae492f7726699722a219 100644 --- a/src/main/java/neatlogic/module/process/api/channel/ChannelSaveApi.java +++ b/src/main/java/neatlogic/module/process/api/channel/ChannelSaveApi.java @@ -78,7 +78,8 @@ public class ChannelSaveApi extends PrivateApiComponentBase { @Param(name = "isNeedPriority", type = ApiParamType.INTEGER, isRequired = true, desc = "common.isneedpriority"), @Param(name = "defaultPriorityUuid", type = ApiParamType.STRING, desc = "common.defaultpriorityuuid"), @Param(name = "priorityUuidList", type = ApiParamType.JSONARRAY, desc = "nmrap.updateprioritysortapi.input.param.desc.prioritylist"), - @Param(name = "authorityList", type = ApiParamType.JSONARRAY, desc = "common.authoritylist", help = "可多选,格式[\"user#userUuid\",\"team#teamUuid\",\"role#roleUuid\"]"), + @Param(name = "reportAuthorityList", type = ApiParamType.JSONARRAY, desc = "common.reportauthoritylist", help = "可多选,格式[\"user#userUuid\",\"team#teamUuid\",\"role#roleUuid\"]"), + @Param(name = "viewAuthorityList", type = ApiParamType.JSONARRAY, desc = "common.viewauthoritylist", help = "可多选,格式[\"user#userUuid\",\"team#teamUuid\",\"role#roleUuid\"]"), @Param(name = "channelTypeUuid", type = ApiParamType.STRING, isRequired = true, desc = "term.itsm.channeltypeuuid"), @Param(name = "config", type = ApiParamType.JSONOBJECT, desc = "common.config") }) @@ -88,7 +89,7 @@ public class ChannelSaveApi extends PrivateApiComponentBase { @Description(desc = "nmpac.channelsaveapi.getname") @Override public Object myDoService(JSONObject jsonObj) throws Exception { - ChannelVo channelVo = JSON.toJavaObject(jsonObj, ChannelVo.class); + ChannelVo channelVo = jsonObj.toJavaObject(ChannelVo.class); return channelService.saveChannel(channelVo); } diff --git a/src/main/java/neatlogic/module/process/api/channel/ChannelSearchApi.java b/src/main/java/neatlogic/module/process/api/channel/ChannelSearchApi.java index 2d53adff1ddc161e36efa0298f7408e1fb1ae449..e4b0d8c830cd15ee93bff7c2273c2f801256d514 100755 --- a/src/main/java/neatlogic/module/process/api/channel/ChannelSearchApi.java +++ b/src/main/java/neatlogic/module/process/api/channel/ChannelSearchApi.java @@ -7,6 +7,7 @@ import neatlogic.framework.auth.core.AuthAction; import neatlogic.framework.common.dto.BasePageVo; import neatlogic.framework.dto.AuthenticationInfoVo; import neatlogic.framework.process.auth.PROCESS_BASE; +import neatlogic.framework.process.constvalue.CatalogChannelAuthorityAction; import neatlogic.module.process.dao.mapper.catalog.ChannelTypeMapper; import neatlogic.framework.restful.constvalue.OperationTypeEnum; import neatlogic.framework.restful.annotation.*; @@ -92,7 +93,7 @@ public class ChannelSearchApi extends PrivateApiComponentBase { Integer isAuthenticate = jsonObj.getInteger("isAuthenticate"); if(Objects.equal(isAuthenticate, 1)) { AuthenticationInfoVo authenticationInfoVo = UserContext.get().getAuthenticationInfoVo(); - List authorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List authorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if(CollectionUtils.isNotEmpty(authorizedChannelUuidList)) { String channelUuid = jsonObj.getString("channelUuid"); if(StringUtils.isNotBlank(channelUuid) && channelMapper.checkChannelIsExists(channelUuid) == 0) { diff --git a/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.java b/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.java index 48281ae044e4ea7f4801a2c6b84bec5731f4f66b..06563bddd454d70e0a35800059dae26dcfe98182 100644 --- a/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.java +++ b/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.java @@ -66,11 +66,15 @@ public interface ChannelMapper extends IChannelCrossoverMapper { List getChannelAuthorityListByChannelUuid(String uuid); List getAuthorizedChannelUuidList(@Param("userUuid") String userUuid, - @Param("teamUuidList") List teamUuidList, @Param("roleUuidList") List roleUuidList, - @Param("channelUuid") String channelUuid); + @Param("teamUuidList") List teamUuidList, + @Param("roleUuidList") List roleUuidList, + @Param("action") String action, + @Param("channelUuid") String channelUuid); List getActiveAuthorizedChannelUuidList(@Param("userUuid") String userUuid, - @Param("teamUuidList") List teamUuidList, @Param("roleUuidList") List roleUuidList, + @Param("teamUuidList") List teamUuidList, + @Param("roleUuidList") List roleUuidList, + @Param("action") String action, @Param("channelUuid") String channelUuid); List getAuthorizedChannelListByParentUuid(@Param("userUuid") String userUuid, diff --git a/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.xml b/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.xml index 031964def1ada67a00f4163bf73181d0d138472f..ea5e6a06153b176bc19ee3766f8d49677ccdd952 100644 --- a/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.xml +++ b/src/main/java/neatlogic/module/process/dao/mapper/catalog/ChannelMapper.xml @@ -391,7 +391,8 @@ resultType="neatlogic.framework.dto.AuthorityVo" useCache="false"> SELECT `channel_uuid` AS channelUuid, `type`, - `uuid` + `uuid`, + `action` FROM `channel_authority` WHERE `channel_uuid` = #{channelUuid} @@ -402,8 +403,12 @@ FROM `channel_authority` - `channel_uuid` = #{channelUuid} AND ( + AND `channel_uuid` = #{channelUuid} + + + AND `action` = #{action} + AND ( (type = 'common' AND `uuid` = 'alluser') OR (type = 'user' AND `uuid` = #{userUuid}) @@ -422,9 +427,7 @@ ) - - ) - + ) @@ -432,11 +435,15 @@ SELECT DISTINCT a.`channel_uuid` FROM `channel_authority` a - JOIN `channel` b ON b.`uuid` = a.`channel_uuid` AND b.`is_active` = 1 + JOIN `channel` b ON b.`uuid` = a.`channel_uuid`AND b.`is_active` = 1 - a.`channel_uuid` = #{channelUuid} AND ( + AND a.`channel_uuid` = #{channelUuid} + + AND a.`action` = #{action} + + AND ( (type = 'common' AND a.`uuid` = 'alluser') OR (type = 'user' AND a.`uuid` = #{userUuid}) @@ -455,9 +462,7 @@ ) - - ) - + ) @@ -481,6 +486,7 @@ LEFT JOIN `channel_user` cu ON cu.`channel_uuid` = c.`uuid` c.`is_active` =1 + and ca.`action` = 'report' and ((ca.type = 'common' AND ca.`uuid` = 'alluser') @@ -726,10 +732,12 @@ INSERT INTO `channel_authority` (`channel_uuid`, `type`, - `uuid`) + `uuid`, + `action`) VALUES (#{channelUuid}, #{authorityVo.type}, - #{authorityVo.uuid}) + #{authorityVo.uuid}, + #{authorityVo.action}) diff --git a/src/main/java/neatlogic/module/process/service/CatalogServiceImpl.java b/src/main/java/neatlogic/module/process/service/CatalogServiceImpl.java index f48f20a55bd43c49206c382421b879905cce8750..5ba0a66d4c9aef38b723f6435b69994d244d363d 100644 --- a/src/main/java/neatlogic/module/process/service/CatalogServiceImpl.java +++ b/src/main/java/neatlogic/module/process/service/CatalogServiceImpl.java @@ -67,7 +67,7 @@ public class CatalogServiceImpl implements CatalogService, ICatalogCrossoverServ List currentUserAuthorizedCatalogUuidList = catalogMapper.getAuthorizedCatalogUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if (CollectionUtils.isNotEmpty(currentUserAuthorizedCatalogUuidList)) { /* 查出当前用户所有已授权的服务uuid集合 **/ - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if (CollectionUtils.isNotEmpty(currentUserAuthorizedChannelUuidList)) { Map uuidKeyMap = new HashMap<>(); //构造一个虚拟的root节点 @@ -114,9 +114,18 @@ public class CatalogServiceImpl implements CatalogService, ICatalogCrossoverServ @Override public boolean channelIsAuthority(String channelUuid, String userUuid, CatalogChannelAuthorityAction action) { + Integer isActive = null; + if (action == CatalogChannelAuthorityAction.REPORT) { + isActive = 1; + } AuthenticationInfoVo authenticationInfoVo = authenticationInfoService.getAuthenticationInfo(userUuid); /* 查出当前用户所有已授权的服务uuid集合 **/ - List channelUuidList = channelMapper.getActiveAuthorizedChannelUuidList(userUuid, authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), channelUuid); + List channelUuidList = null; + if (action == CatalogChannelAuthorityAction.REPORT) { + channelUuidList = channelMapper.getActiveAuthorizedChannelUuidList(userUuid, authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), action.getValue(), channelUuid); + } else { + channelUuidList = channelMapper.getAuthorizedChannelUuidList(userUuid, authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), action.getValue(), channelUuid); + } /* 服务已授权 **/ if (channelUuidList.contains(channelUuid)) { ChannelVo channel = channelMapper.getChannelByUuid(channelUuid); @@ -127,10 +136,6 @@ public class CatalogServiceImpl implements CatalogService, ICatalogCrossoverServ if (catalogVo == null) { return false; } - Integer isActive = null; - if (action == CatalogChannelAuthorityAction.REPORT) { - isActive = 1; - } List catalogUuidList = new ArrayList<>(); List ancestorsAndSelfList = catalogMapper.getAncestorsAndSelfByLftRht(catalogVo.getLft(), catalogVo.getRht()); for (CatalogVo catalog : ancestorsAndSelfList) { @@ -154,7 +159,7 @@ public class CatalogServiceImpl implements CatalogService, ICatalogCrossoverServ List cataLogVoList = new ArrayList<>(); AuthenticationInfoVo authenticationInfoVo = UserContext.get().getAuthenticationInfoVo(); //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if (CollectionUtils.isEmpty(currentUserAuthorizedChannelUuidList)) { return cataLogVoList; } @@ -193,7 +198,7 @@ public class CatalogServiceImpl implements CatalogService, ICatalogCrossoverServ JSONObject catalogParentJson = new JSONObject(); AuthenticationInfoVo authenticationInfoVo = UserContext.get().getAuthenticationInfoVo(); //已授权的服务uuid - List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), null); + List currentUserAuthorizedChannelUuidList = channelMapper.getAuthorizedChannelUuidList(UserContext.get().getUserUuid(true), authenticationInfoVo.getTeamUuidList(), authenticationInfoVo.getRoleUuidList(), CatalogChannelAuthorityAction.REPORT.getValue(), null); if (CollectionUtils.isEmpty(currentUserAuthorizedChannelUuidList)) { return catalogParentJson; } diff --git a/src/main/java/neatlogic/module/process/service/ChannelServiceImpl.java b/src/main/java/neatlogic/module/process/service/ChannelServiceImpl.java index f7ad7816d2cd35d99b11b6bf0a31a9cc588063a8..56cede69a0545bdd505e2009aa50fb23814c2bc4 100644 --- a/src/main/java/neatlogic/module/process/service/ChannelServiceImpl.java +++ b/src/main/java/neatlogic/module/process/service/ChannelServiceImpl.java @@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import neatlogic.framework.crossover.CrossoverServiceFactory; import neatlogic.framework.dto.AuthorityVo; +import neatlogic.framework.process.constvalue.CatalogChannelAuthorityAction; import neatlogic.framework.process.crossover.IProcessCrossoverMapper; import neatlogic.framework.process.dto.CatalogVo; import neatlogic.framework.process.dto.ChannelPriorityVo; @@ -117,12 +118,22 @@ public class ChannelServiceImpl implements ChannelService { channelMapper.insertChannelPriority(channelPriority); } } - List authorityList = channelVo.getAuthorityVoList(); - if (CollectionUtils.isNotEmpty(authorityList)) { - for (AuthorityVo authorityVo : authorityList) { + + List reportAuthorityList = channelVo.getReportAuthorityList(); + if (CollectionUtils.isNotEmpty(reportAuthorityList)) { + List authorityVoList = AuthorityVo.getAuthorityVoList(reportAuthorityList, CatalogChannelAuthorityAction.REPORT.getValue()); + for(AuthorityVo authorityVo : authorityVoList) { channelMapper.insertChannelAuthority(authorityVo, channelVo.getUuid()); } } + List viewAuthorityList = channelVo.getViewAuthorityList(); + if (CollectionUtils.isNotEmpty(viewAuthorityList)) { + List viewAuthorityVoList = AuthorityVo.getAuthorityVoList(viewAuthorityList, CatalogChannelAuthorityAction.VIEW.getValue()); + for(AuthorityVo authorityVo : viewAuthorityVoList) { + channelMapper.insertChannelAuthority(authorityVo, channelVo.getUuid()); + } + } + /* 转报设置逻辑,允许转报后,转报设置必填 **/ channelMapper.deleteChannelRelationBySource(channelVo.getUuid()); channelMapper.deleteChannelRelationAuthorityBySource(channelVo.getUuid()); diff --git a/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/neatlogic_tenant.sql b/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/neatlogic_tenant.sql new file mode 100644 index 0000000000000000000000000000000000000000..8ead1d6c05f001ffd82b4d1304abb8c238b8ddef --- /dev/null +++ b/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/neatlogic_tenant.sql @@ -0,0 +1,4 @@ +ALTER TABLE `channel_authority` + ADD COLUMN `action` ENUM('report','view') NOT NULL COMMENT '授权类型' AFTER `uuid`, + DROP PRIMARY KEY, + ADD PRIMARY KEY (`channel_uuid`, `type`, `uuid`, `action`); \ No newline at end of file diff --git a/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/version.json b/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/version.json new file mode 100644 index 0000000000000000000000000000000000000000..4f1a59f3552a5361d2fbb2f16334bca13bcef3ad --- /dev/null +++ b/src/main/resources/neatlogic/resources/process/changelog/2024-07-19/version.json @@ -0,0 +1,10 @@ +{ + "content":[ + { + "type":"新增功能", + "detail":[ + {"msg":"1.工单查看权限-服务通道"} + ] + } + ] +} diff --git a/src/main/resources/neatlogic/resources/process/sqlscript/ddl.sql b/src/main/resources/neatlogic/resources/process/sqlscript/ddl.sql index d045a8c1272758f504e817ef102cd75165bbf3f6..412ea190357b69c6c431a7f8a9d4665cba0c4857 100644 --- a/src/main/resources/neatlogic/resources/process/sqlscript/ddl.sql +++ b/src/main/resources/neatlogic/resources/process/sqlscript/ddl.sql @@ -58,7 +58,8 @@ CREATE TABLE IF NOT EXISTS `channel_authority` ( `channel_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '服务uuid', `type` enum('common','user','team','role') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型', `uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'uuid', - PRIMARY KEY (`channel_uuid`, `type`, `uuid`) USING BTREE, + `action` enum('report','view') COLLATE utf8mb4_general_ci NOT NULL COMMENT '授权类型', + PRIMARY KEY (`channel_uuid`, `type`, `uuid`, `action`) USING BTREE, INDEX `idx_channel_uuid`(`channel_uuid`) USING BTREE, INDEX `idx_uuid`(`uuid`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务授权表';