2024-10-13 17:04:47 +08:00
|
|
|
|
using LMS.Common.Attributes;
|
|
|
|
|
|
|
|
|
|
|
|
namespace LMS.Common.Enums
|
|
|
|
|
|
{
|
|
|
|
|
|
public class ResponseCodeEnum
|
|
|
|
|
|
{
|
|
|
|
|
|
public enum ResponseCode
|
|
|
|
|
|
{
|
|
|
|
|
|
#region 成功
|
|
|
|
|
|
|
|
|
|
|
|
[Result("请求成功")]
|
|
|
|
|
|
[Description("请求成功")]
|
|
|
|
|
|
Success = 1,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region User 操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UndefinedLoginType)]
|
|
|
|
|
|
[Description(ResponseString.UndefinedLoginType)]
|
|
|
|
|
|
UndefinedLoginType = 1000,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UserNotFound)]
|
|
|
|
|
|
[Description("未找到对应用户名的账号")]
|
|
|
|
|
|
FindUserByNameFail = 1001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UserPasswordError)]
|
|
|
|
|
|
[Description("用户密码错误")]
|
|
|
|
|
|
UserPasswordFail = 1002,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的用户不存在")]
|
|
|
|
|
|
FindUserByIdFail = 1003,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UserStatusError)]
|
|
|
|
|
|
[Description("用户的状态错误,只能状态为正常的用户可以登录")]
|
|
|
|
|
|
UserStatusError = 1004,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Result("指定邮箱的用户已经存在")]
|
|
|
|
|
|
[Description("指定邮箱的用户已经存在")]
|
|
|
|
|
|
UserEmailExist = 1005,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("指定手机号的用户已经存在")]
|
|
|
|
|
|
[Description("指定手机号的用户已经存在")]
|
|
|
|
|
|
UserPhoneExist = 1006,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("指定邮箱或手机号的用户已经存在")]
|
|
|
|
|
|
[Description("指定邮箱或手机号的用户已经存在")]
|
|
|
|
|
|
UserEmailOrPhoneExist = 1007,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("指定的用户名已存在")]
|
|
|
|
|
|
[Description("指定的用户名已存在")]
|
|
|
|
|
|
UasrNameExist = 1008,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("指定的用户昵称已存在")]
|
|
|
|
|
|
[Description("指定的用户昵称已存在")]
|
|
|
|
|
|
UserNickNameExist = 1009,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UserIsLockedOut)]
|
|
|
|
|
|
[Description(ResponseString.UserIsLockedOut)]
|
|
|
|
|
|
UserIsLockedOut = 1010,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.UserLoginOut)]
|
|
|
|
|
|
[Description("用户的刷新令牌无效,可能是二次登录,或者是登录到期,请重新登录")]
|
|
|
|
|
|
RefreshTokenInvalid = 1011,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("用户注册失败")]
|
|
|
|
|
|
[Description("用户注册失败")]
|
|
|
|
|
|
UserRegisterFial = 1012,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("用户不是VIP用户")]
|
|
|
|
|
|
[Description("用户不是VIP用户")]
|
|
|
|
|
|
UserNotVip = 1013,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("无效的邀请码")]
|
|
|
|
|
|
[Description("无效的邀请码")]
|
|
|
|
|
|
InvalidAffiliateCode = 1014,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Machine 操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.MachineStatusNotFoundOrStatusIsNot)]
|
|
|
|
|
|
[Description(ResponseString.MachineStatusNotFoundOrStatusIsNot)]
|
|
|
|
|
|
MachineNotFound = 2001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的机器码不存在")]
|
|
|
|
|
|
FindMachineByIdFail = 2002,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定机器码已经存在")]
|
|
|
|
|
|
MachineAlreadyExist = 2003,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region PermissionType 操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的权限分类没有找到")]
|
|
|
|
|
|
FindPermissionTypeByIdFail = 3001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定ID的权限名称和编码已经存在")]
|
|
|
|
|
|
PermissionTypeExist = 3002,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 权限操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.NotPermissionAction)]
|
|
|
|
|
|
[Description(ResponseString.NotPermissionAction)]
|
|
|
|
|
|
NotPermissionAction = 4001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定用户ID和权限分类ID已存在,不可新增")]
|
|
|
|
|
|
PermissionExist = 4002,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的权限没有找到")]
|
|
|
|
|
|
FindPermissionByIdFail = 4003,
|
|
|
|
|
|
|
|
|
|
|
|
[Result("权限编码已存在,请检查")]
|
|
|
|
|
|
[Description("权限编码已存在,请检查")]
|
|
|
|
|
|
PermissionCodeExist = 4004,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 系统报错
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.SystemError)]
|
|
|
|
|
|
[Description(ResponseString.SystemError)]
|
|
|
|
|
|
SystemError = 5000,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.ParameterError)]
|
|
|
|
|
|
[Description(ResponseString.ParameterError)]
|
|
|
|
|
|
ParameterError = 5001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.InvalidOptions)]
|
|
|
|
|
|
[Description(ResponseString.InvalidOptions)]
|
|
|
|
|
|
InvalidOptions = 5002,
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 提示词操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定的提示词已经存在")]
|
|
|
|
|
|
PromptStringExist = 6001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的提示词没有找到")]
|
|
|
|
|
|
FindPromptStringFail = 6002,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 提示词类型操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定的提示词的名称或者是编码已存在")]
|
|
|
|
|
|
PromptTypeExist = 7001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的提示词类型没有找到")]
|
|
|
|
|
|
FindPromptTypeFail = 7002,
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 文案转发失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.ForwardFail)]
|
|
|
|
|
|
[Description("文案转发失败")]
|
|
|
|
|
|
ForwardWordFail = 8001,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 角色操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataExist)]
|
|
|
|
|
|
[Description("指定的角色名称已经存在")]
|
|
|
|
|
|
RoleNameExist = 9001,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.IdDateNotFound)]
|
|
|
|
|
|
[Description("指定ID的角色不存在")]
|
|
|
|
|
|
FindRoleByIdFail = 9002,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataNotExist)]
|
|
|
|
|
|
[Description("指定编码的角色不存在")]
|
|
|
|
|
|
FindRoleByCodeFail = 9003,
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.HasRelationship)]
|
|
|
|
|
|
[Description("指定角色已经绑定了用户,无法删除")]
|
|
|
|
|
|
RoleHasUser = 9004,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2024-10-18 12:44:12 +08:00
|
|
|
|
|
|
|
|
|
|
#region 配置项操作失败
|
|
|
|
|
|
|
|
|
|
|
|
[Result(ResponseString.DataNotExist)]
|
|
|
|
|
|
[Description("没有找到指定的配置项")]
|
|
|
|
|
|
FindOptionsFail = 10001,
|
|
|
|
|
|
#endregion
|
2024-10-13 17:04:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|