feat(REQ-2186): 新增产品增加参数校验调整
This commit is contained in:
parent
07341fa0db
commit
ca5f15552d
@ -287,13 +287,13 @@ public class ProductServiceImpl implements ProductService {
|
||||
ProductModuleCategoryEnum productModuleCategoryEnum = ProductModuleCategoryEnum.getByCode(req.getProductCategory());
|
||||
AssertUtil.notNull(productModuleCategoryEnum, "产品类型有误");
|
||||
|
||||
if (WorkspaceTypeCodeEnum.GENERAL_ENT.equals(workspaceTypeCodeEnum) || WorkspaceTypeCodeEnum.GENERAL_PROJECT.equals(workspaceTypeCodeEnum)) {
|
||||
AssertUtil.notNull(req.getMaxPersonCount(), "人数上限不能为空");
|
||||
AssertUtil.notNull(req.getPrice(), "价格不能为空");
|
||||
if (ProductModuleCategoryEnum.PRODUCT_VERSION.getCode().equals(req.getProductCategory())) {
|
||||
AssertUtil.notNull(req.getVersion(), "版本升级序列不能为空");
|
||||
}
|
||||
}
|
||||
// if (WorkspaceTypeCodeEnum.GENERAL_ENT.equals(workspaceTypeCodeEnum) || WorkspaceTypeCodeEnum.GENERAL_PROJECT.equals(workspaceTypeCodeEnum)) {
|
||||
// AssertUtil.notNull(req.getMaxPersonCount(), "人数上限不能为空");
|
||||
// AssertUtil.notNull(req.getPrice(), "价格不能为空");
|
||||
// if (ProductModuleCategoryEnum.PRODUCT_VERSION.getCode().equals(req.getProductCategory())) {
|
||||
// AssertUtil.notNull(req.getVersion(), "版本升级序列不能为空");
|
||||
// }
|
||||
// }
|
||||
if (WorkspaceTypeCodeEnum.GOVERNMENT.equals(workspaceTypeCodeEnum)) {
|
||||
AssertUtil.isTrue(Objects.nonNull(req.getFeatureScope()) && Objects.nonNull(req.getFeatureScope().getGovernmentFeatureResourceId())
|
||||
&& req.getFeatureScope().getGovernmentFeatureResourceId() > 0, "功能范围选择有误");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user