feat(REQ-2186): 产品功能管理表增加类型字段,兼容老产品
This commit is contained in:
parent
f178ea55a5
commit
460cc7734c
@ -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;
|
||||
}
|
||||
}
|
||||
@ -42,6 +42,11 @@ public class SaasProductModuleFeatureRelation extends BaseEntity<SaasProductModu
|
||||
*/
|
||||
private Long featureId;
|
||||
|
||||
/**
|
||||
* 关联类型(0:saas_feature,1:saas_feature_resource)
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
|
||||
@ -7,6 +7,7 @@ import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
|
||||
import cn.axzo.thrones.client.saas.ServicePkgClient;
|
||||
import cn.axzo.thrones.client.saas.entity.serivicepgkproduct.ServicePkgProduct;
|
||||
import cn.axzo.thrones.client.saas.entity.servicepkg.ServicePkgDetailRes;
|
||||
import cn.axzo.tyr.client.common.enums.ProductModuleFeatureRelationTypeEnum;
|
||||
import cn.axzo.tyr.client.model.permission.PermissionPointTreeNode;
|
||||
import cn.axzo.tyr.client.model.product.ProductFeatureRelationSearchReq;
|
||||
import cn.axzo.tyr.client.model.product.ProductFeatureRelationUpdateReq;
|
||||
@ -90,6 +91,7 @@ public class ProductFeatureRelationServiceImpl implements ProductFeatureRelation
|
||||
relation.setDictCodeId(i.getDictCodeId());
|
||||
relation.setDictCode(i.getDictCode());
|
||||
relation.setFeatureId(featureId);
|
||||
relation.setType(ProductModuleFeatureRelationTypeEnum.FEATURE_RESOURCE.getCode());
|
||||
saveList.add(relation);
|
||||
}));
|
||||
saasProductModuleFeatureRelationDao.saveBatch(saveList);
|
||||
|
||||
@ -347,7 +347,6 @@ public class ProductServiceImpl implements ProductService {
|
||||
req.setDictCodeId(dictWorkspaceTypeId);
|
||||
req.setDictCode(dictWorkspaceTypeCode);
|
||||
req.setProductModuleId(productId);
|
||||
req.setProductModuleId(productId);
|
||||
Set<Long> featureIds = org.apache.commons.collections.CollectionUtils.isEmpty(saasFeatureResources) ? Sets.newHashSet()
|
||||
: saasFeatureResources.stream().map(BaseEntity::getId).collect(Collectors.toSet());
|
||||
featureIds.add(saasFeatureResource.getId());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user