Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
2218b188
Commit
2218b188
authored
Jun 24, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
c6553420
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
api-server/src/main/java/com/zq/api/form/ApiForm.java
+7
-8
No files found.
api-server/src/main/java/com/zq/api/form/ApiForm.java
View file @
2218b188
...
@@ -7,8 +7,6 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -7,8 +7,6 @@ import com.alibaba.fastjson.JSONObject;
import
com.zq.api.config.ConfigCache
;
import
com.zq.api.config.ConfigCache
;
import
com.zq.api.utils.ApiUtils
;
import
com.zq.api.utils.ApiUtils
;
import
com.zq.api.utils.NumberUtils
;
import
com.zq.api.utils.NumberUtils
;
import
com.zq.common.encrypt.EncryptUtils
;
import
com.zq.common.encrypt.RsaUtils
;
import
com.zq.common.vo.ApiTokenVo
;
import
com.zq.common.vo.ApiTokenVo
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -77,7 +75,7 @@ public class ApiForm {
...
@@ -77,7 +75,7 @@ public class ApiForm {
* @return
* @return
*/
*/
public
double
getDouble
(
String
key
)
{
public
double
getDouble
(
String
key
)
{
return
NumberUtils
.
parseDbl
(
get
(
key
));
return
NumberUtils
.
parseDbl
(
get
String
(
key
));
}
}
/**
/**
...
@@ -89,11 +87,11 @@ public class ApiForm {
...
@@ -89,11 +87,11 @@ public class ApiForm {
* @return
* @return
*/
*/
public
long
getLong
(
String
key
)
{
public
long
getLong
(
String
key
)
{
return
NumberUtils
.
parseLong
(
get
(
key
));
return
NumberUtils
.
parseLong
(
get
String
(
key
));
}
}
public
float
getFloat
(
String
key
)
{
public
float
getFloat
(
String
key
)
{
return
NumberUtils
.
parseFloat
(
get
(
key
));
return
NumberUtils
.
parseFloat
(
get
String
(
key
));
}
}
/**
/**
...
@@ -105,7 +103,7 @@ public class ApiForm {
...
@@ -105,7 +103,7 @@ public class ApiForm {
* @return
* @return
*/
*/
public
int
getInt
(
String
key
)
{
public
int
getInt
(
String
key
)
{
return
NumberUtils
.
parseInt
(
get
(
key
));
return
NumberUtils
.
parseInt
(
get
String
(
key
));
}
}
/**
/**
...
@@ -116,8 +114,9 @@ public class ApiForm {
...
@@ -116,8 +114,9 @@ public class ApiForm {
* @param key
* @param key
* @return
* @return
*/
*/
public
String
get
(
String
key
)
{
public
String
getString
(
String
key
)
{
return
getContentJson
().
getString
(
key
);
String
value
=
getContentJson
().
getString
(
key
);
return
value
==
null
?
""
:
value
;
}
}
/**
/**
...
...
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