Browse Source

refactor(online): 使用常量替换硬编码的元数据源字符串

online-form-direct-creation
chenchuchuan 2 weeks ago
parent
commit
7dcb3bb5c9
  1. 8
      common/common-online/src/main/java/apelet/common/online/controller/OnlinePageController.java

8
common/common-online/src/main/java/apelet/common/online/controller/OnlinePageController.java

@ -75,6 +75,10 @@ public class OnlinePageController { @@ -75,6 +75,10 @@ public class OnlinePageController {
@Autowired
private IOnlFormFieldService onlFormFieldService;
//new=新建元数据,exist=现有元数据
private static final String META_SOURCE_NEW = "new";
private static final String META_SOURCE_EXIST = "exist";
/**
* 新增在线表单页面数据
*
@ -92,7 +96,7 @@ public class OnlinePageController { @@ -92,7 +96,7 @@ public class OnlinePageController {
}
// Validate based on metaSource
String metaSource = onlinePageDto.getMetaSource();
if ("new".equals(metaSource)) {
if (META_SOURCE_NEW.equals(metaSource)) {
// New metadata flow: metaType and pageCode are required
if (StrUtil.isEmpty(onlinePageDto.getMetaType())) {
errorMessage = "数据验证失败,新建元数据时表类型(metaType)不能为空!";
@ -117,7 +121,7 @@ public class OnlinePageController { @@ -117,7 +121,7 @@ public class OnlinePageController {
OnlFormHead onlFormHead;
if ("new".equals(metaSource)) {
if (META_SOURCE_NEW.equals(metaSource)) {
// === New branch: create fresh metadata ===
String metaType = onlinePageDto.getMetaType();
String tableName = onlinePageDto.getPageCode();

Loading…
Cancel
Save