接口返回值常用枚举类型
电脑版发表于:2022/1/18 11:40
code:
public enum ResultCode { /// <summary> /// 成功 /// </summary> SUCCESS = 10000, /// <summary> /// 请求成功但内容没有改变 /// </summary> SUCCESS_NOCHANGE = 10001, /// <summary> /// 失败 /// </summary> FAILED = 10002, /// <summary> /// 参数验证失败 /// </summary> VALIDATE_FAILED = 10003, /// <summary> /// 未知错误 /// </summary> ERROR = 10004, /// <summary> /// 参数验证失败之重复性错误(比如用户名重复等) /// </summary> VALIDATE_FAILED_REPEAT = 10005, /// <summary> /// 参数验证失败之已设置错误(比如有些功能只能设置一次,比如某些用户名只能修改一次) /// </summary> VALIDATE_FAILED_HAVAED = 10006, /// <summary> /// 参数验证失败之空值错误 /// </summary> VALIDATE_FAILED_NULL = 10007, /// <summary> /// 参数验证失败之过期错误 /// </summary> VALIDATE_FAILED_EXPIRE = 10008, }