更新错误编码
This commit is contained in:
parent
0c66b42a4c
commit
2ffa6ba046
|
|
@ -106,7 +106,18 @@
|
|||
<artifactId>mapper-spring-boot-starter</artifactId>
|
||||
<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>
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue