Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sqlrest
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
comm
sqlrest
Commits
be465b5c
Commit
be465b5c
authored
Apr 30, 2025
by
inrgihc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试问题修复
parent
63f98658
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
sqlrest-common/src/main/java/com/gitee/sqlrest/common/dto/ItemParam.java
+4
-4
sqlrest-core/src/main/java/com/gitee/sqlrest/core/service/ApiAssignmentService.java
+2
-8
No files found.
sqlrest-common/src/main/java/com/gitee/sqlrest/common/dto/ItemParam.java
View file @
be465b5c
...
@@ -21,7 +21,7 @@ public class ItemParam extends BaseParam {
...
@@ -21,7 +21,7 @@ public class ItemParam extends BaseParam {
@ApiModelProperty
(
"Object类型的子元素"
)
@ApiModelProperty
(
"Object类型的子元素"
)
private
List
<
BaseParam
>
children
;
private
List
<
BaseParam
>
children
;
public
boolean
v
alid
()
{
public
void
checkV
alid
()
{
if
(
StringUtils
.
isBlank
(
getName
()))
{
if
(
StringUtils
.
isBlank
(
getName
()))
{
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INTERNAL_ERROR
,
"parameter name must is not blank"
);
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INTERNAL_ERROR
,
"parameter name must is not blank"
);
}
}
...
@@ -32,12 +32,12 @@ public class ItemParam extends BaseParam {
...
@@ -32,12 +32,12 @@ public class ItemParam extends BaseParam {
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INTERNAL_ERROR
,
"parameter name must is not blank"
);
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INTERNAL_ERROR
,
"parameter name must is not blank"
);
}
}
}
}
return
true
;
}
else
{
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INVALID_ARGUMENT
,
"Object Input param '"
+
getName
()
+
"' must have child parameter."
);
}
}
}
else
{
}
else
{
children
=
Collections
.
emptyList
();
children
=
Collections
.
emptyList
();
}
}
return
false
;
}
}
}
}
sqlrest-core/src/main/java/com/gitee/sqlrest/core/service/ApiAssignmentService.java
View file @
be465b5c
...
@@ -333,10 +333,7 @@ public class ApiAssignmentService {
...
@@ -333,10 +333,7 @@ public class ApiAssignmentService {
}
}
for
(
ItemParam
itemParam
:
request
.
getParams
())
{
for
(
ItemParam
itemParam
:
request
.
getParams
())
{
if
(!
itemParam
.
valid
())
{
itemParam
.
checkValid
();
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INVALID_ARGUMENT
,
"Object Input param must have child parameter."
);
}
}
}
}
}
if
(
null
==
request
.
getDatasourceId
()
||
null
==
dataSourceDao
.
getById
(
request
.
getDatasourceId
()))
{
if
(
null
==
request
.
getDatasourceId
()
||
null
==
dataSourceDao
.
getById
(
request
.
getDatasourceId
()))
{
...
@@ -409,10 +406,7 @@ public class ApiAssignmentService {
...
@@ -409,10 +406,7 @@ public class ApiAssignmentService {
}
}
}
}
for
(
ItemParam
itemParam
:
request
.
getParams
())
{
for
(
ItemParam
itemParam
:
request
.
getParams
())
{
if
(!
itemParam
.
valid
())
{
itemParam
.
checkValid
();
throw
new
CommonException
(
ResponseErrorCode
.
ERROR_INVALID_ARGUMENT
,
"Object Input param must have child parameter."
);
}
}
}
}
}
if
(
null
==
request
.
getDatasourceId
()
||
null
==
dataSourceDao
.
getById
(
request
.
getDatasourceId
()))
{
if
(
null
==
request
.
getDatasourceId
()
||
null
==
dataSourceDao
.
getById
(
request
.
getDatasourceId
()))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment