提交 d7336264 编写于 作者: shuzheng5201314's avatar shuzheng5201314

增加登录返回结果码

上级 78f90b4c
......@@ -8,6 +8,4 @@ import com.zheng.common.base.BaseConstants;
*/
public class UpmsConstant extends BaseConstants {
}
......@@ -8,10 +8,6 @@ import com.zheng.common.base.BaseResult;
*/
public class UpmsResult extends BaseResult {
public UpmsResult(int code, String message, Object data) {
super(code, message, data);
}
public UpmsResult(UpmsResultConstant upmsResultConstant, Object data) {
super(upmsResultConstant.getCode(), upmsResultConstant.getMessage(), data);
}
......
......@@ -7,7 +7,14 @@ package com.zheng.upms.common.constant;
public enum UpmsResultConstant {
SUCCESS(1, "success"),
INVALID_LENGTH(10001, "Invalid length");
INVALID_LENGTH(10001, "Invalid length"),
EMPTY_USERNAME(10101, "Username cannot be empty"),
EMPTY_PASSWORD(10102, "Password cannot be empty"),
INVALID_USERNAME(10103, "Account does not exist"),
INVALID_PASSWORD(10104, "Password error"),
INVALID_ACCOUNT(10105, "Invalid account");
public int code;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册