Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
api-service-gateway
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱允伟
api-service-gateway
Commits
91359e71
Commit
91359e71
authored
Sep 24, 2021
by
朱允伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<dev> 生成接口请求参数默认值调整
parent
09c01550
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
api-service-project/api-service-application/src/main/java/com/zorkdata/apiservice/application/impl/ApiServiceApplicationImpl.java
...piservice/application/impl/ApiServiceApplicationImpl.java
+10
-9
No files found.
api-service-project/api-service-application/src/main/java/com/zorkdata/apiservice/application/impl/ApiServiceApplicationImpl.java
View file @
91359e71
...
...
@@ -36,6 +36,7 @@ import org.springframework.web.client.RestTemplate;
import
javax.persistence.criteria.Predicate
;
import
java.sql.*
;
import
java.time.temporal.ValueRange
;
import
java.util.Date
;
import
java.util.*
;
...
...
@@ -643,8 +644,8 @@ public class ApiServiceApplicationImpl implements ApiApplication {
String
operator
=
requestParam
.
getOperator
();
String
name
=
requestParam
.
getName
();
String
value
=
inParam
.
get
(
name
);
if
(
StringUtils
.
isEmpty
(
value
))
{
value
=
requestParam
.
getDefaultValue
()
;
if
(
null
==
value
)
{
continue
;
}
if
(
i
==
0
)
{
switch
(
operator
)
{
...
...
@@ -773,8 +774,8 @@ public class ApiServiceApplicationImpl implements ApiApplication {
String
operator
=
requestParam
.
getOperator
();
String
name
=
requestParam
.
getName
();
String
value
=
inParam
.
get
(
name
);
if
(
StringUtils
.
isEmpty
(
value
))
{
value
=
requestParam
.
getDefaultValue
()
;
if
(
null
==
value
)
{
continue
;
}
if
(
i
==
0
)
{
sbSql
.
append
(
bindField
).
append
(
bindField
).
append
(
" "
).
append
(
operator
).
append
(
" "
).
append
(
value
);
...
...
@@ -845,8 +846,8 @@ public class ApiServiceApplicationImpl implements ApiApplication {
String
name
=
requestParam
.
getName
();
String
value
=
inParam
.
get
(
name
);
if
(
null
==
value
)
{
String
defaultValue
=
requestParam
.
getDefaultValue
();
if
(
StringUtils
.
isEmpty
(
defaultValue
))
{
Integer
requried
=
requestParam
.
getRequried
();
if
(
requried
>
0
)
{
log
.
error
(
"接口参数:{}不可以为空"
,
name
);
return
false
;
}
...
...
@@ -865,8 +866,8 @@ public class ApiServiceApplicationImpl implements ApiApplication {
String
name
=
requestParam
.
getName
();
String
value
=
inParam
.
get
(
name
);
if
(
null
==
value
)
{
String
defaultValue
=
requestParam
.
getDefaultValue
();
if
(
StringUtils
.
isEmpty
(
defaultValue
))
{
Integer
requried
=
requestParam
.
getRequried
();
if
(
requried
>
0
)
{
log
.
error
(
"接口参数:{}不可以为空"
,
name
);
return
false
;
}
...
...
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