Commit 40ad23cd by guojuxing

积分服务页面一共不能超过15个

parent 5868a92a
......@@ -96,9 +96,6 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
//设置人群的页面
if (AppletPageTypeEnum.needCrowdWidget(pageType)) {
//如果是积分服务页面并且是保存并发布,则校验,不能超过15条
validIntegralServicePageNum(pageId, pageType, saveType, enterpriseId, appType, appId);
Long crowdWidgetId = jsonObject.getLong("crowdWidgetId");
record.setCrowdWidgetId(crowdWidgetId);
boolean isAllCrowd = isAllCrowd(crowdWidgetId, enterpriseId);
......@@ -132,6 +129,11 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
throw new CommonException(ErrorCode.PARAMETER_ERROR.getCode(), "页面超过5个");
}
}
if (AppletPageTypeEnum.INTEGRAL_SERVICE.getCode() == pageType) {
if (isAddOperation && count >= 15) {
throw new CommonException(ErrorCode.PARAMETER_ERROR.getCode(), "页面超过15个");
}
}
//如果是有默认数据的类型(会员中心),第一条记录,即使saveType = 2,也自动变成1
if (AppletPageTypeEnum.hasDefault(pageType)) {
......@@ -427,8 +429,6 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
appletCustomPageService.disableFetch(record.getEnterpriseId(), record.getAppType(), record.getAppId(),
record.getPageType());
}
validIntegralServicePageNum(null, record.getPageType(), 1, record.getEnterpriseId(), record.getAppType(), record.getAppId());
appletCustomPageService.updateStatus(pageId, 1);
return ServiceResponse.success(record.getTitle());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment