From a51c85fcad169a0af7c3f3bc5976ad1350f0c3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Fri, 17 Feb 2023 11:00:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Infrastructure/Constant/HttpStatus.cs | 48 ++++++++-------- Infrastructure/Enums/BusinessType.cs | 74 +++++++++++------------- ZR.CodeGenerator/GenConstants.cs | 32 ++++++++--- ZR.Model/System/SysOperLog.cs | 21 +++++-- ZR.Model/System/UserConstants.cs | 82 ++++++++++++++++++++------- 5 files changed, 158 insertions(+), 99 deletions(-) diff --git a/Infrastructure/Constant/HttpStatus.cs b/Infrastructure/Constant/HttpStatus.cs index 3643b82..34fe7dc 100644 --- a/Infrastructure/Constant/HttpStatus.cs +++ b/Infrastructure/Constant/HttpStatus.cs @@ -40,9 +40,9 @@ namespace Infrastructure.Constant /// public static readonly int NOT_MODIFIED = 304; - /** - * 参数列表错误(缺少,格式不匹配) - */ + /// + /// 参数列表错误(缺少,格式不匹配) + /// public static readonly int BAD_REQUEST = 400; /// @@ -50,39 +50,39 @@ namespace Infrastructure.Constant /// public static readonly int UNAUTHORIZED = 401; - /** - * 访问受限,授权过期 - */ + /// + /// 访问受限,授权过期 + /// public static readonly int FORBIDDEN = 403; - /** - * 资源,服务未找到 - */ + /// + /// 资源,服务未找到 + /// public static readonly int NOT_FOUND = 404; - /** - * 不允许的http方法 - */ + /// + /// 不允许的http方法 + /// public static readonly int BAD_METHOD = 405; - /** - * 资源冲突,或者资源被锁 - */ + /// + /// 资源冲突,或者资源被锁 + /// public static readonly int CONFLICT = 409; - /** - * 不支持的数据,媒体类型 - */ + /// + /// 不支持的数据,媒体类型 + /// public static readonly int UNSUPPORTED_TYPE = 415; - /** - * 系统内部错误 - */ + /// + /// 系统内部错误 + /// public static readonly int ERROR = 500; - /** - * 接口未实现 - */ + /// + /// 接口未实现 + /// public static readonly int NOT_IMPLEMENTED = 501; } } diff --git a/Infrastructure/Enums/BusinessType.cs b/Infrastructure/Enums/BusinessType.cs index 5f4195a..a4f09e1 100644 --- a/Infrastructure/Enums/BusinessType.cs +++ b/Infrastructure/Enums/BusinessType.cs @@ -1,64 +1,58 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Infrastructure.Enums +namespace Infrastructure.Enums { - /** - * 业务操作类型 - * 0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据 - * @author zrry - */ + /// + /// 业务操作类型 0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据 + /// public enum BusinessType { - /** - * 其它 - */ + /// + /// 其它 + /// OTHER = 0, - /** - * 新增 - */ + /// + /// 新增 + /// INSERT = 1, - /** - * 修改 - */ + /// + /// 修改 + /// UPDATE = 2, - /** - * 删除 - */ + /// + /// 删除 + /// DELETE = 3, - /** - * 授权 - */ + /// + /// 授权 + /// GRANT = 4, - /** - * 导出 - */ + /// + /// 导出 + /// EXPORT = 5, - /** - * 导入 - */ + /// + /// 导入 + /// IMPORT = 6, - /** - * 强退 - */ + /// + /// 强退 + /// FORCE = 7, - /** - * 生成代码 - */ + /// + /// 生成代码 + /// GENCODE = 8, - /** - * 清空数据 - */ + /// + /// 清空数据 + /// CLEAN = 9, } } diff --git a/ZR.CodeGenerator/GenConstants.cs b/ZR.CodeGenerator/GenConstants.cs index 83a35e4..f9e5498 100644 --- a/ZR.CodeGenerator/GenConstants.cs +++ b/ZR.CodeGenerator/GenConstants.cs @@ -31,28 +31,44 @@ namespace ZR.CodeGenerator public static readonly string[] radioFiled = new string[] { "status", "state", "is"}; - /** 单表(增删改查) */ + /// + /// 单表(增删改查) + /// public static string TPL_CRUD = "crud"; - /** 树表(增删改查) */ + /// + /// 树表(增删改查) + /// public static string TPL_TREE = "tree"; - /** 主子表(增删改查) */ + /// + /// 主子表(增删改查) + /// public static string TPL_SUB = "sub"; - /** 树编码字段 */ + /// + /// 树编码字段 + /// public static string TREE_CODE = "treeCode"; - /** 树父编码字段 */ + /// + /// 树父编码字段 + /// public static string TREE_PARENT_CODE = "treeParentCode"; - /** 树名称字段 */ + /// + /// 树名称字段 + /// public static string TREE_NAME = "treeName"; - /** 上级菜单ID字段 */ + /// + /// 上级菜单ID字段 + /// public static string PARENT_MENU_ID = "parentMenuId"; - /** 上级菜单名称字段 */ + /// + /// 上级菜单名称字段 + /// public static string PARENT_MENU_NAME = "parentMenuName"; /** 数据库字符串类型 */ diff --git a/ZR.Model/System/SysOperLog.cs b/ZR.Model/System/SysOperLog.cs index 65d75e1..d0ae9fb 100644 --- a/ZR.Model/System/SysOperLog.cs +++ b/ZR.Model/System/SysOperLog.cs @@ -11,25 +11,34 @@ namespace ZR.Model.System { [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public long OperId { get; set; } - /** 操作模块 */ + /// + /// 操作模块 + /// [DisplayName("操作模块")] public string Title { get; set; } - /** 业务类型(0其它 1新增 2修改 3删除) */ - //@Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") + /// + /// 业务类型(0其它 1新增 2修改 3删除 4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据) + /// [DisplayName("业务类型")] public int BusinessType { get; set; } - /** 业务类型数组 */ + /// + /// 业务类型数组 + /// [SugarColumn(IsIgnore = true)] [ExcelIgnore] public int[] BusinessTypes { get; set; } - /** 请求方法 */ + /// + /// 请求方法 + /// [DisplayName("请求方法")] public string Method { get; set; } - /** 请求方式 */ + /// + /// 请求方式 + /// [DisplayName("请求方式")] public string RequestMethod { get; set; } diff --git a/ZR.Model/System/UserConstants.cs b/ZR.Model/System/UserConstants.cs index 7914ab2..b2f8a4b 100644 --- a/ZR.Model/System/UserConstants.cs +++ b/ZR.Model/System/UserConstants.cs @@ -6,59 +6,99 @@ namespace ZR.Model.System { public class UserConstants { - /** - * 平台内系统用户的唯一标志 - */ + /// + /// 平台内系统用户的唯一标志 + /// public static string SYS_USER = "SYS_USER"; - /** 正常状态 */ + /// + /// 正常状态 + /// public static string NORMAL = "0"; - /** 异常状态 */ + /// + /// 异常状态 + /// public static string EXCEPTION = "1"; - /** 用户封禁状态 */ + /// + /// 用户封禁状态 + /// public static string USER_DISABLE = "1"; - /** 角色封禁状态 */ + /// + /// 角色封禁状态 + /// public static string ROLE_DISABLE = "1"; - /** 部门正常状态 */ + /// + /// 部门正常状态 + /// public static string DEPT_NORMAL = "0"; - /** 部门停用状态 */ + /// + /// 部门停用状态 + /// public static string DEPT_DISABLE = "1"; - /** 字典正常状态 */ + /// + /// 字典正常状态 + /// public static string DICT_NORMAL = "0"; - /** 是否为系统默认(是) */ + /// + /// 是否为系统默认(是) + /// public static string YES = "Y"; - /** 是否菜单外链(是) */ + /// + /// 是否菜单外链(是) + /// public static string YES_FRAME = "1"; - /** 是否菜单外链(否) */ + /// + /// 是否菜单外链(否) + /// public static string NO_FRAME = "0"; - /** 菜单类型(目录) */ + /// + /// 菜单类型(目录) + /// public static string TYPE_DIR = "M"; - /** 菜单类型(菜单) */ + /// + /// 菜单类型(菜单) + /// public static string TYPE_MENU = "C"; - /** 菜单类型(按钮) */ + /// + /// 菜单类型(按钮) + /// public static string TYPE_BUTTON = "F"; - /** 菜单类型(链接) */ + + ///// + ///// 菜单类型(链接) + ///// //public static string TYPE_LINK = "L"; - /** Layout组件标识 */ + /// + /// Layout组件标识 + /// public static string LAYOUT = "Layout"; - /** ParentView组件标识 */ + + /// + /// ParentView组件标识 + /// public static string PARENT_VIEW = "ParentView"; - /** InnerLink组件标识 */ + + /// + /// InnerLink组件标识 + /// public static string INNER_LINK = "InnerLink"; - /** 校验返回结果码 */ + + /// + /// 校验返回结果码 + /// public static string UNIQUE = "0"; public static string NOT_UNIQUE = "1";