Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
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
姚本章
dm_project
Commits
7051b506
Commit
7051b506
authored
Dec 01, 2020
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公共实体与响应编码
parent
03867c3e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
194 additions
and
0 deletions
+194
-0
BaseBeanResponse.java
...on/src/main/java/com/jz/common/bean/BaseBeanResponse.java
+55
-0
BasePageBean.java
...common/src/main/java/com/jz/common/bean/BasePageBean.java
+31
-0
BaseResponse.java
...common/src/main/java/com/jz/common/bean/BaseResponse.java
+40
-0
PageInfoResponse.java
...on/src/main/java/com/jz/common/bean/PageInfoResponse.java
+21
-0
Constants.java
...ommon/src/main/java/com/jz/common/constant/Constants.java
+47
-0
No files found.
jz-dm-common/src/main/java/com/jz/common/bean/BaseBeanResponse.java
0 → 100644
View file @
7051b506
package
com
.
jz
.
common
.
bean
;
import
java.util.List
;
/**
* @author ybz
*
*/
public
class
BaseBeanResponse
<
T
>
extends
BaseResponse
{
private
T
data
;
private
List
<
T
>
datas
;
public
BaseBeanResponse
(){
super
();
}
public
BaseBeanResponse
(
String
code
,
T
data
)
{
super
(
code
);
this
.
data
=
data
;
}
public
BaseBeanResponse
(
String
code
,
List
<
T
>
datas
)
{
super
(
code
);
this
.
datas
=
datas
;
}
public
BaseBeanResponse
(
String
code
,
String
message
,
T
data
)
{
super
(
code
,
message
);
this
.
data
=
data
;
}
public
BaseBeanResponse
(
String
code
,
String
message
,
List
<
T
>
datas
)
{
super
(
code
,
message
);
this
.
datas
=
datas
;
}
public
T
getData
()
{
return
data
;
}
public
void
setData
(
T
data
)
{
this
.
data
=
data
;
}
public
List
<
T
>
getDatas
()
{
return
datas
;
}
public
void
setDatas
(
List
<
T
>
datas
)
{
this
.
datas
=
datas
;
}
}
jz-dm-common/src/main/java/com/jz/common/bean/BasePageBean.java
0 → 100644
View file @
7051b506
package
com
.
jz
.
common
.
bean
;
/**分页信息封装
* @author ybz
*
*/
public
class
BasePageBean
{
private
int
pageNum
=
1
;
private
int
pageSize
=
10
;
public
int
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
}
jz-dm-common/src/main/java/com/jz/common/bean/BaseResponse.java
0 → 100644
View file @
7051b506
package
com
.
jz
.
common
.
bean
;
/**
* @author ybz
*
*/
public
class
BaseResponse
{
//错误码
private
String
code
;
//错误消息
private
String
message
;
public
BaseResponse
()
{}
public
BaseResponse
(
String
code
)
{
this
.
code
=
code
;
}
public
BaseResponse
(
String
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
}
jz-dm-common/src/main/java/com/jz/common/bean/PageInfoResponse.java
0 → 100644
View file @
7051b506
package
com
.
jz
.
common
.
bean
;
import
com.github.pagehelper.PageInfo
;
/**
* @author ybz
*
*/
public
class
PageInfoResponse
<
T
>
extends
BaseResponse
{
private
PageInfo
<
T
>
data
;
public
PageInfo
<
T
>
getData
()
{
return
data
;
}
public
void
setData
(
PageInfo
<
T
>
data
)
{
this
.
data
=
data
;
}
}
jz-dm-common/src/main/java/com/jz/common/constant/Constants.java
0 → 100644
View file @
7051b506
package
com
.
jz
.
common
.
constant
;
/**常量
* @author ybz
*
*/
public
class
Constants
{
public
final
static
String
SUCCESS_CODE
=
"200"
;
public
final
static
String
FAILURE_CODE
=
"201"
;
/*****************************************************************************/
//第三方请求返回结果码定义
public
static
String
CODE_SUCCESS
=
"000"
;
public
static
String
MSG_SUCCESS
=
"操作成功"
;
public
static
String
CODE_ERROR_REQUESTMETHOD
=
"100"
;
public
static
String
MSG_ERROR_REQUESTMETHOD
=
"请求方式错误(只支持POST方式请求)"
;
public
static
String
CODE_ERROR_PARAMETER
=
"101"
;
public
static
String
MSG_ERROR_PARAMETER
=
"参数不正确(格式不正确或必填参数为空)"
;
public
static
String
CODE_ERROR_CITYCODE
=
"102"
;
public
static
String
MSG_ERROR_CITYCODE
=
"城市区域代码错误"
;
public
static
String
CODE_NOT_SIGNED
=
"103"
;
public
static
String
MSG_NOT_SIGNED
=
"尚未登录或者登录已过期"
;
public
static
String
CODE_DATA_EXISTED
=
"106"
;
public
static
String
MSG_DATA_EXISTED
=
"企业已备案,请勿重复备案"
;
public
static
String
CODE_ERROR_USERNAMEORPASSWD
=
"107"
;
public
static
String
MSG_ERROR_USERNAMEORPASSWD
=
"用户名或密码错误"
;
public
static
String
CODE_USER_LOGGEDOFF
=
"108"
;
public
static
String
MSG_USER_LOGGEDOFF
=
"用户已注销"
;
public
static
String
CODE_DATA_NOTMEET
=
"201"
;
public
static
String
MSG_DATA_NOTMEET
=
"数据不符合业务处理要求"
;
public
static
String
CODE_SYS_EXCEPTION
=
"500"
;
public
static
String
MSG_SYS_EXCEPTION
=
"系统异常,请联系接口提供方"
;
/*****************************************************************************/
}
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