@ -85,7 +85,7 @@ public class OnlinePageController {
@@ -85,7 +85,7 @@ public class OnlinePageController {
@OperationLog ( type = SysOperationLogType . ADD )
@Transactional ( rollbackFor = Exception . class )
@PostMapping ( "/add" )
public ResponseResult < Long > add ( @MyRequestBody OnlinePageDto onlinePageDto ) {
public ResponseResult < OnlinePage > add ( @MyRequestBody OnlinePageDto onlinePageDto ) {
String errorMessage = MyCommonUtil . getModelValidationError ( onlinePageDto ) ;
if ( errorMessage ! = null ) {
return ResponseResult . error ( ErrorCodeEnum . DATA_VALIDATED_FAILED , errorMessage ) ;
@ -115,7 +115,6 @@ public class OnlinePageController {
@@ -115,7 +115,6 @@ public class OnlinePageController {
return ResponseResult . error ( ErrorCodeEnum . DUPLICATED_UNIQUE_KEY , errorMessage ) ;
}
Long masterTableId ;
OnlFormHead onlFormHead ;
if ( "new" . equals ( metaSource ) ) {
@ -125,7 +124,7 @@ public class OnlinePageController {
@@ -125,7 +124,7 @@ public class OnlinePageController {
String tableTxt = onlinePageDto . getPageName ( ) ;
onlFormHead = iOnlFormHeadService . createMetaAndSync ( tableName , tableTxt , metaType , null ) ;
masterTableId = onlFormHead . getId ( ) ;
Long masterTableId = onlFormHead . getId ( ) ;
onlinePage . setMasterTableId ( String . valueOf ( masterTableId ) ) ;
onlinePage . setMasterTableName ( onlFormHead . getTableName ( ) ) ;
@ -138,7 +137,6 @@ public class OnlinePageController {
@@ -138,7 +137,6 @@ public class OnlinePageController {
// === Existing branch: use existing metadata ===
String formMetadata = onlinePageDto . getMasterTableId ( ) ;
onlFormHead = iOnlFormHeadService . getById ( formMetadata ) ;
masterTableId = Long . valueOf ( formMetadata ) ;
}
try {
@ -179,7 +177,7 @@ public class OnlinePageController {
@@ -179,7 +177,7 @@ public class OnlinePageController {
* /
addOnlineDatasourceRelation ( onlFormHead , onlineDatasource , errorMessage , onlineDblink ) ;
return ResponseResult . success ( onlinePage . getPageId ( ) ) ;
return ResponseResult . success ( onlinePage ) ;
}