更新错误编码

This commit is contained in:
solo-hx 2019-08-23 16:09:01 +08:00
parent 0c66b42a4c
commit 2ffa6ba046
2 changed files with 43 additions and 1 deletions

View File

@ -107,6 +107,17 @@
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.18</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.common.result;
import lombok.Getter;
import lombok.Setter;
/**
* 系统错误码
*
* @author solo
* @date 2018/2/23.
*/
public enum ErrorCodes {
/**
* 错误码
*/
FAIL(-1, "操作失败"),
SUCCESS(0, "操作成功"),
;
@Getter
@Setter
private int code;
@Getter
@Setter
private String message;
ErrorCodes(int code, String message) {
this.code = code;
this.message = message;
}
}