feat:(REQ-2545) 修改删除资源的逻辑
This commit is contained in:
parent
0d46b1b1eb
commit
8e85410f05
@ -45,7 +45,7 @@ public interface FeatureResourceApi {
|
||||
|
||||
/** 删除菜单/页面/组件 **/
|
||||
@PostMapping("/api/featureResource/delete")
|
||||
ApiResult<Void> deleteFeatureResource(@Validated @RequestParam DeleteFeatureResourceReq req);
|
||||
ApiResult<Void> deleteFeatureResource(@Validated @RequestBody DeleteFeatureResourceReq req);
|
||||
|
||||
|
||||
/** 重排序菜单/页面/组件 **/
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package cn.axzo.tyr.server.service.impl;
|
||||
|
||||
import cn.axzo.basics.common.BeanMapper;
|
||||
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
|
||||
import cn.axzo.basics.common.util.StopWatchUtil;
|
||||
import cn.axzo.basics.common.util.TreeUtil;
|
||||
import cn.axzo.foundation.dao.support.converter.PageConverter;
|
||||
@ -596,14 +595,8 @@ public class SaasFeatureResourceServiceImpl extends ServiceImpl<SaasFeatureResou
|
||||
.build());
|
||||
|
||||
// 删除自己及自己的子集
|
||||
this.updateBatchById(deleteFeatureResource.stream()
|
||||
.map(e -> {
|
||||
SaasFeatureResource saasFeatureResource = new SaasFeatureResource();
|
||||
saasFeatureResource.setId(e.getId());
|
||||
saasFeatureResource.setUpdateBy(param.getOperatorId());
|
||||
saasFeatureResource.setIsDelete(TableIsDeleteEnum.DELETE.value);
|
||||
return saasFeatureResource;
|
||||
})
|
||||
this.removeByIds(deleteFeatureResource.stream()
|
||||
.map(SaasFeatureResourceResp::getId)
|
||||
.collect(Collectors.toList()));
|
||||
|
||||
deletePermissionRelations(deleteFeatureResource);
|
||||
|
||||
@ -252,4 +252,7 @@ CREATE TABLE `saas_pgroup_role_relation` (
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_pgroup_relation_role_id` (`role_id`,`is_delete`) USING BTREE,
|
||||
KEY `idx_group_relation_group_id` (`group_id`,`is_delete`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5794664 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色权限集中间表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5794664 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色权限集中间表';
|
||||
|
||||
alter table saas_feature_resource add index `idx_feature_resource_uni_code` (`uni_code`);
|
||||
alter table saas_feature_resource add index `idx_feature_resource_path` (`path`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user