Merge remote-tracking branch 'origin/feature/REQ-2046' into feature/REQ-2046
This commit is contained in:
commit
963c99ca4e
@ -31,6 +31,10 @@ public class ListPermissionFromRoleGroupResp {
|
||||
*/
|
||||
private Long teamOuId;
|
||||
|
||||
private Long resourceId;
|
||||
|
||||
private Integer resourceType;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
|
||||
@ -25,5 +25,13 @@ public class SaasProductModuleFeatureRelationDao extends ServiceImpl<SaasProduct
|
||||
this.remove(new LambdaQueryWrapper<SaasProductModuleFeatureRelation>()
|
||||
.in(SaasProductModuleFeatureRelation::getFeatureId, permissionPointIds));
|
||||
}
|
||||
|
||||
public void removeByProductId(List<Long> productId) {
|
||||
if (CollectionUtil.isEmpty(productId)) {
|
||||
return;
|
||||
}
|
||||
this.remove(new LambdaQueryWrapper<SaasProductModuleFeatureRelation>()
|
||||
.in(SaasProductModuleFeatureRelation::getProductModuleId, productId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,4 +35,6 @@ public interface ProductFeatureRelationService {
|
||||
|
||||
/** 数据清洗 **/
|
||||
boolean refreshFeature(Integer workspaceType, Long productId);
|
||||
|
||||
void removeByProductId(Long productId);
|
||||
}
|
||||
|
||||
@ -218,4 +218,8 @@ public class ProductFeatureRelationServiceImpl implements ProductFeatureRelation
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void removeByProductId(Long productId) {
|
||||
saasProductModuleFeatureRelationDao.removeByProductId(Collections.singletonList(productId));
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import cn.axzo.tyr.client.model.product.ProductUpdateReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductVO;
|
||||
import cn.axzo.tyr.server.repository.entity.ProductModule;
|
||||
import cn.axzo.tyr.server.repository.dao.ProductModuleDao;
|
||||
import cn.axzo.tyr.server.service.ProductFeatureRelationService;
|
||||
import cn.axzo.tyr.server.service.ProductService;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -38,6 +39,7 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class ProductServiceImpl implements ProductService {
|
||||
private final ProductModuleDao productModuleDao;
|
||||
private final ProductFeatureRelationService productFeatureRelationService;
|
||||
|
||||
@Override
|
||||
public ApiResult<List<ProductVO>> list(ProductSearchListReq req) {
|
||||
@ -130,6 +132,9 @@ public class ProductServiceImpl implements ProductService {
|
||||
.eq(ProductModule::getId, id)
|
||||
.set(ProductModule::getIsDelete, id)
|
||||
.update();
|
||||
|
||||
// 删除产品与权限点对应关系
|
||||
productFeatureRelationService.removeByProductId(id);
|
||||
return ApiResult.ok(BeanMapper.copyBean(productModule, ProductVO.class));
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,6 +111,7 @@
|
||||
t5.ou_id ouId,
|
||||
t5.workspace_Id workspaceId,
|
||||
t5.resource_id teamOuId,
|
||||
t5.resource_id resourceId,
|
||||
t5.resource_type resourceType,
|
||||
t1.category_code categoryCode,
|
||||
t1.name roleGroupName,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user