Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
Project
Project
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
曲欣亮
common
Commits
28480576
Commit
28480576
authored
Jul 24, 2018
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status 改为code
parent
563cfd5c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
Rjx.java
src/main/java/com/egolm/common/bean/Rjx.java
+8
-8
M.java
src/main/java/com/egolm/common/web/M.java
+4
-4
No files found.
src/main/java/com/egolm/common/bean/Rjx.java
View file @
28480576
...
@@ -107,28 +107,28 @@ public class Rjx extends LinkedHashMap<String, Object> {
...
@@ -107,28 +107,28 @@ public class Rjx extends LinkedHashMap<String, Object> {
}
}
public
static
Rjx
jsonOk
()
{
public
static
Rjx
jsonOk
()
{
return
Rjx
.
json
().
set
Status
(
200
).
setMessage
(
"OK"
);
return
Rjx
.
json
().
set
Code
(
200
).
setMessage
(
"OK"
);
}
}
public
static
Rjx
jsonErr
()
{
public
static
Rjx
jsonErr
()
{
return
Rjx
.
json
().
set
Status
(
500
).
setMessage
(
"ERROR"
);
return
Rjx
.
json
().
set
Code
(
500
).
setMessage
(
"ERROR"
);
}
}
public
static
Rjx
jsonTimeout
()
{
public
static
Rjx
jsonTimeout
()
{
return
Rjx
.
json
().
set
Status
(
300
).
setMessage
(
"TIMEOUT"
);
return
Rjx
.
json
().
set
Code
(
300
).
setMessage
(
"TIMEOUT"
);
}
}
public
static
Rjx
jsonNotFound
()
{
public
static
Rjx
jsonNotFound
()
{
return
Rjx
.
json
().
set
Status
(
400
).
setMessage
(
"NOTFOUND"
);
return
Rjx
.
json
().
set
Code
(
400
).
setMessage
(
"NOTFOUND"
);
}
}
public
Rjx
set
Status
(
int
status
)
{
public
Rjx
set
Code
(
int
status
)
{
put
(
"
status
"
,
status
);
put
(
"
code
"
,
status
);
return
this
;
return
this
;
}
}
public
int
get
Status
()
{
public
int
get
Code
()
{
return
(
Integer
)
this
.
get
(
"
status
"
);
return
(
Integer
)
this
.
get
(
"
code
"
);
}
}
public
Rjx
appendNtag
(
int
ntag
)
{
public
Rjx
appendNtag
(
int
ntag
)
{
...
...
src/main/java/com/egolm/common/web/M.java
View file @
28480576
...
@@ -41,19 +41,19 @@ public class M {
...
@@ -41,19 +41,19 @@ public class M {
}
}
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
)
{
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
)
{
Rjx
.
json
().
set
Status
(
statusCode
).
write
(
writer
);
Rjx
.
json
().
set
Code
(
statusCode
).
write
(
writer
);
}
}
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
Object
body
)
{
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
Object
body
)
{
Rjx
.
json
().
set
Status
(
statusCode
).
setData
(
body
).
write
(
writer
);
Rjx
.
json
().
set
Code
(
statusCode
).
setData
(
body
).
write
(
writer
);
}
}
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
String
message
)
{
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
String
message
)
{
Rjx
.
json
().
set
Status
(
statusCode
).
setMessage
(
message
).
write
(
writer
);
Rjx
.
json
().
set
Code
(
statusCode
).
setMessage
(
message
).
write
(
writer
);
}
}
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
String
message
,
Object
body
)
{
public
static
void
responseJson
(
Writer
writer
,
int
statusCode
,
String
message
,
Object
body
)
{
Rjx
.
json
().
set
Status
(
statusCode
).
setMessage
(
message
).
setData
(
body
).
write
(
writer
);
Rjx
.
json
().
set
Code
(
statusCode
).
setMessage
(
message
).
setData
(
body
).
write
(
writer
);
}
}
public
static
void
responseOk
(
Writer
writer
)
{
public
static
void
responseOk
(
Writer
writer
)
{
...
...
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