lyh
2025-01-13 137d008bd9b7d932160436a3a560b24512f6d1db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package org.jeecg.modules.dnc.response;
 
import lombok.ToString;
 
@ToString
public enum CommonCode implements ResultCode {
    SUCCESS(true,10000,"操作成功!"),
    UNAUTHENTICATED(false,10001,"此操作需要登陆系统!"),
    UNAUTHORISE(false,10002,"权限不足,无权操作!"),
    INVALID_PARAM(false,10003,"非法参数!"),
    INVALID_PAGE(false, 10004, "错误的分页参数!"),
    FAIL(false,11111,"操作失败!"),
    LICENSE_DEVICE_POINT_LARGE(false, 88886, "设备点位已超出限制"),
    LICENSE_WILL_EXPIRED(false, 88887, "license序号即将过期,请联系管理员!"),
    LICENSE_ERROR(false, 88888, "license序号无效!"),
    LICENSE_EXPIRED(false, 88889, "license序号过期!"),
    SERVER_ERROR(false,99999,"抱歉,系统繁忙,请稍后重试!");
 
    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private CommonCode(boolean success,int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }
 
    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int code() {
        return code;
    }
    @Override
    public String message() {
        return message;
    }
}