From 0659eb84c12d00ee96aef70468afe24936a6c678 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Wed, 11 Oct 2017 16:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Infrastructure/GenericHelpers.cs | 7 +- OpenAuth.App/CategoryManagerApp.cs | 20 +- OpenAuth.App/Extention/WF_RuntimeInitModel.cs | 2 +- OpenAuth.App/ModuleElementManagerApp.cs | 6 +- OpenAuth.App/ModuleManagerApp.cs | 8 +- OpenAuth.App/OrgManagerApp.cs | 16 +- OpenAuth.App/ResourceManagerApp.cs | 8 +- OpenAuth.App/RevelanceManagerApp.cs | 4 +- OpenAuth.App/RoleManagerApp.cs | 24 +- OpenAuth.App/SSO/SSOAuthUtil.cs | 2 +- OpenAuth.App/StockManagerApp.cs | 4 +- OpenAuth.App/UserManagerApp.cs | 20 +- OpenAuth.App/ViewModel/ModuleView.cs | 4 +- OpenAuth.App/ViewModel/RoleVM.cs | 2 +- OpenAuth.App/ViewModel/UserView.cs | 2 +- OpenAuth.App/WFFormService.cs | 6 +- OpenAuth.App/WFProcessInstanceService.cs | 36 +-- OpenAuth.App/WFSchemeService.cs | 10 +- OpenAuth.Domain/Core/Application.cs | 66 ++++++ OpenAuth.Domain/Core/Category.cs | 120 +++++----- .../Core/{DicIndex.cs => CategoryType.cs} | 95 ++++---- OpenAuth.Domain/Core/DicDetail.cs | 55 ----- OpenAuth.Domain/Core/Entity.cs | 4 +- OpenAuth.Domain/Core/Module.cs | 166 ++++++------- OpenAuth.Domain/Core/ModuleElement.cs | 150 ++++++------ OpenAuth.Domain/Core/Org.cs | 196 +++++++-------- OpenAuth.Domain/Core/Relevance.cs | 119 +++++----- OpenAuth.Domain/Core/Resource.cs | 134 ++++++----- OpenAuth.Domain/Core/Role.cs | 101 ++++---- OpenAuth.Domain/Core/Stock.cs | 125 +++++----- OpenAuth.Domain/Core/User.cs | 139 +++++------ OpenAuth.Domain/Core/WFFrmMain.cs | 224 +++++++++--------- OpenAuth.Domain/Core/WFProcessInstance.cs | 219 +++++++++-------- .../Core/WFProcessOperationHistory.cs | 102 ++++---- OpenAuth.Domain/Core/WFProcessScheme.cs | 101 ++++---- .../Core/WFProcessTransitionHistory.cs | 166 +++++++------ OpenAuth.Domain/Core/WFSchemeContent.cs | 112 ++++----- OpenAuth.Domain/Core/WFSchemeInfo.cs | 214 +++++++++-------- .../Interface/ICategoryRepository.cs | 10 +- .../Interface/IModuleRepository.cs | 8 +- OpenAuth.Domain/Interface/IOrgRepository.cs | 6 +- .../Interface/IRelevanceRepository.cs | 6 +- .../Interface/IResourceRepository.cs | 8 +- OpenAuth.Domain/Interface/IRoleRepository.cs | 10 +- OpenAuth.Domain/Interface/IStockRepository.cs | 8 +- OpenAuth.Domain/Interface/IUserRepository.cs | 6 +- OpenAuth.Domain/OpenAuth.Domain.csproj | 4 +- OpenAuth.Domain/Service/AuthoriseService.cs | 2 +- .../Service/ModuleEleManService.cs | 10 +- OpenAuth.Domain/Service/ModuleManService.cs | 18 +- OpenAuth.Domain/Service/ResManagerService.cs | 20 +- .../Service/StockManagerService.cs | 10 +- OpenAuth.Domain/Service/SystemAuthService.cs | 2 +- .../Controllers/FlowDesignController.cs | 6 +- .../Controllers/FlowInstancesController.cs | 20 +- .../Controllers/FormDesignController.cs | 26 +- .../Controllers/CategoryManagerController.cs | 4 +- .../ModuleElementManagerController.cs | 10 +- .../Controllers/ModuleManagerController.cs | 13 +- .../Controllers/OrgManagerController.cs | 10 +- .../Controllers/RelevanceManagerController.cs | 4 +- .../Controllers/ResourceManagerController.cs | 8 +- .../Controllers/RoleManagerController.cs | 8 +- .../Controllers/StockManagerController.cs | 4 +- .../Controllers/UserManagerController.cs | 6 +- .../Controllers/UserSessionController.cs | 4 +- OpenAuth.Repository/BaseRepository.cs | 4 +- OpenAuth.Repository/CategoryRepository.cs | 12 +- .../Models/Mapping/ApplicationMap.cs | 65 +++++ .../Models/Mapping/CategoryMap.cs | 25 +- .../{DicIndexMap.cs => CategoryTypeMap.cs} | 37 ++- .../Models/Mapping/DicDetailMap.cs | 54 ----- .../Models/Mapping/ModuleElementMap.cs | 9 +- .../Models/Mapping/ModuleMap.cs | 14 +- OpenAuth.Repository/Models/Mapping/OrgMap.cs | 9 +- .../Models/Mapping/RelevanceMap.cs | 13 +- .../Models/Mapping/ResourceMap.cs | 20 +- OpenAuth.Repository/Models/Mapping/RoleMap.cs | 11 +- .../Models/Mapping/StockMap.cs | 121 +++++----- OpenAuth.Repository/Models/Mapping/UserMap.cs | 11 +- .../Models/Mapping/WFFrmMainMap.cs | 197 +++++++-------- .../Models/Mapping/WFProcessInstanceMap.cs | 189 ++++++++------- .../Mapping/WFProcessOperationHistoryMap.cs | 103 ++++---- .../Models/Mapping/WFProcessSchemeMap.cs | 93 ++++---- .../Mapping/WFProcessTransitionHistoryMap.cs | 151 ++++++------ .../Models/Mapping/WFSchemeContentMap.cs | 109 +++++---- .../Models/Mapping/WFSchemeInfoMap.cs | 186 ++++++++------- .../Models/OpenAuthDBContext.cs | 12 +- OpenAuth.Repository/ModuleRepository.cs | 12 +- .../OpenAuth.Repository.csproj | 4 +- OpenAuth.Repository/OrgRepository.cs | 8 +- OpenAuth.Repository/RelevanceRepository.cs | 6 +- OpenAuth.Repository/ResourceRepository.cs | 12 +- OpenAuth.Repository/RoleRepository.cs | 12 +- OpenAuth.Repository/StockRepository.cs | 10 +- OpenAuth.Repository/UnitWork.cs | 4 +- OpenAuth.Repository/UserRepository.cs | 6 +- OpenAuth.UnitTest/TestAuthen.cs | 8 +- OpenAuth.UnitTest/TestOrg.cs | 2 +- OpenAuth.UnitTest/TestUser.cs | 2 +- OpenAuth.UnitTest/TestWorkflow.cs | 2 +- 101 files changed, 2349 insertions(+), 2224 deletions(-) create mode 100644 OpenAuth.Domain/Core/Application.cs rename OpenAuth.Domain/Core/{DicIndex.cs => CategoryType.cs} (57%) delete mode 100644 OpenAuth.Domain/Core/DicDetail.cs create mode 100644 OpenAuth.Repository/Models/Mapping/ApplicationMap.cs rename OpenAuth.Repository/Models/Mapping/{DicIndexMap.cs => CategoryTypeMap.cs} (56%) delete mode 100644 OpenAuth.Repository/Models/Mapping/DicDetailMap.cs diff --git a/Infrastructure/GenericHelpers.cs b/Infrastructure/GenericHelpers.cs index 43182db4..a8a9eaa7 100644 --- a/Infrastructure/GenericHelpers.cs +++ b/Infrastructure/GenericHelpers.cs @@ -29,7 +29,12 @@ namespace Infrastructure Func parentIdSelector, K rootId = default(K)) { - foreach (var c in collection.Where(c => parentIdSelector(c).Equals(rootId))) + foreach (var c in collection.Where(u => + { + var selector = parentIdSelector(u); + return (rootId == null && selector == null) + || (rootId != null &&rootId.Equals(selector)); + })) { yield return new TreeItem { diff --git a/OpenAuth.App/CategoryManagerApp.cs b/OpenAuth.App/CategoryManagerApp.cs index dd593c01..8464ca9a 100644 --- a/OpenAuth.App/CategoryManagerApp.cs +++ b/OpenAuth.App/CategoryManagerApp.cs @@ -20,9 +20,9 @@ namespace OpenAuth.App _unitWork = unitWork; } - public int GetCategoryCntInOrg(Guid orgId) + public int GetCategoryCntInOrg(string orgId) { - if (orgId == Guid.Empty) + if (orgId == string.Empty) { return _repository.Find(null).Count(); } @@ -40,11 +40,11 @@ namespace OpenAuth.App /// /// 加载一个分类及子分类全部Categorys /// - public GridData Load(Guid parentId, int pageindex, int pagesize) + public GridData Load(string parentId, int pageindex, int pagesize) { IQueryable categories; int total = 0; - if (parentId == Guid.Empty) + if (parentId == string.Empty) { categories = _unitWork.Find(pageindex, pagesize); total = _repository.GetCount(); @@ -66,8 +66,6 @@ namespace OpenAuth.App c.ParentId, ParentName = category.Name, c.SortNo, - c.RootName, - c.RootKey, c.Status, c.Id }; @@ -83,14 +81,14 @@ namespace OpenAuth.App /// /// 获取当前组织的所有下级组织 /// - private Guid[] GetSubCategories(Guid orgId) + private string[] GetSubCategories(string orgId) { var category = Find(orgId); var categories = _repository.Find(u => u.CascadeId.Contains(category.CascadeId)).Select(u => u.Id).ToArray(); return categories; } - public Category Find(Guid id) + public Category Find(string id) { var category = _repository.FindSingle(u => u.Id == id); if (category == null) return new Category(); @@ -98,7 +96,7 @@ namespace OpenAuth.App return category; } - public void Delete(Guid[] ids) + public void Delete(string[] ids) { _repository.Delete(u =>ids.Contains(u.Id)); } @@ -109,7 +107,7 @@ namespace OpenAuth.App model.CopyTo(category); ChangeModuleCascade(category); - if (category.Id == Guid.Empty) + if (category.Id == string.Empty) { _repository.Add(category); } @@ -145,7 +143,7 @@ namespace OpenAuth.App if (currentCascadeId <= objCascadeId) currentCascadeId = objCascadeId + 1; } - if (org.ParentId != null && org.ParentId != Guid.Empty) + if (org.ParentId != null && org.ParentId != string.Empty) { var parentOrg = _repository.FindSingle(o => o.Id == org.ParentId); if (parentOrg != null) diff --git a/OpenAuth.App/Extention/WF_RuntimeInitModel.cs b/OpenAuth.App/Extention/WF_RuntimeInitModel.cs index 58490976..f6f682ca 100644 --- a/OpenAuth.App/Extention/WF_RuntimeInitModel.cs +++ b/OpenAuth.App/Extention/WF_RuntimeInitModel.cs @@ -8,7 +8,7 @@ namespace OpenAuth.App.Extention /// /// GUID /// - public Guid processId { get; set; } + public string processId { get; set; } /// /// 工作流模板内容 /// diff --git a/OpenAuth.App/ModuleElementManagerApp.cs b/OpenAuth.App/ModuleElementManagerApp.cs index 26ea90f1..1b4790f5 100644 --- a/OpenAuth.App/ModuleElementManagerApp.cs +++ b/OpenAuth.App/ModuleElementManagerApp.cs @@ -41,7 +41,7 @@ namespace OpenAuth.App _moduleEleManService.AddOrUpdate(newbtn); } - public IEnumerable LoadByModuleId(Guid id) + public IEnumerable LoadByModuleId(string id) { string username = AuthUtil.GetUserName(); return _moduleEleManService.LoadByModuleId(username, id); @@ -56,13 +56,13 @@ namespace OpenAuth.App /// 当为UserElement时,表示UserId /// /// 模块ID - public List LoadWithAccess(string accessType, Guid firstId, Guid moduleId) + public List LoadWithAccess(string accessType, string firstId, string moduleId) { string username = AuthUtil.GetUserName(); return _moduleEleManService.LoadWithAccess(username, accessType, firstId, moduleId); } - public void Delete(Guid[] objs) + public void Delete(string[] objs) { _moduleEleManService.Delete(objs); } diff --git a/OpenAuth.App/ModuleManagerApp.cs b/OpenAuth.App/ModuleManagerApp.cs index 71e06fe9..bda6790e 100644 --- a/OpenAuth.App/ModuleManagerApp.cs +++ b/OpenAuth.App/ModuleManagerApp.cs @@ -20,12 +20,12 @@ namespace OpenAuth.App /// /// 加载一个节点下面的所有 /// - public dynamic Load(Guid parentId, int pageindex, int pagesize) + public dynamic Load(string parentId, int pageindex, int pagesize) { return _moduleManService.Load(AuthUtil.GetUserName(), parentId, pageindex, pagesize); } - public void Delete(Guid id) + public void Delete(string id) { _moduleManService.Delete(id); } @@ -44,7 +44,7 @@ namespace OpenAuth.App /// TODO:这里会加载用户及用户角色的所有模块,“为用户分配模块”功能会给人一种混乱的感觉,但可以接受 /// /// The user unique identifier. - public List LoadForUser(Guid userId) + public List LoadForUser(string userId) { return _moduleManService.LoadForUser(userId); } @@ -53,7 +53,7 @@ namespace OpenAuth.App /// 加载特定角色的模块 /// /// The role unique identifier. - public List LoadForRole(Guid roleId) + public List LoadForRole(string roleId) { return _moduleManService.LoadForRole(roleId); } diff --git a/OpenAuth.App/OrgManagerApp.cs b/OpenAuth.App/OrgManagerApp.cs index 4587fdc0..8d17b9a8 100644 --- a/OpenAuth.App/OrgManagerApp.cs +++ b/OpenAuth.App/OrgManagerApp.cs @@ -29,7 +29,7 @@ namespace OpenAuth.App /// /// The org unique identifier. /// IEnumerable{Org}. - public IList LoadDirectChildren(Guid orgId) + public IList LoadDirectChildren(string orgId) { return _repository.Find(u => u.ParentId == orgId).ToList(); } @@ -38,7 +38,7 @@ namespace OpenAuth.App /// 得到部门的所有子部门 /// 如果orgId为0,表示取得所有部门 /// - public GridData LoadAllChildren(Guid orgId) + public GridData LoadAllChildren(string orgId) { var query = _repository.GetSubOrgs(orgId); return new GridData @@ -57,10 +57,10 @@ namespace OpenAuth.App /// The org. /// System.Int32. /// 未能找到该组织的父节点信息 - public Guid AddOrUpdate(Org org) + public string AddOrUpdate(Org org) { ChangeModuleCascade(org); - if (org.Id == Guid.Empty) + if (org.Id == string.Empty) { _repository.Add(org); } @@ -88,7 +88,7 @@ namespace OpenAuth.App /// /// 删除指定ID的部门及其所有子部门 /// - public void DelOrg(Guid[] ids) + public void DelOrg(string[] ids) { var delOrg = _repository.Find(u => ids.Contains(u.Id)).ToList(); foreach (var org in delOrg) @@ -103,7 +103,7 @@ namespace OpenAuth.App /// TODO:这里会加载用户及用户角色的所有角色,“为用户分配角色”功能会给人一种混乱的感觉,但可以接受 /// /// The user unique identifier. - public List LoadForUser(Guid userId) + public List LoadForUser(string userId) { //用户角色 var userRoleIds = @@ -124,7 +124,7 @@ namespace OpenAuth.App /// 加载特定角色的角色 /// /// The role unique identifier. - public List LoadForRole(Guid roleId) + public List LoadForRole(string roleId) { var moduleIds = _relevanceRepository.Find(u => u.FirstId == roleId && u.Key == "RoleOrg") @@ -148,7 +148,7 @@ namespace OpenAuth.App if (currentCascadeId <= objCascadeId) currentCascadeId = objCascadeId + 1; } - if (org.ParentId != null && org.ParentId != Guid.Empty) + if (org.ParentId != null && org.ParentId != string.Empty) { var parentOrg = _repository.FindSingle(o => o.Id == org.ParentId); if (parentOrg != null) diff --git a/OpenAuth.App/ResourceManagerApp.cs b/OpenAuth.App/ResourceManagerApp.cs index 1c30f775..044cb7c5 100644 --- a/OpenAuth.App/ResourceManagerApp.cs +++ b/OpenAuth.App/ResourceManagerApp.cs @@ -19,7 +19,7 @@ namespace OpenAuth.App _resManagerService = resManagerService; } - public int GetResourceCntInOrg(Guid orgId) + public int GetResourceCntInOrg(string orgId) { return _resManagerService.GetResourceCntInOrg(orgId); } @@ -32,14 +32,14 @@ namespace OpenAuth.App /// /// 加载一个节点下面的一个或全部Resources /// - public dynamic Load(string username, Guid categoryId, int pageindex, int pagesize) + public dynamic Load(string username, string categoryId, int pageindex, int pagesize) { return _resManagerService.Load(username, categoryId, pageindex, pagesize); } - public void Delete(Guid[] ids) + public void Delete(string[] ids) { _resManagerService.Delete(ids); } @@ -61,7 +61,7 @@ namespace OpenAuth.App /// 当为UserResource时,表示UserId /// /// 分类ID - public List LoadWithAccess(string username, string accessType, Guid firstId, Guid cId) + public List LoadWithAccess(string username, string accessType, string firstId, string cId) { return _resManagerService.LoadWithAccess(username, accessType, firstId, cId); } diff --git a/OpenAuth.App/RevelanceManagerApp.cs b/OpenAuth.App/RevelanceManagerApp.cs index 1c2e3ada..8ab67257 100644 --- a/OpenAuth.App/RevelanceManagerApp.cs +++ b/OpenAuth.App/RevelanceManagerApp.cs @@ -25,7 +25,7 @@ namespace OpenAuth.App /// 比如给用户分配资源,那么firstId就是用户ID,secIds就是资源ID列表 /// /// 关联的类型,如"UserResource" - public void Assign(string type, Guid firstId, Guid[] secIds) + public void Assign(string type, string firstId, string[] secIds) { _relevanceRepository.AddRelevance(type, secIds.ToLookup(u => firstId)); } @@ -36,7 +36,7 @@ namespace OpenAuth.App /// 关联的类型,如"UserResource" /// The first identifier. /// The sec ids. - public void UnAssign(string type, Guid firstId, Guid[] secIds) + public void UnAssign(string type, string firstId, string[] secIds) { _relevanceRepository.DeleteBy(type, secIds.ToLookup(u =>firstId)); } diff --git a/OpenAuth.App/RoleManagerApp.cs b/OpenAuth.App/RoleManagerApp.cs index e63df70a..e1acd29b 100644 --- a/OpenAuth.App/RoleManagerApp.cs +++ b/OpenAuth.App/RoleManagerApp.cs @@ -24,9 +24,9 @@ namespace OpenAuth.App _relevanceRepository = relevanceRepository; } - public int GetRoleCntInOrg(Guid orgId) + public int GetRoleCntInOrg(string orgId) { - if (orgId == Guid.Empty) + if (orgId == string.Empty) { return _repository.Find(null).Count(); } @@ -39,12 +39,12 @@ namespace OpenAuth.App /// /// 加载一个部门及子部门全部Roles /// - public GridData Load(Guid orgId, int pageindex, int pagesize) + public GridData Load(string orgId, int pageindex, int pagesize) { if (pageindex < 1) pageindex = 1; //TODO:如果列表为空新增加一个用户后,前端会传一个0过来,奇怪?? IEnumerable roles; int total = 0; - if (orgId == Guid.Empty) + if (orgId == string.Empty) { roles = _repository.LoadRoles(pageindex, pagesize); total = _repository.GetCount(); @@ -79,20 +79,20 @@ namespace OpenAuth.App /// /// 获取当前组织的所有下级组织 /// - private Guid[] GetSubOrgIds(Guid orgId) + private string[] GetSubOrgIds(string orgId) { var orgs = _orgRepository.GetSubOrgs(orgId).Select(u => u.Id).ToArray(); return orgs; } - public Role Find(Guid id) + public Role Find(string id) { var role = _repository.FindSingle(u => u.Id == id); if (role == null) role = new Role(); return role; } - public void Delete(Guid id) + public void Delete(string id) { _repository.Delete(id); } @@ -100,7 +100,7 @@ namespace OpenAuth.App public void AddOrUpdate(JObject obj) { var role = obj.ToObject(); - if (role.Id == Guid.Empty) + if (role.Id == string.Empty) { role.CreateTime = DateTime.Now; _repository.Add(role); @@ -110,18 +110,18 @@ namespace OpenAuth.App _repository.Update(role); } - Guid[] orgIds = obj["OrganizationIds"].ToString().Split(',').Select(id => Guid.Parse(id)).ToArray(); + string[] orgIds = obj["OrganizationIds"].ToString().Split(',').ToArray(); _relevanceRepository.DeleteBy("RoleOrg", role.Id); _relevanceRepository.AddRelevance("RoleOrg", orgIds.ToLookup(u => role.Id)); } - public List LoadForUser(Guid userId) + public List LoadForUser(string userId) { return _repository.LoadForUser(userId).ToList(); } - public List LoadForOrgAndUser(Guid orgId, Guid userId) + public List LoadForOrgAndUser(string orgId, string userId) { var userroles = LoadForUser(userId); var orgroles = _repository.LoadInOrgs(GetSubOrgIds(orgId)).ToList(); @@ -139,7 +139,7 @@ namespace OpenAuth.App return rolevms; } - public List GetUsersInRole(string ruleName) + public List GetUsersInRole(string ruleName) { var role = _repository.FindSingle(u => u.Name == ruleName); if (role == null) return null; diff --git a/OpenAuth.App/SSO/SSOAuthUtil.cs b/OpenAuth.App/SSO/SSOAuthUtil.cs index 7b38abd0..8e8e93bd 100644 --- a/OpenAuth.App/SSO/SSOAuthUtil.cs +++ b/OpenAuth.App/SSO/SSOAuthUtil.cs @@ -29,7 +29,7 @@ namespace OpenAuth.App.SSO { userInfo = new User { - Id = Guid.Empty, + Id = string.Empty, Account = "System", Name ="Ա", Password = "123456" diff --git a/OpenAuth.App/StockManagerApp.cs b/OpenAuth.App/StockManagerApp.cs index d515cef8..7587ba7a 100644 --- a/OpenAuth.App/StockManagerApp.cs +++ b/OpenAuth.App/StockManagerApp.cs @@ -17,12 +17,12 @@ namespace OpenAuth.App /// /// 根据部门ID得到进出库信息 /// - public dynamic Load(string username, Guid orgId, int page, int rows) + public dynamic Load(string username, string orgId, int page, int rows) { return _service.Load(username, orgId, page, rows); } - public void Delete(Guid[] id) + public void Delete(string[] id) { _service.Delete(id); } diff --git a/OpenAuth.App/UserManagerApp.cs b/OpenAuth.App/UserManagerApp.cs index f303e13c..1ef0a470 100644 --- a/OpenAuth.App/UserManagerApp.cs +++ b/OpenAuth.App/UserManagerApp.cs @@ -28,9 +28,9 @@ namespace OpenAuth.App return _repository.FindSingle(u => u.Account == account); } - public int GetUserCntInOrg(Guid orgId) + public int GetUserCntInOrg(string orgId) { - if (orgId == Guid.Empty) + if (orgId == string.Empty) { return _repository.Find(null).Count(); } @@ -43,12 +43,12 @@ namespace OpenAuth.App /// /// 加载一个部门及子部门全部用户 /// - public GridData Load(Guid orgId, int pageindex, int pagesize) + public GridData Load(string orgId, int pageindex, int pagesize) { if (pageindex < 1) pageindex = 1; //TODO:如果列表为空新增加一个用户后,前端会传一个0过来,奇怪?? IEnumerable users; int records = 0; - if (orgId ==Guid.Empty) + if (orgId ==string.Empty) { users = _repository.LoadUsers(pageindex, pagesize); records = _repository.GetCount(); @@ -81,14 +81,14 @@ namespace OpenAuth.App /// /// 获取当前组织的所有下级组织 /// - private Guid[] GetSubOrgIds(Guid orgId) + private string[] GetSubOrgIds(string orgId) { var org = _orgRepository.FindSingle(u => u.Id == orgId); var orgs = _orgRepository.Find(u => u.CascadeId.Contains(org.CascadeId)).Select(u => u.Id).ToArray(); return orgs; } - public UserView Find(Guid id) + public UserView Find(string id) { var user = _repository.FindSingle(u => u.Id == id); if (user == null) return new UserView(); @@ -104,7 +104,7 @@ namespace OpenAuth.App return view; } - public void Delete(Guid[] ids) + public void Delete(string[] ids) { _repository.Delete(u => ids.Contains(u.Id)); _relevanceRepository.DeleteBy("UserOrg", ids); @@ -117,7 +117,7 @@ namespace OpenAuth.App if (string.IsNullOrEmpty(view.OrganizationIds)) throw new Exception("请为用户分配机构"); User user = view; - if (user.Id == Guid.Empty) + if (user.Id == string.Empty) { if (_repository.IsExist(u => u.Account == view.Account)) { @@ -140,13 +140,13 @@ namespace OpenAuth.App Type = user.Type }); } - Guid[] orgIds = view.OrganizationIds.Split(',').Select(id => Guid.Parse(id)).ToArray(); + string[] orgIds = view.OrganizationIds.Split(',').ToArray(); _relevanceRepository.DeleteBy("UserOrg", user.Id); _relevanceRepository.AddRelevance("UserOrg", orgIds.ToLookup(u => user.Id)); } - public IEnumerable GetUsers(IEnumerable userids) + public IEnumerable GetUsers(IEnumerable userids) { return _repository.Find(u => userids.Contains(u.Id)); } diff --git a/OpenAuth.App/ViewModel/ModuleView.cs b/OpenAuth.App/ViewModel/ModuleView.cs index a0ba3b9a..b1fabf00 100644 --- a/OpenAuth.App/ViewModel/ModuleView.cs +++ b/OpenAuth.App/ViewModel/ModuleView.cs @@ -11,7 +11,7 @@ namespace OpenAuth.App.ViewModel /// ID /// /// - public Guid Id { get; set; } + public string Id { get; set; } /// /// 名称 @@ -29,7 +29,7 @@ namespace OpenAuth.App.ViewModel /// 父节点流水号 /// /// - public Guid? ParentId { get; set; } + public string ParentId { get; set; } /// /// 节点图标文件名称 diff --git a/OpenAuth.App/ViewModel/RoleVM.cs b/OpenAuth.App/ViewModel/RoleVM.cs index d9239ba6..9b7936c7 100644 --- a/OpenAuth.App/ViewModel/RoleVM.cs +++ b/OpenAuth.App/ViewModel/RoleVM.cs @@ -24,7 +24,7 @@ namespace OpenAuth.App.ViewModel /// 用户ID /// /// - public Guid Id { get; set; } + public string Id { get; set; } /// /// 名称 diff --git a/OpenAuth.App/ViewModel/UserView.cs b/OpenAuth.App/ViewModel/UserView.cs index 5de98324..fc5b99f9 100644 --- a/OpenAuth.App/ViewModel/UserView.cs +++ b/OpenAuth.App/ViewModel/UserView.cs @@ -12,7 +12,7 @@ namespace OpenAuth.App.ViewModel /// 用户ID /// /// - public Guid Id { get; set; } + public string Id { get; set; } /// diff --git a/OpenAuth.App/WFFormService.cs b/OpenAuth.App/WFFormService.cs index 346bd94a..8ee59f24 100644 --- a/OpenAuth.App/WFFormService.cs +++ b/OpenAuth.App/WFFormService.cs @@ -25,12 +25,12 @@ namespace OpenAuth.App return _unitWork.Find(null).ToList(); } - public WFFrmMain GetForm(Guid keyValue) + public WFFrmMain GetForm(string keyValue) { return _unitWork.FindSingle(u => u.Id == keyValue); } - public void RemoveForm(Guid[] keyValue) + public void RemoveForm(string[] keyValue) { _unitWork.Delete(u =>keyValue.Contains(u.Id)); } @@ -58,7 +58,7 @@ namespace OpenAuth.App } else { - entity.Id = Guid.Parse(keyValue); + entity.Id = keyValue; _unitWork.Update(u =>u.Id, entity); } _unitWork.Save(); diff --git a/OpenAuth.App/WFProcessInstanceService.cs b/OpenAuth.App/WFProcessInstanceService.cs index a03a3c93..12fc161b 100644 --- a/OpenAuth.App/WFProcessInstanceService.cs +++ b/OpenAuth.App/WFProcessInstanceService.cs @@ -29,7 +29,7 @@ namespace OpenAuth.App /// /// /// - public WFProcessInstance GetEntity(Guid keyVlaue) + public WFProcessInstance GetEntity(string keyVlaue) { try { @@ -50,11 +50,11 @@ namespace OpenAuth.App /// /// /// - public int SaveProcess(Guid processId, WFProcessInstance processInstanceEntity, WFProcessScheme processSchemeEntity, WFProcessOperationHistory wfOperationHistoryEntity = null) + public int SaveProcess(string processId, WFProcessInstance processInstanceEntity, WFProcessScheme processSchemeEntity, WFProcessOperationHistory wfOperationHistoryEntity = null) { try { - if (Guid.Empty ==(processInstanceEntity.Id)) + if (string.Empty ==(processInstanceEntity.Id)) { _unitWork.Add(processSchemeEntity); @@ -97,13 +97,13 @@ namespace OpenAuth.App { try { - if (Guid.Empty == (processInstanceEntity.Id)) + if (string.Empty == (processInstanceEntity.Id)) { processSchemeEntity.Create(); _unitWork.Add(processSchemeEntity); processInstanceEntity.Create(); - processInstanceEntity.Id = Guid.Parse(wfRuntimeModel.processId); + processInstanceEntity.Id = (string)(wfRuntimeModel.processId); processInstanceEntity.ProcessSchemeId = processSchemeEntity.Id; _unitWork.Add(processInstanceEntity); } @@ -211,7 +211,7 @@ namespace OpenAuth.App /// /// 主键 /// - public int DeleteProcess(Guid keyValue) + public int DeleteProcess(string keyValue) { try { @@ -232,7 +232,7 @@ namespace OpenAuth.App /// /// 0暂停,1启用,2取消(召回) /// - public int OperateVirtualProcess(Guid keyValue,int state) + public int OperateVirtualProcess(string keyValue,int state) { try { @@ -288,7 +288,7 @@ namespace OpenAuth.App /// /// /// - public void DesignateProcess(Guid processId, string makeLists) + public void DesignateProcess(string processId, string makeLists) { try { @@ -345,7 +345,7 @@ namespace OpenAuth.App /// 备注 /// 表单数据信息 /// - public bool CreateInstance(Guid processId, Guid schemeInfoId, WFProcessInstance WFProcessInstance, string frmData = null) + public bool CreateInstance(string processId, string schemeInfoId, WFProcessInstance WFProcessInstance, string frmData = null) { try @@ -441,7 +441,7 @@ namespace OpenAuth.App /// /// /// - public bool NodeVerification(Guid processId, bool flag, string description = "") + public bool NodeVerification(string processId, bool flag, string description = "") { bool _res = false; try @@ -620,7 +620,7 @@ namespace OpenAuth.App /// /// /// - public bool NodeReject(Guid processId, string nodeId, string description = "") + public bool NodeReject(string processId, string nodeId, string description = "") { try { @@ -690,7 +690,7 @@ namespace OpenAuth.App /// 召回流程进程 /// /// - public void CallingBackProcess(Guid processId) + public void CallingBackProcess(string processId) { try { @@ -706,7 +706,7 @@ namespace OpenAuth.App /// /// /// - public void KillProcess(Guid processId) + public void KillProcess(string processId) { try { @@ -989,7 +989,7 @@ namespace OpenAuth.App return resStr; } - public WFProcessScheme GetProcessSchemeEntity(Guid keyValue) + public WFProcessScheme GetProcessSchemeEntity(string keyValue) { return _unitWork.FindSingle(u => u.Id == keyValue); } @@ -1000,7 +1000,7 @@ namespace OpenAuth.App /// /// The key value. /// WFProcessScheme. - public WFProcessScheme GetProcessSchemeByUserId(Guid keyValue) + public WFProcessScheme GetProcessSchemeByUserId(string keyValue) { var entity = GetProcessSchemeEntity(keyValue); entity.SchemeContent = GetProcessSchemeContentByUserId(entity.SchemeContent, AuthUtil.GetCurrentUser().User.Id.ToString()); @@ -1015,14 +1015,14 @@ namespace OpenAuth.App /// The key value. /// The node identifier. /// WFProcessScheme. - public WFProcessScheme GetProcessSchemeEntityByNodeId(Guid keyValue, string nodeId) + public WFProcessScheme GetProcessSchemeEntityByNodeId(string keyValue, string nodeId) { var entity = GetProcessSchemeEntity(keyValue); entity.SchemeContent = GetProcessSchemeContentByNodeId(entity.SchemeContent, nodeId); return entity; } - public WFProcessInstance GetProcessInstanceEntity(Guid keyValue) + public WFProcessInstance GetProcessInstanceEntity(string keyValue) { return _unitWork.FindSingle(u => u.Id == keyValue); } @@ -1033,7 +1033,7 @@ namespace OpenAuth.App /// /// The process identifier. /// The verification data. - public void VerificationProcess(Guid processId, string verificationData) + public void VerificationProcess(string processId, string verificationData) { try { diff --git a/OpenAuth.App/WFSchemeService.cs b/OpenAuth.App/WFSchemeService.cs index 3e8e2e40..77374008 100644 --- a/OpenAuth.App/WFSchemeService.cs +++ b/OpenAuth.App/WFSchemeService.cs @@ -41,7 +41,7 @@ namespace OpenAuth.App } else { - Guid schemeid = Guid.Parse(keyValue); + string schemeid = (string)(keyValue); WFSchemeContent modelentityold = _unitWork.FindSingle(u => u.SchemeVersion == entity.SchemeVersion && u.SchemeInfoId == schemeid); @@ -66,7 +66,7 @@ namespace OpenAuth.App { modelentity.SchemeVersion = modelentityold.SchemeVersion; } - entity.Id = Guid.Parse(keyValue); + entity.Id = keyValue; entity.SchemeVersion = modelentity.SchemeVersion; _unitWork.Update(entity); } @@ -80,18 +80,18 @@ namespace OpenAuth.App } } - public void RemoveForm(Guid[] keyValue) + public void RemoveForm(string[] keyValue) { _unitWork.Delete(u =>keyValue.Contains(u.Id)); _unitWork.Delete(u =>keyValue.Contains(u.SchemeInfoId)); } - public WFSchemeInfo GetEntity(Guid keyValue) + public WFSchemeInfo GetEntity(string keyValue) { return _unitWork.FindSingle(u => u.Id == keyValue); } - public WFSchemeContent GetSchemeEntity(Guid schemeinfoId, string schemeinfoSchemeVersion) + public WFSchemeContent GetSchemeEntity(string schemeinfoId, string schemeinfoSchemeVersion) { return _unitWork.FindSingle(u => u.SchemeInfoId == schemeinfoId && u.SchemeVersion == schemeinfoSchemeVersion); diff --git a/OpenAuth.Domain/Core/Application.cs b/OpenAuth.Domain/Core/Application.cs new file mode 100644 index 00000000..7a1b3ba3 --- /dev/null +++ b/OpenAuth.Domain/Core/Application.cs @@ -0,0 +1,66 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 应用 + /// + public partial class Application : Entity + { + public Application() + { + this.Name= string.Empty; + this.AppId= string.Empty; + this.AppKey= string.Empty; + this.Description= string.Empty; + this.Icon= string.Empty; + this.CreateTime= DateTime.Now; + this.CreateUser= string.Empty; + } + + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 应用ID + /// + public string AppId { get; set; } + /// + /// 应用密钥 + /// + public string AppKey { get; set; } + /// + /// 应用描述 + /// + public string Description { get; set; } + /// + /// 应用图标 + /// + public string Icon { get; set; } + /// + /// 是否可用 + /// + public bool Disable { get; set; } + /// + /// 创建日期 + /// + public System.DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + public string CreateUser { get; set; } + + } +} \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Category.cs b/OpenAuth.Domain/Core/Category.cs index 83445d2e..9074e2bf 100644 --- a/OpenAuth.Domain/Core/Category.cs +++ b/OpenAuth.Domain/Core/Category.cs @@ -1,60 +1,62 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 分类表 - /// - public partial class Category :Entity - { - public Category() - { - this.CascadeId= string.Empty; - this.Name= string.Empty; - this.Status= 0; - this.SortNo= 0; - this.RootKey= string.Empty; - this.RootName= string.Empty; - } - - /// - /// 节点语义ID - /// - public string CascadeId { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 当前状态 - /// - public int Status { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - /// - /// 分类所属科目 - /// - public string RootKey { get; set; } - /// - /// 分类所属科目名称 - /// - public string RootName { get; set; } - /// - /// 父节点流水号 - /// - public System.Guid? ParentId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 分类表 + /// + public partial class Category : Entity + { + public Category() + { + this.CascadeId= string.Empty; + this.Name= string.Empty; + this.Code= string.Empty; + this.Status= 0; + this.SortNo= 0; + this.TypeId= string.Empty; + this.ParentId= string.Empty; + } + + /// + /// 节点语义ID + /// + public string CascadeId { get; set; } + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 编号 + /// + public string Code { get; set; } + /// + /// 当前状态 + /// + public int Status { get; set; } + /// + /// 排序号 + /// + public int SortNo { get; set; } + /// + /// 分类所属科目 + /// + public string TypeId { get; set; } + /// + /// 父节点流水号 + /// + public string ParentId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/DicIndex.cs b/OpenAuth.Domain/Core/CategoryType.cs similarity index 57% rename from OpenAuth.Domain/Core/DicIndex.cs rename to OpenAuth.Domain/Core/CategoryType.cs index 6c401028..c68dcbc3 100644 --- a/OpenAuth.Domain/Core/DicIndex.cs +++ b/OpenAuth.Domain/Core/CategoryType.cs @@ -1,50 +1,47 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 数据字典 - /// - public partial class DicIndex :Entity - { - public DicIndex() - { - this.Name= string.Empty; - this.Key= string.Empty; - this.SortNo= 0; - this.Description= string.Empty; - } - - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// - /// - public string Key { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - /// - /// 描述 - /// - public string Description { get; set; } - /// - /// 所属分类 - /// - public System.Guid? CategoryId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 分类类型 + /// + public partial class CategoryType : Entity + { + public CategoryType() + { + this.Name= string.Empty; + this.Code= string.Empty; + this.CreateTime= DateTime.Now; + this.CreateUser= string.Empty; + } + + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 编码 + /// + public string Code { get; set; } + /// + /// 创建日期 + /// + public System.DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + public string CreateUser { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/DicDetail.cs b/OpenAuth.Domain/Core/DicDetail.cs deleted file mode 100644 index 54baa908..00000000 --- a/OpenAuth.Domain/Core/DicDetail.cs +++ /dev/null @@ -1,55 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 数据字典详情 - /// - public partial class DicDetail :Entity - { - public DicDetail() - { - this.Value= string.Empty; - this.Text= string.Empty; - this.SortNo= 0; - this.Status= 0; - this.Description= string.Empty; - } - - /// - /// 值 - /// - public string Value { get; set; } - /// - /// 文本描述 - /// - public string Text { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - /// - /// 状态 - /// - public int Status { get; set; } - /// - /// 描述 - /// - public string Description { get; set; } - /// - /// 所属字典ID - /// - public System.Guid DicId { get; set; } - - } -} \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Entity.cs b/OpenAuth.Domain/Core/Entity.cs index 9078e2ef..b5a292f9 100644 --- a/OpenAuth.Domain/Core/Entity.cs +++ b/OpenAuth.Domain/Core/Entity.cs @@ -4,11 +4,11 @@ namespace OpenAuth.Domain { public abstract class Entity { - public System.Guid Id { get; set; } + public string Id { get; set; } public Entity() { - Id = Guid.NewGuid(); + Id = Guid.NewGuid().ToString(); } } } diff --git a/OpenAuth.Domain/Core/Module.cs b/OpenAuth.Domain/Core/Module.cs index e9488e10..1b105d3b 100644 --- a/OpenAuth.Domain/Core/Module.cs +++ b/OpenAuth.Domain/Core/Module.cs @@ -1,83 +1,85 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 功能模块表 - /// - public partial class Module:Entity - { - public Module() - { - this.CascadeId= string.Empty; - this.Name= string.Empty; - this.Url= string.Empty; - this.HotKey= string.Empty; - this.IconName= string.Empty; - this.Status= 0; - this.ParentName= string.Empty; - this.Vector= string.Empty; - this.SortNo= 0; - } - - /// - /// 节点语义ID - /// - public string CascadeId { get; set; } - /// - /// 功能模块名称 - /// - public string Name { get; set; } - /// - /// 主页面URL - /// - public string Url { get; set; } - /// - /// 热键 - /// - public string HotKey { get; set; } - /// - /// 父节点流水号 - /// - public Guid? ParentId { get; set; } - /// - /// 是否叶子节点 - /// - public bool IsLeaf { get; set; } - /// - /// 是否自动展开 - /// - public bool IsAutoExpand { get; set; } - /// - /// 节点图标文件名称 - /// - public string IconName { get; set; } - /// - /// 当前状态 - /// - public int Status { get; set; } - /// - /// 父节点名称 - /// - public string ParentName { get; set; } - /// - /// 矢量图标 - /// - public string Vector { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 功能模块表 + /// + public partial class Module : Entity + { + public Module() + { + this.CascadeId= string.Empty; + this.Name= string.Empty; + this.Url= string.Empty; + this.HotKey= string.Empty; + this.IconName= string.Empty; + this.Status= 0; + this.ParentName= string.Empty; + this.Vector= string.Empty; + this.SortNo= 0; + this.ParentId= string.Empty; + } + + /// + /// 节点语义ID + /// + public string CascadeId { get; set; } + /// + /// 功能模块名称 + /// + public string Name { get; set; } + /// + /// 主页面URL + /// + public string Url { get; set; } + /// + /// 热键 + /// + public string HotKey { get; set; } + /// + /// 是否叶子节点 + /// + public bool IsLeaf { get; set; } + /// + /// 是否自动展开 + /// + public bool IsAutoExpand { get; set; } + /// + /// 节点图标文件名称 + /// + public string IconName { get; set; } + /// + /// 当前状态 + /// + public int Status { get; set; } + /// + /// 父节点名称 + /// + public string ParentName { get; set; } + /// + /// 矢量图标 + /// + public string Vector { get; set; } + /// + /// 排序号 + /// + public int SortNo { get; set; } + /// + /// 父节点流水号 + /// + public string ParentId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/ModuleElement.cs b/OpenAuth.Domain/Core/ModuleElement.cs index 9de4abba..8a780fa8 100644 --- a/OpenAuth.Domain/Core/ModuleElement.cs +++ b/OpenAuth.Domain/Core/ModuleElement.cs @@ -1,75 +1,77 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 模块元素表(需要权限控制的按钮) - /// - public partial class ModuleElement :Entity - { - public ModuleElement() - { - this.DomId= string.Empty; - this.Name= string.Empty; - this.Type= string.Empty; - this.Attr= string.Empty; - this.Script= string.Empty; - this.Icon= string.Empty; - this.Class= string.Empty; - this.Remark= string.Empty; - this.Sort= 0; - } - - /// - /// DOM ID - /// - public string DomId { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 类型 - /// - public string Type { get; set; } - /// - /// 元素附加属性 - /// - public string Attr { get; set; } - /// - /// 元素调用脚本 - /// - public string Script { get; set; } - /// - /// 元素图标 - /// - public string Icon { get; set; } - /// - /// 元素样式 - /// - public string Class { get; set; } - /// - /// 备注 - /// - public string Remark { get; set; } - /// - /// 排序字段 - /// - public int Sort { get; set; } - /// - /// - /// - public System.Guid ModuleId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 模块元素表(需要权限控制的按钮) + /// + public partial class ModuleElement : Entity + { + public ModuleElement() + { + this.DomId= string.Empty; + this.Name= string.Empty; + this.Type= string.Empty; + this.Attr= string.Empty; + this.Script= string.Empty; + this.Icon= string.Empty; + this.Class= string.Empty; + this.Remark= string.Empty; + this.Sort= 0; + this.ModuleId= string.Empty; + } + + /// + /// DOM ID + /// + public string DomId { get; set; } + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 类型 + /// + public string Type { get; set; } + /// + /// 元素附加属性 + /// + public string Attr { get; set; } + /// + /// 元素调用脚本 + /// + public string Script { get; set; } + /// + /// 元素图标 + /// + public string Icon { get; set; } + /// + /// 元素样式 + /// + public string Class { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + /// + /// 排序字段 + /// + public int Sort { get; set; } + /// + /// 功能模块Id + /// + public string ModuleId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Org.cs b/OpenAuth.Domain/Core/Org.cs index 6f26e901..890a2a05 100644 --- a/OpenAuth.Domain/Core/Org.cs +++ b/OpenAuth.Domain/Core/Org.cs @@ -1,98 +1,100 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 组织表 - /// - public partial class Org:Entity - { - public Org() - { - this.CascadeId= string.Empty; - this.Name= string.Empty; - this.HotKey= string.Empty; - this.ParentName= string.Empty; - this.IconName= string.Empty; - this.Status= 0; - this.Type= 0; - this.BizCode= string.Empty; - this.CustomCode= string.Empty; - this.CreateTime= DateTime.Now; - this.CreateId= 0; - this.SortNo= 0; - } - - /// - /// 节点语义ID - /// - public string CascadeId { get; set; } - /// - /// 组织名称 - /// - public string Name { get; set; } - /// - /// 热键 - /// - public string HotKey { get; set; } - /// - /// 父节点名称 - /// - public string ParentName { get; set; } - /// - /// 是否叶子节点 - /// - public bool IsLeaf { get; set; } - /// - /// 是否自动展开 - /// - public bool IsAutoExpand { get; set; } - /// - /// 节点图标文件名称 - /// - public string IconName { get; set; } - /// - /// 当前状态 - /// - public int Status { get; set; } - /// - /// 组织类型 - /// - public int Type { get; set; } - /// - /// 业务对照码 - /// - public string BizCode { get; set; } - /// - /// 自定义扩展码 - /// - public string CustomCode { get; set; } - /// - /// 创建时间 - /// - public System.DateTime CreateTime { get; set; } - /// - /// 创建人ID - /// - public int CreateId { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - /// - /// 父节点流水号 - /// - public System.Guid? ParentId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 组织表 + /// + public partial class Org : Entity + { + public Org() + { + this.CascadeId= string.Empty; + this.Name= string.Empty; + this.HotKey= string.Empty; + this.ParentName= string.Empty; + this.IconName= string.Empty; + this.Status= 0; + this.Type= 0; + this.BizCode= string.Empty; + this.CustomCode= string.Empty; + this.CreateTime= DateTime.Now; + this.CreateId= 0; + this.SortNo= 0; + this.ParentId= string.Empty; + } + + /// + /// 节点语义ID + /// + public string CascadeId { get; set; } + /// + /// 组织名称 + /// + public string Name { get; set; } + /// + /// 热键 + /// + public string HotKey { get; set; } + /// + /// 父节点名称 + /// + public string ParentName { get; set; } + /// + /// 是否叶子节点 + /// + public bool IsLeaf { get; set; } + /// + /// 是否自动展开 + /// + public bool IsAutoExpand { get; set; } + /// + /// 节点图标文件名称 + /// + public string IconName { get; set; } + /// + /// 当前状态 + /// + public int Status { get; set; } + /// + /// 组织类型 + /// + public int Type { get; set; } + /// + /// 业务对照码 + /// + public string BizCode { get; set; } + /// + /// 自定义扩展码 + /// + public string CustomCode { get; set; } + /// + /// 创建时间 + /// + public System.DateTime CreateTime { get; set; } + /// + /// 创建人ID + /// + public int CreateId { get; set; } + /// + /// 排序号 + /// + public int SortNo { get; set; } + /// + /// 父节点流水号 + /// + public string ParentId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Relevance.cs b/OpenAuth.Domain/Core/Relevance.cs index 0293dbe4..d2ead904 100644 --- a/OpenAuth.Domain/Core/Relevance.cs +++ b/OpenAuth.Domain/Core/Relevance.cs @@ -1,59 +1,62 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 多对多关系集中映射 - /// - public partial class Relevance :Entity - { - public Relevance() - { - this.Description= string.Empty; - this.Key= string.Empty; - this.Status= 0; - this.OperateTime= DateTime.Now; - this.OperatorId= 0; - } - - /// - /// 描述 - /// - public string Description { get; set; } - /// - /// - /// - public string Key { get; set; } - /// - /// 状态 - /// - public int Status { get; set; } - /// - /// 授权时间 - /// - public System.DateTime OperateTime { get; set; } - /// - /// 授权人 - /// - public int OperatorId { get; set; } - /// - /// 第一个表主键ID - /// - public System.Guid FirstId { get; set; } - /// - /// 第二个表主键ID - /// - public System.Guid SecondId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 多对多关系集中映射 + /// + public partial class Relevance : Entity + { + public Relevance() + { + this.Description= string.Empty; + this.Key= string.Empty; + this.Status= 0; + this.OperateTime= DateTime.Now; + this.OperatorId= string.Empty; + this.FirstId= string.Empty; + this.SecondId= string.Empty; + } + + /// + /// 描述 + /// + public string Description { get; set; } + /// + /// 映射标识 + /// + public string Key { get; set; } + /// + /// 状态 + /// + public int Status { get; set; } + /// + /// 授权时间 + /// + public System.DateTime OperateTime { get; set; } + /// + /// 授权人 + /// + public string OperatorId { get; set; } + /// + /// 第一个表主键ID + /// + public string FirstId { get; set; } + /// + /// 第二个表主键ID + /// + public string SecondId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Resource.cs b/OpenAuth.Domain/Core/Resource.cs index b148e11e..9872d3f1 100644 --- a/OpenAuth.Domain/Core/Resource.cs +++ b/OpenAuth.Domain/Core/Resource.cs @@ -1,64 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 资源表 - /// - public partial class Resource :Entity - { - public Resource() - { - this.CascadeId= string.Empty; - this.Key= string.Empty; - this.Name= string.Empty; - this.Status= 0; - this.SortNo= 0; - this.Description= string.Empty; - } - - /// - /// 节点语义ID - /// - public string CascadeId { get; set; } - /// - /// - /// - public string Key { get; set; } - /// - /// 名称 - /// - public string Name { get; set; } - /// - /// 当前状态 - /// - public int Status { get; set; } - /// - /// 排序号 - /// - public int SortNo { get; set; } - /// - /// 资源分类 - /// - public Guid? CategoryId { get; set; } - /// - /// 描述 - /// - public string Description { get; set; } - /// - /// 父节点流水号 - /// - public System.Guid? ParentId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 资源表 + /// + public partial class Resource : Entity + { + public Resource() + { + this.CascadeId= string.Empty; + this.Key= string.Empty; + this.Name= string.Empty; + this.Status= 0; + this.SortNo= 0; + this.Description= string.Empty; + this.ParentId= string.Empty; + this.CategoryId= string.Empty; + this.AppId= string.Empty; + } + + /// + /// 节点语义ID + /// + public string CascadeId { get; set; } + /// + /// 资源英文唯一标识 + /// + public string Key { get; set; } + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 当前状态 + /// + public int Status { get; set; } + /// + /// 排序号 + /// + public int SortNo { get; set; } + /// + /// 描述 + /// + public string Description { get; set; } + /// + /// 父节点流水号 + /// + public string ParentId { get; set; } + /// + /// 资源分类 + /// + public string CategoryId { get; set; } + /// + /// 资源所属应用 + /// + public string AppId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Role.cs b/OpenAuth.Domain/Core/Role.cs index 92e034de..f79ab465 100644 --- a/OpenAuth.Domain/Core/Role.cs +++ b/OpenAuth.Domain/Core/Role.cs @@ -1,51 +1,52 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 角色表 - /// - public partial class Role :Entity - { - public Role() - { - this.Name= string.Empty; - this.Status= 0; - this.Type= 0; - this.CreateTime= DateTime.Now; - this.CreateId= string.Empty; - } - - /// - /// 角色名称 - /// - public string Name { get; set; } - /// - /// 当前状态 - /// - public int Status { get; set; } - /// - /// 角色类型 - /// - public int Type { get; set; } - /// - /// 创建时间 - /// - public System.DateTime CreateTime { get; set; } - /// - /// 创建人ID - /// - public string CreateId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 角色表 + /// + public partial class Role : Entity + { + public Role() + { + this.Name= string.Empty; + this.Status= 0; + this.Type= 0; + this.CreateTime= DateTime.Now; + this.CreateId= string.Empty; + } + + /// + /// 角色名称 + /// + public string Name { get; set; } + /// + /// 当前状态 + /// + public int Status { get; set; } + /// + /// 角色类型 + /// + public int Type { get; set; } + /// + /// 创建时间 + /// + public System.DateTime CreateTime { get; set; } + /// + /// 创建人ID + /// + public string CreateId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/Stock.cs b/OpenAuth.Domain/Core/Stock.cs index e6a43401..3b6bbd49 100644 --- a/OpenAuth.Domain/Core/Stock.cs +++ b/OpenAuth.Domain/Core/Stock.cs @@ -1,60 +1,67 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// 出入库信息表 - /// - public partial class Stock :Entity - { - public Stock() - { - this.Name= string.Empty; - this.Number= 0; - this.Price= 0; - this.Status= 0; - this.Viewable = string.Empty; - this.Time= DateTime.Now; - } - - /// - /// 产品名称 - /// - public string Name { get; set; } - /// - /// 产品数量 - /// - public int Number { get; set; } - /// - /// 产品单价 - /// - public decimal Price { get; set; } - /// - /// 出库/入库 - /// - public int Status { get; set; } - /// - /// - /// - public string Viewable { get; set; } - /// - /// 操作时间 - /// - public System.DateTime Time { get; set; } - /// - /// 组织ID - /// - public System.Guid? OrgId { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 出入库信息表 + /// + public partial class Stock : Entity + { + public Stock() + { + this.Name= string.Empty; + this.Number= 0; + this.Price= 0; + this.Status= 0; + this.Viewable= string.Empty; + this.User= string.Empty; + this.Time= DateTime.Now; + this.OrgId= string.Empty; + } + + /// + /// 产品名称 + /// + public string Name { get; set; } + /// + /// 产品数量 + /// + public int Number { get; set; } + /// + /// 产品单价 + /// + public decimal Price { get; set; } + /// + /// 出库/入库 + /// + public int Status { get; set; } + /// + /// 可见范围 + /// + public string Viewable { get; set; } + /// + /// 操作人 + /// + public string User { get; set; } + /// + /// 操作时间 + /// + public System.DateTime Time { get; set; } + /// + /// 组织ID + /// + public string OrgId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/User.cs b/OpenAuth.Domain/Core/User.cs index 0ed7b3eb..3fc7ecbf 100644 --- a/OpenAuth.Domain/Core/User.cs +++ b/OpenAuth.Domain/Core/User.cs @@ -1,69 +1,72 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ - -using System; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class User :Entity - { - public User() - { - this.Account= string.Empty; - this.Password= string.Empty; - this.Name= string.Empty; - this.Sex= 0; - this.Status= 0; - this.Type= 0; - this.BizCode= string.Empty; - this.CreateTime= DateTime.Now; - } - - /// - /// - /// - public string Account { get; set; } - /// - /// - /// - public string Password { get; set; } - /// - /// - /// - public string Name { get; set; } - /// - /// - /// - public int Sex { get; set; } - /// - /// - /// - public int Status { get; set; } - /// - /// - /// - public int Type { get; set; } - /// - /// - /// - public string BizCode { get; set; } - /// - /// - /// - public System.DateTime CreateTime { get; set; } - /// - /// - /// - public System.Guid? CrateId { get; set; } - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 用户基本信息表 + /// + public partial class User : Entity + { + public User() + { + this.Account= string.Empty; + this.Password= string.Empty; + this.Name= string.Empty; + this.Sex= 0; + this.Status= 0; + this.Type= 0; + this.BizCode= string.Empty; + this.CreateTime= DateTime.Now; + this.CrateId= string.Empty; + } + + /// + /// 用户登录帐号 + /// + public string Account { get; set; } + /// + /// 密码 + /// + public string Password { get; set; } + /// + /// 用户姓名 + /// + public string Name { get; set; } + /// + /// 性别 + /// + public int Sex { get; set; } + /// + /// 用户状态 + /// + public int Status { get; set; } + /// + /// 用户类型 + /// + public int Type { get; set; } + /// + /// 业务对照码 + /// + public string BizCode { get; set; } + /// + /// 经办时间 + /// + public System.DateTime CreateTime { get; set; } + /// + /// 创建人 + /// + public string CrateId { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFFrmMain.cs b/OpenAuth.Domain/Core/WFFrmMain.cs index 6cb982ef..17fb2d28 100644 --- a/OpenAuth.Domain/Core/WFFrmMain.cs +++ b/OpenAuth.Domain/Core/WFFrmMain.cs @@ -1,113 +1,113 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFFrmMain :Entity - { - public WFFrmMain() - { - this.FrmCode= string.Empty; - this.FrmName= string.Empty; - this.FrmType= string.Empty; - this.FrmDbId= string.Empty; - this.FrmTable= string.Empty; - this.FrmTableId= string.Empty; - this.FrmContent= string.Empty; - this.Description= string.Empty; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - this.ModifyDate= DateTime.Now; - this.ModifyUserId= string.Empty; - this.ModifyUserName= string.Empty; - } - - /// - /// - /// - public string FrmCode { get; set; } - /// - /// - /// - public string FrmName { get; set; } - /// - /// - /// - public string FrmType { get; set; } - /// - /// - /// - public string FrmDbId { get; set; } - /// - /// - /// - public string FrmTable { get; set; } - /// - /// - /// - public int? IsSystemTable { get; set; } - /// - /// - /// - public string FrmTableId { get; set; } - /// - /// - /// - public string FrmContent { get; set; } - /// - /// - /// - public int? SortCode { get; set; } - /// - /// - /// - public int? DeleteMark { get; set; } - /// - /// - /// - public int? EnabledMark { get; set; } - /// - /// - /// - public string Description { get; set; } - /// - /// - /// - public System.DateTime? CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - /// - /// - /// - public System.DateTime? ModifyDate { get; set; } - /// - /// - /// - public string ModifyUserId { get; set; } - /// - /// - /// - public string ModifyUserName { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 表单模板表 + /// + public partial class WFFrmMain : Entity + { + public WFFrmMain() + { + this.FrmCode= string.Empty; + this.FrmName= string.Empty; + this.FrmType= string.Empty; + this.FrmTable= string.Empty; + this.FrmTableId= string.Empty; + this.FrmContent= string.Empty; + this.FrmDbId= string.Empty; + this.Description= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + this.ModifyDate= DateTime.Now; + this.ModifyUserId= string.Empty; + this.ModifyUserName= string.Empty; + } + + /// + /// 表单编号 + /// + public string FrmCode { get; set; } + /// + /// 表单名称 + /// + public string FrmName { get; set; } + /// + /// 表单分类 + /// + public string FrmType { get; set; } + /// + /// 数据表 + /// + public string FrmTable { get; set; } + /// + /// 关联表的主键 + /// + public string FrmTableId { get; set; } + /// + /// 是否需要建表0不建表,1建表 + /// + public int? IsSystemTable { get; set; } + /// + /// 表单内容 + /// + public string FrmContent { get; set; } + /// + /// 排序码 + /// + public int? SortCode { get; set; } + /// + /// 删除标记 + /// + public int? DeleteMark { get; set; } + /// + /// 数据库Id + /// + public string FrmDbId { get; set; } + /// + /// 有效 + /// + public int? EnabledMark { get; set; } + /// + /// 备注 + /// + public string Description { get; set; } + /// + /// 创建时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 创建用户主键 + /// + public string CreateUserId { get; set; } + /// + /// 创建用户 + /// + public string CreateUserName { get; set; } + /// + /// 修改时间 + /// + public System.DateTime? ModifyDate { get; set; } + /// + /// 修改用户主键 + /// + public string ModifyUserId { get; set; } + /// + /// 修改用户 + /// + public string ModifyUserName { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFProcessInstance.cs b/OpenAuth.Domain/Core/WFProcessInstance.cs index f3d9632d..584f40ea 100644 --- a/OpenAuth.Domain/Core/WFProcessInstance.cs +++ b/OpenAuth.Domain/Core/WFProcessInstance.cs @@ -1,110 +1,108 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFProcessInstance :Entity - { - public WFProcessInstance() - { - this.Code= string.Empty; - this.CustomName= string.Empty; - this.ActivityId= string.Empty; - this.ActivityType= 0; - this.ActivityName= string.Empty; - this.PreviousId= string.Empty; - this.ProcessSchemeId=Guid.Empty; - this.SchemeType= string.Empty; - this.EnabledMark= 0; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - this.Description= string.Empty; - this.MakerList= string.Empty; - } - - /// - /// - /// - public string Code { get; set; } - /// - /// - /// - public string CustomName { get; set; } - /// - /// - /// - public string ActivityId { get; set; } - /// - /// - /// - public int ActivityType { get; set; } - /// - /// - /// - public string ActivityName { get; set; } - /// - /// - /// - public string PreviousId { get; set; } - /// - /// - /// - public Guid ProcessSchemeId { get; set; } - /// - /// - /// - public string SchemeType { get; set; } - /// - /// - /// - public int? FrmType { get; set; } - /// - /// - /// - public int EnabledMark { get; set; } - /// - /// - /// - public System.DateTime CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - /// - /// - /// - public int? WfLevel { get; set; } - /// - /// - /// - public string Description { get; set; } - /// - /// - /// - public int? IsFinish { get; set; } - /// - /// - /// - public string MakerList { get; set; } - +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流流程实例表 + /// + public partial class WFProcessInstance : Entity + { + public WFProcessInstance() + { + this.Code= string.Empty; + this.CustomName= string.Empty; + this.ActivityId= string.Empty; + this.ActivityName= string.Empty; + this.ProcessSchemeId= string.Empty; + this.PreviousId= string.Empty; + this.SchemeType= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + this.Description= string.Empty; + this.MakerList= string.Empty; + } + + /// + /// 实例编号 + /// + public string Code { get; set; } + /// + /// 自定义名称 + /// + public string CustomName { get; set; } + /// + /// 当前节点ID + /// + public string ActivityId { get; set; } + /// + /// 当前节点类型(0会签节点) + /// + public int? ActivityType { get; set; } + /// + /// 当前节点名称 + /// + public string ActivityName { get; set; } + /// + /// 流程实例模板Id + /// + public string ProcessSchemeId { get; set; } + /// + /// 前一个ID + /// + public string PreviousId { get; set; } + /// + /// 表单类型 + /// + public int? FrmType { get; set; } + /// + /// 流程类型 + /// + public string SchemeType { get; set; } + /// + /// 有效标志 + /// + public int? EnabledMark { get; set; } + /// + /// 创建时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 创建用户主键 + /// + public string CreateUserId { get; set; } + /// + /// 创建用户 + /// + public string CreateUserName { get; set; } + /// + /// 等级 + /// + public int? WfLevel { get; set; } + /// + /// 实例备注 + /// + public string Description { get; set; } + /// + /// 是否完成 + /// + public int? IsFinish { get; set; } + /// + /// 执行人 + /// + public string MakerList { get; set; } + #region 扩展操作 /// /// 新增调用 @@ -117,10 +115,11 @@ namespace OpenAuth.Domain /// 编辑调用 /// /// - public void Modify(Guid keyValue) + public void Modify(string keyValue) { this.Id = keyValue; } - #endregion - } + #endregion + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFProcessOperationHistory.cs b/OpenAuth.Domain/Core/WFProcessOperationHistory.cs index 0ec4de1d..32d8c5bf 100644 --- a/OpenAuth.Domain/Core/WFProcessOperationHistory.cs +++ b/OpenAuth.Domain/Core/WFProcessOperationHistory.cs @@ -1,52 +1,52 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFProcessOperationHistory :Entity - { - public WFProcessOperationHistory() - { - this.ProcessId= Guid.Empty; - this.Content= string.Empty; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - } - - /// - /// - /// - public Guid ProcessId { get; set; } - /// - /// - /// - public string Content { get; set; } - /// - /// - /// - public System.DateTime CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流实例操作记录 + /// + public partial class WFProcessOperationHistory : Entity + { + public WFProcessOperationHistory() + { + this.ProcessId= string.Empty; + this.Content= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + } + + /// + /// 实例进程Id + /// + public string ProcessId { get; set; } + /// + /// 操作内容 + /// + public string Content { get; set; } + /// + /// 创建时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 创建用户主键 + /// + public string CreateUserId { get; set; } + /// + /// 创建用户 + /// + public string CreateUserName { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFProcessScheme.cs b/OpenAuth.Domain/Core/WFProcessScheme.cs index d99f79dd..a4b1756f 100644 --- a/OpenAuth.Domain/Core/WFProcessScheme.cs +++ b/OpenAuth.Domain/Core/WFProcessScheme.cs @@ -1,65 +1,64 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFProcessScheme :Entity - { - public WFProcessScheme() - { - this.SchemeContent= string.Empty; - this.SchemeInfoId= Guid.Empty; - this.SchemeVersion= string.Empty; - this.ProcessType= 0; - } - - /// - /// - /// - public string SchemeContent { get; set; } - /// - /// - /// - public Guid SchemeInfoId { get; set; } - /// - /// - /// - public string SchemeVersion { get; set; } - /// - /// - /// - public int ProcessType { get; set; } - - +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流实例模板对应表 + /// + public partial class WFProcessScheme : Entity + { + public WFProcessScheme() + { + this.SchemeContent= string.Empty; + this.SchemeInfoId= string.Empty; + this.SchemeVersion= string.Empty; + } + + /// + /// 流程模板内容 + /// + public string SchemeContent { get; set; } + /// + /// 流程模板ID + /// + public string SchemeInfoId { get; set; } + /// + /// 流程内容版本 + /// + public string SchemeVersion { get; set; } + /// + /// 类型(0正常,3草稿) + /// + public int? ProcessType { get; set; } + #region 扩展操作 /// /// 新增调用 /// - public void Create() + public void Create() { - this.Id = Guid.NewGuid(); + this.Id = Guid.NewGuid().ToString(); } /// /// 编辑调用 /// /// - public void Modify(Guid keyValue) + public void Modify(string keyValue) { this.Id = keyValue; } - #endregion - } + #endregion + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFProcessTransitionHistory.cs b/OpenAuth.Domain/Core/WFProcessTransitionHistory.cs index 73223f1c..f7d3e63d 100644 --- a/OpenAuth.Domain/Core/WFProcessTransitionHistory.cs +++ b/OpenAuth.Domain/Core/WFProcessTransitionHistory.cs @@ -1,85 +1,83 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFProcessTransitionHistory :Entity - { - public WFProcessTransitionHistory() - { - this.ProcessId= Guid.Empty; - this.FromNodeId= string.Empty; - this.FromNodeName= string.Empty; - this.ToNodeId= string.Empty; - this.ToNodeName= string.Empty; - this.TransitionSate= 0; - this.IsFinish= 0; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - } - - /// - /// - /// - public Guid ProcessId { get; set; } - /// - /// - /// - public string FromNodeId { get; set; } - /// - /// - /// - public int? FromNodeType { get; set; } - /// - /// - /// - public string FromNodeName { get; set; } - /// - /// - /// - public string ToNodeId { get; set; } - /// - /// - /// - public int? ToNodeType { get; set; } - /// - /// - /// - public string ToNodeName { get; set; } - /// - /// - /// - public int TransitionSate { get; set; } - /// - /// - /// - public int IsFinish { get; set; } - /// - /// - /// - public System.DateTime CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流实例流转历史记录 + /// + public partial class WFProcessTransitionHistory : Entity + { + public WFProcessTransitionHistory() + { + this.ProcessId= string.Empty; + this.FromNodeId= string.Empty; + this.FromNodeName= string.Empty; + this.ToNodeId= string.Empty; + this.ToNodeName= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + } + + /// + /// 实例进程Id + /// + public string ProcessId { get; set; } + /// + /// 开始节点Id + /// + public string FromNodeId { get; set; } + /// + /// 开始节点类型 + /// + public int? FromNodeType { get; set; } + /// + /// 开始节点名称 + /// + public string FromNodeName { get; set; } + /// + /// 结束节点Id + /// + public string ToNodeId { get; set; } + /// + /// 结束节点类型 + /// + public int? ToNodeType { get; set; } + /// + /// 结束节点名称 + /// + public string ToNodeName { get; set; } + /// + /// 转化状态 + /// + public int? TransitionSate { get; set; } + /// + /// 是否结束 + /// + public int? IsFinish { get; set; } + /// + /// 转化时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 操作人Id + /// + public string CreateUserId { get; set; } + /// + /// 操作人名称 + /// + public string CreateUserName { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFSchemeContent.cs b/OpenAuth.Domain/Core/WFSchemeContent.cs index c61eb52a..7e9e9dd3 100644 --- a/OpenAuth.Domain/Core/WFSchemeContent.cs +++ b/OpenAuth.Domain/Core/WFSchemeContent.cs @@ -1,57 +1,57 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFSchemeContent :Entity - { - public WFSchemeContent() - { - this.SchemeInfoId= Guid.Empty; - this.SchemeVersion= string.Empty; - this.SchemeContent= string.Empty; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - } - - /// - /// - /// - public Guid SchemeInfoId { get; set; } - /// - /// - /// - public string SchemeVersion { get; set; } - /// - /// - /// - public string SchemeContent { get; set; } - /// - /// - /// - public System.DateTime CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流模板内容表 + /// + public partial class WFSchemeContent : Entity + { + public WFSchemeContent() + { + this.SchemeInfoId= string.Empty; + this.SchemeVersion= string.Empty; + this.SchemeContent= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + } + + /// + /// 工作流模板信息主键Id + /// + public string SchemeInfoId { get; set; } + /// + /// 流程内容版本 + /// + public string SchemeVersion { get; set; } + /// + /// 流程内容 + /// + public string SchemeContent { get; set; } + /// + /// 创建时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 创建用户主键 + /// + public string CreateUserId { get; set; } + /// + /// 创建用户 + /// + public string CreateUserName { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Core/WFSchemeInfo.cs b/OpenAuth.Domain/Core/WFSchemeInfo.cs index 7413704d..58ed9d40 100644 --- a/OpenAuth.Domain/Core/WFSchemeInfo.cs +++ b/OpenAuth.Domain/Core/WFSchemeInfo.cs @@ -1,109 +1,107 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// Author:Yubao Li -// -//------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenAuth.Domain -{ - /// - /// - /// - public partial class WFSchemeInfo :Entity - { - public WFSchemeInfo() - { - this.SchemeCode= string.Empty; - this.SchemeName= string.Empty; - this.SchemeType= string.Empty; - this.SchemeVersion= string.Empty; - this.SchemeCanUser= string.Empty; - this.DeleteMark= 0; - this.EnabledMark= 0; - this.Description= string.Empty; - this.CreateDate= DateTime.Now; - this.CreateUserId= string.Empty; - this.CreateUserName= string.Empty; - this.ModifyDate= DateTime.Now; - this.ModifyUserId= string.Empty; - this.ModifyUserName= string.Empty; - } - - /// - /// - /// - public string SchemeCode { get; set; } - /// - /// - /// - public string SchemeName { get; set; } - /// - /// - /// - public string SchemeType { get; set; } - /// - /// - /// - public string SchemeVersion { get; set; } - /// - /// - /// - public string SchemeCanUser { get; set; } - /// - /// - /// - public int? FrmType { get; set; } - /// - /// - /// - public int? AuthorizeType { get; set; } - /// - /// - /// - public int? SortCode { get; set; } - /// - /// - /// - public int DeleteMark { get; set; } - /// - /// - /// - public int EnabledMark { get; set; } - /// - /// - /// - public string Description { get; set; } - /// - /// - /// - public System.DateTime CreateDate { get; set; } - /// - /// - /// - public string CreateUserId { get; set; } - /// - /// - /// - public string CreateUserName { get; set; } - /// - /// - /// - public System.DateTime? ModifyDate { get; set; } - /// - /// - /// - public string ModifyUserId { get; set; } - /// - /// - /// - public string ModifyUserName { get; set; } - - } +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// Author:Yubao Li +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenAuth.Domain +{ + /// + /// 工作流模板信息表 + /// + public partial class WFSchemeInfo : Entity + { + public WFSchemeInfo() + { + this.SchemeCode= string.Empty; + this.SchemeName= string.Empty; + this.SchemeType= string.Empty; + this.SchemeVersion= string.Empty; + this.SchemeCanUser= string.Empty; + this.Description= string.Empty; + this.CreateDate= DateTime.Now; + this.CreateUserId= string.Empty; + this.CreateUserName= string.Empty; + this.ModifyDate= DateTime.Now; + this.ModifyUserId= string.Empty; + this.ModifyUserName= string.Empty; + } + + /// + /// 流程编号 + /// + public string SchemeCode { get; set; } + /// + /// 流程名称 + /// + public string SchemeName { get; set; } + /// + /// 流程分类 + /// + public string SchemeType { get; set; } + /// + /// 流程内容版本 + /// + public string SchemeVersion { get; set; } + /// + /// 流程模板使用者 + /// + public string SchemeCanUser { get; set; } + /// + /// 表单类型 + /// + public int? FrmType { get; set; } + /// + /// 模板权限类型0所有人,1指定成员 + /// + public int? AuthorizeType { get; set; } + /// + /// 排序码 + /// + public int? SortCode { get; set; } + /// + /// 删除标记 + /// + public int? DeleteMark { get; set; } + /// + /// 有效 + /// + public int? EnabledMark { get; set; } + /// + /// 备注 + /// + public string Description { get; set; } + /// + /// 创建时间 + /// + public System.DateTime? CreateDate { get; set; } + /// + /// 创建用户主键 + /// + public string CreateUserId { get; set; } + /// + /// 创建用户 + /// + public string CreateUserName { get; set; } + /// + /// 修改时间 + /// + public System.DateTime? ModifyDate { get; set; } + /// + /// 修改用户主键 + /// + public string ModifyUserId { get; set; } + /// + /// 修改用户 + /// + public string ModifyUserName { get; set; } + + } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/ICategoryRepository.cs b/OpenAuth.Domain/Interface/ICategoryRepository.cs index 081d5a22..b16a0ddf 100644 --- a/OpenAuth.Domain/Interface/ICategoryRepository.cs +++ b/OpenAuth.Domain/Interface/ICategoryRepository.cs @@ -8,16 +8,16 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadCategorys(int pageindex, int pagesize); - IEnumerable LoadInOrgs(params Guid[] orgId); - int GetCategoryCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + int GetCategoryCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); /// /// 获取子分类ID /// - Guid[] GetSubIds(Guid orgId); + string[] GetSubIds(string orgId); - void Delete(Guid id); + void Delete(string id); } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/IModuleRepository.cs b/OpenAuth.Domain/Interface/IModuleRepository.cs index 2adbd970..302b9272 100644 --- a/OpenAuth.Domain/Interface/IModuleRepository.cs +++ b/OpenAuth.Domain/Interface/IModuleRepository.cs @@ -8,12 +8,12 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadModules(int pageindex, int pagesize); - IEnumerable LoadInOrgs(params Guid[] orgId); - int GetModuleCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + int GetModuleCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); - void Delete(Guid id); + void Delete(string id); } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/IOrgRepository.cs b/OpenAuth.Domain/Interface/IOrgRepository.cs index cca36447..78318cda 100644 --- a/OpenAuth.Domain/Interface/IOrgRepository.cs +++ b/OpenAuth.Domain/Interface/IOrgRepository.cs @@ -10,14 +10,14 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadOrgs(); - IEnumerable LoadByUser(Guid userId); + IEnumerable LoadByUser(string userId); - IEnumerable LoadByRole(Guid roleId); + IEnumerable LoadByRole(string roleId); /// /// 获取包括自己在内的全部子部门 /// /// 部门ID - IEnumerable GetSubOrgs(Guid orgId); + IEnumerable GetSubOrgs(string orgId); } } diff --git a/OpenAuth.Domain/Interface/IRelevanceRepository.cs b/OpenAuth.Domain/Interface/IRelevanceRepository.cs index ee73bb99..29e95cef 100644 --- a/OpenAuth.Domain/Interface/IRelevanceRepository.cs +++ b/OpenAuth.Domain/Interface/IRelevanceRepository.cs @@ -20,9 +20,9 @@ namespace OpenAuth.Domain.Interface { public interface IRelevanceRepository : IRepository { - void DeleteBy(string key, params Guid[] firstIds); - void DeleteBy(string key, ILookup idMaps); + void DeleteBy(string key, params string[] firstIds); + void DeleteBy(string key, ILookup idMaps); - void AddRelevance( string key, ILookup idMaps); + void AddRelevance( string key, ILookup idMaps); } } diff --git a/OpenAuth.Domain/Interface/IResourceRepository.cs b/OpenAuth.Domain/Interface/IResourceRepository.cs index 44dbe221..bd381c54 100644 --- a/OpenAuth.Domain/Interface/IResourceRepository.cs +++ b/OpenAuth.Domain/Interface/IResourceRepository.cs @@ -8,11 +8,11 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadResources(int pageindex, int pagesize); - IEnumerable LoadInOrgs(params Guid[] orgId); - int GetResourceCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + int GetResourceCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); - void Delete(Guid id); + void Delete(string id); } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/IRoleRepository.cs b/OpenAuth.Domain/Interface/IRoleRepository.cs index 4b654909..b4934d14 100644 --- a/OpenAuth.Domain/Interface/IRoleRepository.cs +++ b/OpenAuth.Domain/Interface/IRoleRepository.cs @@ -8,12 +8,12 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadRoles(int pageindex, int pagesize); - int GetRoleCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); - IEnumerable LoadInOrgs(params Guid[] orgId); - IEnumerable LoadForUser(Guid userId); + int GetRoleCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + IEnumerable LoadForUser(string userId); - void Delete(Guid id); + void Delete(string id); } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/IStockRepository.cs b/OpenAuth.Domain/Interface/IStockRepository.cs index a23b44ee..a1d6cc1f 100644 --- a/OpenAuth.Domain/Interface/IStockRepository.cs +++ b/OpenAuth.Domain/Interface/IStockRepository.cs @@ -8,11 +8,11 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadStocks(int pageindex, int pagesize); - IEnumerable LoadInOrgs(params Guid[] orgId); - int GetStockCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + int GetStockCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); - void Delete(Guid id); + void Delete(string id); } } \ No newline at end of file diff --git a/OpenAuth.Domain/Interface/IUserRepository.cs b/OpenAuth.Domain/Interface/IUserRepository.cs index dda5a44e..48b658be 100644 --- a/OpenAuth.Domain/Interface/IUserRepository.cs +++ b/OpenAuth.Domain/Interface/IUserRepository.cs @@ -8,9 +8,9 @@ namespace OpenAuth.Domain.Interface { IEnumerable LoadUsers(int pageindex, int pagesize); - IEnumerable LoadInOrgs(params Guid[] orgId); - int GetUserCntInOrgs(params Guid[] orgIds); - IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds); + IEnumerable LoadInOrgs(params string[] orgId); + int GetUserCntInOrgs(params string[] orgIds); + IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds); } } \ No newline at end of file diff --git a/OpenAuth.Domain/OpenAuth.Domain.csproj b/OpenAuth.Domain/OpenAuth.Domain.csproj index 40af9136..c2532388 100644 --- a/OpenAuth.Domain/OpenAuth.Domain.csproj +++ b/OpenAuth.Domain/OpenAuth.Domain.csproj @@ -42,10 +42,10 @@ + + - - diff --git a/OpenAuth.Domain/Service/AuthoriseService.cs b/OpenAuth.Domain/Service/AuthoriseService.cs index 49975d07..74828717 100644 --- a/OpenAuth.Domain/Service/AuthoriseService.cs +++ b/OpenAuth.Domain/Service/AuthoriseService.cs @@ -25,7 +25,7 @@ namespace OpenAuth.Domain.Service protected IUnitWork _unitWork; protected User _user; - private List _userRoleIds; //用户角色GUID + private List _userRoleIds; //用户角色GUID public AuthoriseService(IUnitWork unitWork) { diff --git a/OpenAuth.Domain/Service/ModuleEleManService.cs b/OpenAuth.Domain/Service/ModuleEleManService.cs index 262b863c..dcc1f2ee 100644 --- a/OpenAuth.Domain/Service/ModuleEleManService.cs +++ b/OpenAuth.Domain/Service/ModuleEleManService.cs @@ -34,7 +34,7 @@ namespace OpenAuth.Domain.Service public void AddOrUpdate(ModuleElement model) { - if (model.Id == Guid.Empty) + if (model.Id == string.Empty) { _unitWork.Add(model); } @@ -46,7 +46,7 @@ namespace OpenAuth.Domain.Service _unitWork.Save(); } - public IEnumerable LoadByModuleId(string loginuser, Guid id) + public IEnumerable LoadByModuleId(string loginuser, string id) { var service = _factory.Create(loginuser); if (!service.GetModuleElementsQuery().Any()) //用户没有任何资源 @@ -68,7 +68,7 @@ namespace OpenAuth.Domain.Service /// 当为UserElement时,表示UserId /// /// 模块ID - public List LoadWithAccess(string username, string accessType, Guid firstId, Guid moduleId) + public List LoadWithAccess(string username, string accessType, string firstId, string moduleId) { var listVms = new List(); var service = _factory.Create(username); @@ -76,7 +76,7 @@ namespace OpenAuth.Domain.Service { return listVms; } - if (moduleId == Guid.Empty) return listVms; + if (moduleId == string.Empty) return listVms; foreach (var element in service.GetModuleElementsQuery().Where(u =>u.ModuleId ==moduleId)) { var accessed = _unitWork.FindSingle(u =>u.Key == accessType @@ -94,7 +94,7 @@ namespace OpenAuth.Domain.Service return listVms; } - public void Delete(Guid[] objs) + public void Delete(string[] objs) { _unitWork.Delete(u =>objs.Contains(u.Id)); } diff --git a/OpenAuth.Domain/Service/ModuleManService.cs b/OpenAuth.Domain/Service/ModuleManService.cs index 7fc7bd0a..ea625a09 100644 --- a/OpenAuth.Domain/Service/ModuleManService.cs +++ b/OpenAuth.Domain/Service/ModuleManService.cs @@ -37,7 +37,7 @@ namespace OpenAuth.Domain.Service /// /// 加载一个节点下面的所有 /// - public dynamic Load(string loginuser, Guid parentId, int pageindex, int pagesize) + public dynamic Load(string loginuser, string parentId, int pageindex, int pagesize) { var service= _factory.Create(loginuser); @@ -51,7 +51,7 @@ namespace OpenAuth.Domain.Service }; } var ids = GetSubIds(parentId); - var query = service.GetModulesQuery().Where(u => parentId == Guid.Empty || (u.ParentId != null&&ids.Contains(u.ParentId.Value))); + var query = service.GetModulesQuery().Where(u => parentId == string.Empty || (u.ParentId != null&&ids.Contains(u.ParentId))); int total = query.Count(); var modules = query.OrderBy(u=>u.CascadeId).Skip((pageindex - 1)*pagesize).Take(pagesize); @@ -65,7 +65,7 @@ namespace OpenAuth.Domain.Service }; } - public void Delete(Guid id) + public void Delete(string id) { var del = _repository.FindSingle(u => u.Id == id); if (del == null) return; @@ -76,7 +76,7 @@ namespace OpenAuth.Domain.Service public void AddOrUpdate(Module model) { ChangeModuleCascade(model); - if (model.Id == Guid.Empty) + if (model.Id == string.Empty) { _repository.Add(model); } @@ -104,7 +104,7 @@ namespace OpenAuth.Domain.Service /// 加载特定用户的模块 /// /// The user unique identifier. - public List LoadForUser(Guid userId) + public List LoadForUser(string userId) { //用户角色 var userRoleIds = @@ -129,7 +129,7 @@ namespace OpenAuth.Domain.Service /// 加载特定角色的模块 /// /// The role unique identifier. - public List LoadForRole(Guid roleId) + public List LoadForRole(string roleId) { var moduleIds = _relevanceRepository.Find(u => u.FirstId == roleId && u.Key == "RoleModule") @@ -145,9 +145,9 @@ namespace OpenAuth.Domain.Service //根据同一级中最大的语义ID - private Guid[] GetSubIds(Guid parentId) + private string[] GetSubIds(string parentId) { - if (parentId == Guid.Empty) return _repository.Find(null).Select(u => u.Id).ToArray(); + if (parentId == string.Empty) return _repository.Find(null).Select(u => u.Id).ToArray(); var parent = _repository.FindSingle(u => u.Id == parentId); var orgs = _repository.Find(u => u.CascadeId.Contains(parent.CascadeId)).Select(u => u.Id).ToArray(); return orgs; @@ -165,7 +165,7 @@ namespace OpenAuth.Domain.Service if (currentCascadeId <= objCascadeId) currentCascadeId = objCascadeId + 1; } - if (module.ParentId != null && module.ParentId != Guid.Empty) + if (module.ParentId != null && module.ParentId != string.Empty) { var parentOrg = _repository.FindSingle(o => o.Id == module.ParentId); if (parentOrg != null) diff --git a/OpenAuth.Domain/Service/ResManagerService.cs b/OpenAuth.Domain/Service/ResManagerService.cs index e6742db5..69ad8c1e 100644 --- a/OpenAuth.Domain/Service/ResManagerService.cs +++ b/OpenAuth.Domain/Service/ResManagerService.cs @@ -27,9 +27,9 @@ namespace OpenAuth.Domain.Service _factory = authoriseService; } - public int GetResourceCntInOrg(Guid orgId) + public int GetResourceCntInOrg(string orgId) { - if (orgId == Guid.Empty) + if (orgId == string.Empty) { return _repository.Find(null).Count(); } @@ -47,7 +47,7 @@ namespace OpenAuth.Domain.Service /// /// 加载用户一个节点下面的一个或全部Resources /// - public dynamic Load(string username, Guid categoryId, int page, int rows) + public dynamic Load(string username, string categoryId, int page, int rows) { var service = _factory.Create(username); if (!service.GetResourcesQuery().Any()) //用户没有任何资源 @@ -62,8 +62,8 @@ namespace OpenAuth.Domain.Service var subIds = _categoryRepository.GetSubIds(categoryId); - var query = service.GetResourcesQuery().Where(u => categoryId == Guid.Empty || - (u.CategoryId != null && subIds.Contains(u.CategoryId.Value))); + var query = service.GetResourcesQuery().Where(u => categoryId == string.Empty || + (u.CategoryId != null && subIds.Contains(u.CategoryId))); int total = query.Count(); if (total <= 0) @@ -102,7 +102,7 @@ namespace OpenAuth.Domain.Service - public Resource Find(Guid id) + public Resource Find(string id) { var resource = _repository.FindSingle(u => u.Id == id); if (resource == null) return new Resource(); @@ -110,14 +110,14 @@ namespace OpenAuth.Domain.Service return resource; } - public void Delete(Guid[] ids) + public void Delete(string[] ids) { _repository.Delete(u => ids.Contains(u.Id)); } public void AddOrUpdate(Resource resource) { - if (resource.Id == Guid.Empty) + if (resource.Id == string.Empty) { _repository.Add(resource); } @@ -137,7 +137,7 @@ namespace OpenAuth.Domain.Service /// 当为UserResource时,表示UserId /// /// 分类ID - public List LoadWithAccess(string username, string accessType, Guid firstId, Guid cId) + public List LoadWithAccess(string username, string accessType, string firstId, string cId) { var listVms = new List(); var service = _factory.Create(username); @@ -147,7 +147,7 @@ namespace OpenAuth.Domain.Service } var subIds = _categoryRepository.GetSubIds(cId); - var query = service.GetResourcesQuery().Where(u => cId == Guid.Empty || (u.CategoryId != null && subIds.Contains(u.CategoryId.Value))); + var query = service.GetResourcesQuery().Where(u => cId == string.Empty || (u.CategoryId != null && subIds.Contains(u.CategoryId))); foreach (var element in query) { diff --git a/OpenAuth.Domain/Service/StockManagerService.cs b/OpenAuth.Domain/Service/StockManagerService.cs index cb7661b5..c87624a2 100644 --- a/OpenAuth.Domain/Service/StockManagerService.cs +++ b/OpenAuth.Domain/Service/StockManagerService.cs @@ -26,7 +26,7 @@ namespace OpenAuth.Domain.Service /// /// 根据部门ID得到进出库信息 /// - public dynamic Load(string username, Guid orgId, int pageindex, int pagesize) + public dynamic Load(string username, string orgId, int pageindex, int pagesize) { var service = _factory.Create(username); @@ -48,7 +48,7 @@ namespace OpenAuth.Domain.Service var keys = service.Resources.Select(r => r.Key); //用户可访问的资源的KEY列表 - Expression> exp = u => u.OrgId != null &&orgs.Contains(u.OrgId.Value) && (u.Viewable == "" || keys.Contains(u.Viewable)); + Expression> exp = u => u.OrgId != null &&orgs.Contains(u.OrgId) && (u.Viewable == "" || keys.Contains(u.Viewable)); var stocks = _repository.Find(pageindex, pagesize, "", exp); int total = _repository.GetCount(exp); @@ -62,7 +62,7 @@ namespace OpenAuth.Domain.Service }; } - public Stock Find(Guid id) + public Stock Find(string id) { var stock = _repository.FindSingle(u => u.Id == id); if (stock == null) return new Stock(); @@ -70,7 +70,7 @@ namespace OpenAuth.Domain.Service return stock; } - public void Delete(Guid[] id) + public void Delete(string[] id) { _repository.Delete(u =>id.Contains(u.Id)); } @@ -78,7 +78,7 @@ namespace OpenAuth.Domain.Service public void AddOrUpdate(Stock stock) { - if (stock.Id == Guid.Empty) + if (string.IsNullOrEmpty(stock.Id)) { _repository.Add(stock); } diff --git a/OpenAuth.Domain/Service/SystemAuthService.cs b/OpenAuth.Domain/Service/SystemAuthService.cs index bbe90dc4..d5ed694e 100644 --- a/OpenAuth.Domain/Service/SystemAuthService.cs +++ b/OpenAuth.Domain/Service/SystemAuthService.cs @@ -24,7 +24,7 @@ namespace OpenAuth.Domain.Service { public SystemAuthService(IUnitWork unitWork):base(unitWork) { - _user = new User { Account = "System", Id = Guid.Empty }; + _user = new User { Account = "System", Id = string.Empty }; } diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs index 8bdc5377..43e0536d 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowDesignController.cs @@ -90,7 +90,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 主键 /// [HttpGet] - public ActionResult GetFormJson(Guid keyValue) + public ActionResult GetFormJson(string keyValue) { var schemeinfo = WfFlowInfoBll.GetEntity(keyValue); var schemecontent = WfFlowInfoBll.GetSchemeEntity(schemeinfo.Id, schemeinfo.SchemeVersion); @@ -108,7 +108,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetSchemeContentJson(Guid keyValue, string SchemeVersion) + public ActionResult GetSchemeContentJson(string keyValue, string SchemeVersion) { var schemecontent = WfFlowInfoBll.GetSchemeEntity(keyValue, SchemeVersion); return Content(schemecontent.ToJson()); @@ -122,7 +122,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 主键值 /// [HttpPost] - public string RemoveForm(Guid[] ids) + public string RemoveForm(string[] ids) { WfFlowInfoBll.RemoveForm(ids); return Result.ToJson(); diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs index 377b66e6..40f7037c 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FlowInstancesController.cs @@ -105,12 +105,12 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 0发起,3草稿 /// [HttpPost] - public string CreateProcess(Guid wfSchemeInfoId, string wfProcessInstanceJson, string frmData) + public string CreateProcess(string wfSchemeInfoId, string wfProcessInstanceJson, string frmData) { WFProcessInstance wfProcessInstanceEntity = wfProcessInstanceJson.ToObject(); - wfProcessInstanceEntity.Id = Guid.Empty; + wfProcessInstanceEntity.Id = string.Empty; - App.CreateInstance(Guid.NewGuid(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); + App.CreateInstance(Guid.NewGuid().ToString(), wfSchemeInfoId, wfProcessInstanceEntity, frmData); return Result.ToJson(); } @@ -122,7 +122,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 审核数据 /// [HttpPost] - public string VerificationProcess(Guid processId, string verificationData) + public string VerificationProcess(string processId, string verificationData) { App.VerificationProcess(processId, verificationData); return Result.ToJson(); @@ -131,7 +131,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// 删除申请 /// - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { @@ -159,7 +159,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetProcessSchemeJson(Guid keyValue) + public ActionResult GetProcessSchemeJson(string keyValue) { var data = App.GetProcessSchemeEntity(keyValue); return Content(data.ToJson()); @@ -171,7 +171,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetProcessSchemeEntityByUserId(Guid keyValue) + public ActionResult GetProcessSchemeEntityByUserId(string keyValue) { var data = App.GetProcessSchemeByUserId(keyValue); return Content(data.ToJson()); @@ -184,7 +184,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetProcessSchemeEntityByNodeId(Guid keyValue, string nodeId) + public ActionResult GetProcessSchemeEntityByNodeId(string keyValue, string nodeId) { var data = App.GetProcessSchemeEntityByNodeId(keyValue, nodeId); return Content(data.ToJson()); @@ -196,7 +196,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetProcessInfoJson(Guid keyValue) + public ActionResult GetProcessInfoJson(string keyValue) { var processInstance = App.GetProcessInstanceEntity(keyValue); var processScheme = App.GetProcessSchemeEntity(processInstance.ProcessSchemeId); @@ -214,7 +214,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// /// [HttpGet] - public ActionResult GetProcessInstanceJson(Guid keyValue) + public ActionResult GetProcessInstanceJson(string keyValue) { var processInstance = App.GetProcessInstanceEntity(keyValue); return Content(processInstance.ToJson()); diff --git a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs index 91998356..f49740a9 100644 --- a/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs +++ b/OpenAuth.Mvc/Areas/FlowManage/Controllers/FormDesignController.cs @@ -42,11 +42,11 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers public ActionResult FrmBuider() { return View(); - } + } #endregion - + #region 获取数据 - + public string Load(int pageCurrent = 1, int pageSize = 30) { return JsonHelper.Instance.Serialize(WfFrmMainBll.Load(pageCurrent, pageSize)); @@ -58,7 +58,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 主键 /// [HttpGet] - public ActionResult GetFormJson(Guid keyValue) + public ActionResult GetFormJson(string keyValue) { var data = WfFrmMainBll.GetForm(keyValue); return Content(data.ToJson()); @@ -75,14 +75,14 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers var result = data.Select(u => new { - id = u.Id.ToString(), - text = u.FrmName, - value = u.Id.ToString(), - isexpand = true, - complete = true, - hasChildren = false, - parentId = "0", - Attribute = "Sort", + id = u.Id.ToString(), + text = u.FrmName, + value = u.Id.ToString(), + isexpand = true, + complete = true, + hasChildren = false, + parentId = "0", + Attribute = "Sort", AttributeValue = "Frm" }); return Content(result.ToJson()); @@ -96,7 +96,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers /// 主键值 /// [HttpPost] - public string RemoveForm(Guid[] ids) + public string RemoveForm(string[] ids) { WfFrmMainBll.RemoveForm(ids); return Result.ToJson(); diff --git a/OpenAuth.Mvc/Controllers/CategoryManagerController.cs b/OpenAuth.Mvc/Controllers/CategoryManagerController.cs index e97c110c..0480ac13 100644 --- a/OpenAuth.Mvc/Controllers/CategoryManagerController.cs +++ b/OpenAuth.Mvc/Controllers/CategoryManagerController.cs @@ -23,7 +23,7 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载分类下面的所有分类 /// - public string Load(Guid parentId, int page = 1, int rows = 30) + public string Load(string parentId, int page = 1, int rows = 30) { return JsonHelper.Instance.Serialize(App.Load(parentId, page, rows)); } @@ -50,7 +50,7 @@ namespace OpenAuth.Mvc.Controllers return JsonHelper.Instance.Serialize(Result); } [HttpPost] - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { diff --git a/OpenAuth.Mvc/Controllers/ModuleElementManagerController.cs b/OpenAuth.Mvc/Controllers/ModuleElementManagerController.cs index fffa6bc2..9ac21f8f 100644 --- a/OpenAuth.Mvc/Controllers/ModuleElementManagerController.cs +++ b/OpenAuth.Mvc/Controllers/ModuleElementManagerController.cs @@ -26,12 +26,12 @@ namespace OpenAuth.Mvc.Controllers { public ModuleElementManagerApp App { get; set; } - public ActionResult Index(Guid id) + public ActionResult Index(string id) { ViewBag.ModuleId = id; return View(); } - public ActionResult Get(Guid moduleId) + public ActionResult Get(string moduleId) { return Json(App.LoadByModuleId(moduleId), JsonRequestBehavior.AllowGet); } @@ -50,7 +50,7 @@ namespace OpenAuth.Mvc.Controllers } return JsonHelper.Instance.Serialize( Result); } - public string Del(Guid[] ids) + public string Del(string[] ids) { try { @@ -71,13 +71,13 @@ namespace OpenAuth.Mvc.Controllers /// The first identifier. /// The key. /// ActionResult. - public ActionResult AssignModuleElement(Guid firstId, string key) + public ActionResult AssignModuleElement(string firstId, string key) { ViewBag.FirstId = firstId; ViewBag.ModuleType = key; return View(); } - public string LoadWithAccess(Guid tId, Guid firstId, string key) + public string LoadWithAccess(string tId, string firstId, string key) { return JsonHelper.Instance.Serialize(App.LoadWithAccess(key, firstId, tId)); } diff --git a/OpenAuth.Mvc/Controllers/ModuleManagerController.cs b/OpenAuth.Mvc/Controllers/ModuleManagerController.cs index e18423cb..bc4c37fe 100644 --- a/OpenAuth.Mvc/Controllers/ModuleManagerController.cs +++ b/OpenAuth.Mvc/Controllers/ModuleManagerController.cs @@ -23,12 +23,13 @@ namespace OpenAuth.Mvc.Controllers return View(); } - public ActionResult Assign(Guid firstId, string key) + public ActionResult Assign(string firstId, string key) { ViewBag.FirstId = firstId; ViewBag.ModuleType = key; - var moduleWithChildren = AuthUtil.GetCurrentUser().Modules.GenerateTree(u =>u.Id, u =>u.ParentId); + var moduleWithChildren = AuthUtil.GetCurrentUser().Modules + .GenerateTree(u =>u.Id, u =>u.ParentId); var modules = key == "UserModule" ? App.LoadForUser(firstId) : App.LoadForRole(firstId); CheckModule(moduleWithChildren, modules); @@ -99,7 +100,7 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载模块下面的所有模块 /// - public string Load(Guid orgId, int page = 1, int rows = 30) + public string Load(string orgId, int page = 1, int rows = 30) { return JsonHelper.Instance.Serialize(App.Load(orgId, page, rows)); } @@ -109,7 +110,7 @@ namespace OpenAuth.Mvc.Controllers /// /// The user identifier. /// System.String. - public string LoadForUser(Guid firstId) + public string LoadForUser(string firstId) { var orgs = App.LoadForUser(firstId); return JsonHelper.Instance.Serialize(orgs); @@ -120,7 +121,7 @@ namespace OpenAuth.Mvc.Controllers /// /// The role identifier. /// System.String. - public string LoadForRole(Guid firstId) + public string LoadForRole(string firstId) { var orgs = App.LoadForRole(firstId); return JsonHelper.Instance.Serialize(orgs); @@ -151,7 +152,7 @@ namespace OpenAuth.Mvc.Controllers } [HttpPost] - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { diff --git a/OpenAuth.Mvc/Controllers/OrgManagerController.cs b/OpenAuth.Mvc/Controllers/OrgManagerController.cs index 127d9114..4d5b4a66 100644 --- a/OpenAuth.Mvc/Controllers/OrgManagerController.cs +++ b/OpenAuth.Mvc/Controllers/OrgManagerController.cs @@ -18,20 +18,20 @@ namespace OpenAuth.Mvc.Controllers { return View(); } - public ActionResult Assign(Guid firstId, string key) + public ActionResult Assign(string firstId, string key) { ViewBag.FirstId = firstId; ViewBag.ModuleType = key; return View(); } - public string LoadForUser(Guid firstId) + public string LoadForUser(string firstId) { var orgs = OrgApp.LoadForUser(firstId); return JsonHelper.Instance.Serialize(orgs); } - public string LoadForRole(Guid firstId) + public string LoadForRole(string firstId) { var orgs = OrgApp.LoadForRole(firstId); return JsonHelper.Instance.Serialize(orgs); @@ -54,7 +54,7 @@ namespace OpenAuth.Mvc.Controllers return JsonHelper.Instance.Serialize(Result); } - public string LoadChildren(Guid id) + public string LoadChildren(string id) { return JsonHelper.Instance.Serialize(OrgApp.LoadAllChildren(id)); } @@ -65,7 +65,7 @@ namespace OpenAuth.Mvc.Controllers /// /// System.String. [HttpPost] - public string DelOrg(Guid[] ids) + public string DelOrg(string[] ids) { try { diff --git a/OpenAuth.Mvc/Controllers/RelevanceManagerController.cs b/OpenAuth.Mvc/Controllers/RelevanceManagerController.cs index 7298c86d..ee3c7362 100644 --- a/OpenAuth.Mvc/Controllers/RelevanceManagerController.cs +++ b/OpenAuth.Mvc/Controllers/RelevanceManagerController.cs @@ -15,7 +15,7 @@ namespace OpenAuth.Mvc.Controllers public RevelanceManagerApp App { get; set; } [HttpPost] - public string Assign(string type, Guid firstId, Guid[] secIds) + public string Assign(string type, string firstId, string[] secIds) { try { @@ -29,7 +29,7 @@ namespace OpenAuth.Mvc.Controllers return JsonHelper.Instance.Serialize(Result); } [HttpPost] - public string UnAssign(string type, Guid firstId, Guid[] secIds) + public string UnAssign(string type, string firstId, string[] secIds) { try { diff --git a/OpenAuth.Mvc/Controllers/ResourceManagerController.cs b/OpenAuth.Mvc/Controllers/ResourceManagerController.cs index 9e30e7fe..f27d7abc 100644 --- a/OpenAuth.Mvc/Controllers/ResourceManagerController.cs +++ b/OpenAuth.Mvc/Controllers/ResourceManagerController.cs @@ -40,7 +40,7 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载某分类的所有Resources /// - public string Load(Guid categoryId, int page = 1, int rows = 30) + public string Load(string categoryId, int page = 1, int rows = 30) { return JsonHelper.Instance.Serialize(App.Load(AuthUtil.GetUserName(), categoryId, page, rows)); } @@ -52,7 +52,7 @@ namespace OpenAuth.Mvc.Controllers } [HttpPost] - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { @@ -75,7 +75,7 @@ namespace OpenAuth.Mvc.Controllers /// 如:UserResource/RoleResource /// /// ActionResult. - public ActionResult AssignRes(Guid firstId, string key) + public ActionResult AssignRes(string firstId, string key) { ViewBag.FirstId = firstId; ViewBag.ModuleType = key; @@ -89,7 +89,7 @@ namespace OpenAuth.Mvc.Controllers /// 关联表中的firstId /// 关联表中的key /// System.String. - public string LoadWithAccess(Guid cId, Guid firstId, string key) + public string LoadWithAccess(string cId, string firstId, string key) { return JsonHelper.Instance.Serialize(App.LoadWithAccess(AuthUtil.GetUserName(),key,firstId, cId)); } diff --git a/OpenAuth.Mvc/Controllers/RoleManagerController.cs b/OpenAuth.Mvc/Controllers/RoleManagerController.cs index a50f1cb1..25d08116 100644 --- a/OpenAuth.Mvc/Controllers/RoleManagerController.cs +++ b/OpenAuth.Mvc/Controllers/RoleManagerController.cs @@ -39,13 +39,13 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载角色下面的所有用户 /// - public string Load(Guid orgId, int pageCurrent = 1, int pageSize = 30) + public string Load(string orgId, int pageCurrent = 1, int pageSize = 30) { return JsonHelper.Instance.Serialize(App.Load(orgId, pageCurrent, pageSize)); } [System.Web.Mvc.HttpPost] - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { @@ -64,14 +64,14 @@ namespace OpenAuth.Mvc.Controllers } #region 为用户设置角色界面 - public ActionResult LookupMulti(Guid firstId, string key) + public ActionResult LookupMulti(string firstId, string key) { ViewBag.FirstId = firstId; ViewBag.ModuleType = key; return View(); } - public string LoadForOrgAndUser(Guid orgId, Guid userId) + public string LoadForOrgAndUser(string orgId, string userId) { return JsonHelper.Instance.Serialize(App.LoadForOrgAndUser(orgId, userId)); } diff --git a/OpenAuth.Mvc/Controllers/StockManagerController.cs b/OpenAuth.Mvc/Controllers/StockManagerController.cs index e1f30a2b..13b7a102 100644 --- a/OpenAuth.Mvc/Controllers/StockManagerController.cs +++ b/OpenAuth.Mvc/Controllers/StockManagerController.cs @@ -45,12 +45,12 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载节点下面的所有Stocks /// - public string Load(Guid parentId, int page = 1, int rows = 30) + public string Load(string parentId, int page = 1, int rows = 30) { return JsonHelper.Instance.Serialize(App.Load(AuthUtil.GetUserName(), parentId, page, rows)); } - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { diff --git a/OpenAuth.Mvc/Controllers/UserManagerController.cs b/OpenAuth.Mvc/Controllers/UserManagerController.cs index 97e4b36a..ca24f1ba 100644 --- a/OpenAuth.Mvc/Controllers/UserManagerController.cs +++ b/OpenAuth.Mvc/Controllers/UserManagerController.cs @@ -40,13 +40,13 @@ namespace OpenAuth.Mvc.Controllers /// /// 加载组织下面的所有用户 /// - public string Load(Guid orgId, int page = 1, int limit = 30) + public string Load(string orgId, int page = 1, int limit = 30) { return JsonHelper.Instance.Serialize(App.Load(orgId, page, limit)); } [HttpPost] - public string Delete(Guid[] ids) + public string Delete(string[] ids) { try { @@ -69,7 +69,7 @@ namespace OpenAuth.Mvc.Controllers /// public string GetAccessedUsers() { - IEnumerable users = App.Load(Guid.Empty, 1, 10).data; + IEnumerable users = App.Load(string.Empty, 1, 10).data; var result = new Dictionary(); foreach (var user in users) { diff --git a/OpenAuth.Mvc/Controllers/UserSessionController.cs b/OpenAuth.Mvc/Controllers/UserSessionController.cs index df5648b9..3e0345ee 100644 --- a/OpenAuth.Mvc/Controllers/UserSessionController.cs +++ b/OpenAuth.Mvc/Controllers/UserSessionController.cs @@ -17,8 +17,8 @@ namespace OpenAuth.Mvc.Controllers /// public string GetModulesTree() { - - return JsonHelper.Instance.Serialize(user.Modules.GenerateTree(u => u.Id, u => u.ParentId)); + var moduleTree = user.Modules.GenerateTree(u => u.Id, u => u.ParentId); + return JsonHelper.Instance.Serialize(moduleTree); } /// diff --git a/OpenAuth.Repository/BaseRepository.cs b/OpenAuth.Repository/BaseRepository.cs index 78428853..fd76425a 100644 --- a/OpenAuth.Repository/BaseRepository.cs +++ b/OpenAuth.Repository/BaseRepository.cs @@ -64,7 +64,7 @@ namespace OpenAuth.Repository public void Add(T entity) { - entity.Id = Guid.NewGuid(); + entity.Id = Guid.NewGuid().ToString(); Context.Set().Add(entity); Save(); } @@ -77,7 +77,7 @@ namespace OpenAuth.Repository { foreach (var entity in entities) { - entity.Id = Guid.NewGuid(); + entity.Id = Guid.NewGuid().ToString(); } Context.Set().AddRange(entities); Save(); diff --git a/OpenAuth.Repository/CategoryRepository.cs b/OpenAuth.Repository/CategoryRepository.cs index e3ba3f87..2722842a 100644 --- a/OpenAuth.Repository/CategoryRepository.cs +++ b/OpenAuth.Repository/CategoryRepository.cs @@ -14,7 +14,7 @@ namespace OpenAuth.Repository return Context.Categories.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { var result = from category in Context.Categories where orgId.Contains(category.Id) select category; @@ -22,17 +22,17 @@ namespace OpenAuth.Repository } - public int GetCategoryCntInOrgs(params Guid[] orgIds) + public int GetCategoryCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize); } - public void Delete(Guid id) + public void Delete(string id) { Delete(u =>u.Id == id); } @@ -40,9 +40,9 @@ namespace OpenAuth.Repository /// /// 获取当前节点的所有下级节点 /// - public Guid[] GetSubIds(Guid orgId) + public string[] GetSubIds(string orgId) { - if (orgId == Guid.Empty) + if (orgId == string.Empty) { return Find(null).Select(u => u.Id).ToArray(); } diff --git a/OpenAuth.Repository/Models/Mapping/ApplicationMap.cs b/OpenAuth.Repository/Models/Mapping/ApplicationMap.cs new file mode 100644 index 00000000..df1331bb --- /dev/null +++ b/OpenAuth.Repository/Models/Mapping/ApplicationMap.cs @@ -0,0 +1,65 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class ApplicationMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public ApplicationMap() + { + // table + ToTable("Application", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.Name) + .HasColumnName("Name") + .HasMaxLength(255) + .IsRequired(); + Property(t => t.AppId) + .HasColumnName("AppId") + .HasMaxLength(255) + .IsOptional(); + Property(t => t.AppKey) + .HasColumnName("AppKey") + .HasMaxLength(255) + .IsOptional(); + Property(t => t.Description) + .HasColumnName("Description") + .HasMaxLength(255) + .IsOptional(); + Property(t => t.Icon) + .HasColumnName("Icon") + .HasMaxLength(255) + .IsOptional(); + Property(t => t.Disable) + .HasColumnName("Disable") + .IsRequired(); + Property(t => t.CreateTime) + .HasColumnName("CreateTime") + .IsOptional(); + Property(t => t.CreateUser) + .HasColumnName("CreateUser") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/CategoryMap.cs b/OpenAuth.Repository/Models/Mapping/CategoryMap.cs index 282af842..7be0bace 100644 --- a/OpenAuth.Repository/Models/Mapping/CategoryMap.cs +++ b/OpenAuth.Repository/Models/Mapping/CategoryMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class CategoryMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public CategoryMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.CascadeId) .HasColumnName("CascadeId") @@ -34,22 +36,23 @@ namespace OpenAuth.Repository.Models.Mapping .HasColumnName("Name") .HasMaxLength(255) .IsRequired(); + Property(t => t.Code) + .HasColumnName("Code") + .HasMaxLength(255) + .IsOptional(); Property(t => t.Status) .HasColumnName("Status") .IsRequired(); Property(t => t.SortNo) .HasColumnName("SortNo") .IsRequired(); - Property(t => t.RootKey) - .HasColumnName("RootKey") - .HasMaxLength(100) - .IsRequired(); - Property(t => t.RootName) - .HasColumnName("RootName") - .HasMaxLength(200) - .IsRequired(); + Property(t => t.TypeId) + .HasColumnName("TypeId") + .HasMaxLength(50) + .IsOptional(); Property(t => t.ParentId) .HasColumnName("ParentId") + .HasMaxLength(50) .IsOptional(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/DicIndexMap.cs b/OpenAuth.Repository/Models/Mapping/CategoryTypeMap.cs similarity index 56% rename from OpenAuth.Repository/Models/Mapping/DicIndexMap.cs rename to OpenAuth.Repository/Models/Mapping/CategoryTypeMap.cs index cfe071fe..fbcf03cf 100644 --- a/OpenAuth.Repository/Models/Mapping/DicIndexMap.cs +++ b/OpenAuth.Repository/Models/Mapping/CategoryTypeMap.cs @@ -6,18 +6,19 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { - public partial class DicIndexMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + public partial class CategoryTypeMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { - public DicIndexMap() + public CategoryTypeMap() { // table - ToTable("DicIndex", "dbo"); + ToTable("CategoryType", "dbo"); // keys HasKey(t => t.Id); @@ -25,24 +26,22 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.Name) .HasColumnName("Name") .HasMaxLength(255) .IsRequired(); - Property(t => t.Key) - .HasColumnName("Key") - .HasMaxLength(100) - .IsRequired(); - Property(t => t.SortNo) - .HasColumnName("SortNo") - .IsRequired(); - Property(t => t.Description) - .HasColumnName("Description") - .HasMaxLength(200) - .IsRequired(); - Property(t => t.CategoryId) - .HasColumnName("CategoryId") + Property(t => t.Code) + .HasColumnName("Code") + .HasMaxLength(255) + .IsOptional(); + Property(t => t.CreateTime) + .HasColumnName("CreateTime") + .IsOptional(); + Property(t => t.CreateUser) + .HasColumnName("CreateUser") + .HasMaxLength(50) .IsOptional(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/DicDetailMap.cs b/OpenAuth.Repository/Models/Mapping/DicDetailMap.cs deleted file mode 100644 index 3404fbe9..00000000 --- a/OpenAuth.Repository/Models/Mapping/DicDetailMap.cs +++ /dev/null @@ -1,54 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -using OpenAuth.Domain; - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class DicDetailMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public DicDetailMap() - { - // table - ToTable("DicDetail", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.Value) - .HasColumnName("Value") - .HasMaxLength(100) - .IsRequired(); - Property(t => t.Text) - .HasColumnName("Text") - .HasMaxLength(100) - .IsRequired(); - Property(t => t.SortNo) - .HasColumnName("SortNo") - .IsRequired(); - Property(t => t.Status) - .HasColumnName("Status") - .IsRequired(); - Property(t => t.Description) - .HasColumnName("Description") - .HasMaxLength(100) - .IsRequired(); - Property(t => t.DicId) - .HasColumnName("DicId") - .IsRequired(); - - // Relationships - } - } -} diff --git a/OpenAuth.Repository/Models/Mapping/ModuleElementMap.cs b/OpenAuth.Repository/Models/Mapping/ModuleElementMap.cs index be0c2d09..62a3f0f3 100644 --- a/OpenAuth.Repository/Models/Mapping/ModuleElementMap.cs +++ b/OpenAuth.Repository/Models/Mapping/ModuleElementMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class ModuleElementMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public ModuleElementMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.DomId) .HasColumnName("DomId") @@ -63,6 +65,7 @@ namespace OpenAuth.Repository.Models.Mapping .IsRequired(); Property(t => t.ModuleId) .HasColumnName("ModuleId") + .HasMaxLength(50) .IsRequired(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/ModuleMap.cs b/OpenAuth.Repository/Models/Mapping/ModuleMap.cs index f9e85172..7e80ec20 100644 --- a/OpenAuth.Repository/Models/Mapping/ModuleMap.cs +++ b/OpenAuth.Repository/Models/Mapping/ModuleMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class ModuleMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public ModuleMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.CascadeId) .HasColumnName("CascadeId") @@ -42,8 +44,6 @@ namespace OpenAuth.Repository.Models.Mapping .HasColumnName("HotKey") .HasMaxLength(255) .IsRequired(); - Property(t => t.ParentId) - .HasColumnName("ParentId"); Property(t => t.IsLeaf) .HasColumnName("IsLeaf") .IsRequired(); @@ -68,6 +68,10 @@ namespace OpenAuth.Repository.Models.Mapping Property(t => t.SortNo) .HasColumnName("SortNo") .IsRequired(); + Property(t => t.ParentId) + .HasColumnName("ParentId") + .HasMaxLength(50) + .IsOptional(); // Relationships } diff --git a/OpenAuth.Repository/Models/Mapping/OrgMap.cs b/OpenAuth.Repository/Models/Mapping/OrgMap.cs index e96f3a25..3c7f1f15 100644 --- a/OpenAuth.Repository/Models/Mapping/OrgMap.cs +++ b/OpenAuth.Repository/Models/Mapping/OrgMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class OrgMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public OrgMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.CascadeId) .HasColumnName("CascadeId") @@ -77,6 +79,7 @@ namespace OpenAuth.Repository.Models.Mapping .IsRequired(); Property(t => t.ParentId) .HasColumnName("ParentId") + .HasMaxLength(50) .IsOptional(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/RelevanceMap.cs b/OpenAuth.Repository/Models/Mapping/RelevanceMap.cs index 6acddad6..38b70718 100644 --- a/OpenAuth.Repository/Models/Mapping/RelevanceMap.cs +++ b/OpenAuth.Repository/Models/Mapping/RelevanceMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class RelevanceMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public RelevanceMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.Description) .HasColumnName("Description") @@ -42,12 +44,15 @@ namespace OpenAuth.Repository.Models.Mapping .IsRequired(); Property(t => t.OperatorId) .HasColumnName("OperatorId") - .IsRequired(); + .HasMaxLength(50) + .IsOptional(); Property(t => t.FirstId) .HasColumnName("FirstId") + .HasMaxLength(50) .IsRequired(); Property(t => t.SecondId) .HasColumnName("SecondId") + .HasMaxLength(50) .IsRequired(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/ResourceMap.cs b/OpenAuth.Repository/Models/Mapping/ResourceMap.cs index 7a2b9657..31bac9c6 100644 --- a/OpenAuth.Repository/Models/Mapping/ResourceMap.cs +++ b/OpenAuth.Repository/Models/Mapping/ResourceMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class ResourceMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public ResourceMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.CascadeId) .HasColumnName("CascadeId") @@ -44,15 +46,21 @@ namespace OpenAuth.Repository.Models.Mapping Property(t => t.SortNo) .HasColumnName("SortNo") .IsRequired(); - Property(t => t.CategoryId) - .HasColumnName("CategoryId") - .IsRequired(); Property(t => t.Description) .HasColumnName("Description") .HasMaxLength(500) .IsRequired(); Property(t => t.ParentId) .HasColumnName("ParentId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CategoryId) + .HasColumnName("CategoryId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.AppId) + .HasColumnName("AppId") + .HasMaxLength(50) .IsOptional(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/RoleMap.cs b/OpenAuth.Repository/Models/Mapping/RoleMap.cs index 9d56ae2f..1cdb7a28 100644 --- a/OpenAuth.Repository/Models/Mapping/RoleMap.cs +++ b/OpenAuth.Repository/Models/Mapping/RoleMap.cs @@ -6,13 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - -using OpenAuth.Domain; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class RoleMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public RoleMap() { @@ -25,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.Name) .HasColumnName("Name") @@ -41,8 +43,9 @@ namespace OpenAuth.Repository.Models.Mapping .IsRequired(); Property(t => t.CreateId) .HasColumnName("CreateId") - .HasMaxLength(64) + .HasMaxLength(50) .IsRequired(); + // Relationships } } diff --git a/OpenAuth.Repository/Models/Mapping/StockMap.cs b/OpenAuth.Repository/Models/Mapping/StockMap.cs index 21fd6507..ededb284 100644 --- a/OpenAuth.Repository/Models/Mapping/StockMap.cs +++ b/OpenAuth.Repository/Models/Mapping/StockMap.cs @@ -1,57 +1,64 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -using OpenAuth.Domain; - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class StockMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public StockMap() - { - // table - ToTable("Stock", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.Name) - .HasColumnName("Name") - .HasMaxLength(500) - .IsRequired(); - Property(t => t.Number) - .HasColumnName("Number") - .IsRequired(); - Property(t => t.Price) - .HasColumnName("Price") - .HasPrecision(10, 1) - .IsRequired(); - Property(t => t.Status) - .HasColumnName("Status") - .IsRequired(); - Property(t => t.Viewable) - .HasColumnName("Viewable") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.Time) - .HasColumnName("Time") - .IsRequired(); - Property(t => t.OrgId) - .HasColumnName("OrgId") - .IsOptional(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class StockMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public StockMap() + { + // table + ToTable("Stock", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.Name) + .HasColumnName("Name") + .HasMaxLength(500) + .IsRequired(); + Property(t => t.Number) + .HasColumnName("Number") + .IsRequired(); + Property(t => t.Price) + .HasColumnName("Price") + .HasPrecision(10, 1) + .IsRequired(); + Property(t => t.Status) + .HasColumnName("Status") + .IsRequired(); + Property(t => t.Viewable) + .HasColumnName("Viewable") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.User) + .HasColumnName("User") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.Time) + .HasColumnName("Time") + .IsRequired(); + Property(t => t.OrgId) + .HasColumnName("OrgId") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/UserMap.cs b/OpenAuth.Repository/Models/Mapping/UserMap.cs index 74622c6c..3a27daf1 100644 --- a/OpenAuth.Repository/Models/Mapping/UserMap.cs +++ b/OpenAuth.Repository/Models/Mapping/UserMap.cs @@ -6,15 +6,14 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - using System; -using OpenAuth.Domain; - +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; namespace OpenAuth.Repository.Models.Mapping { public partial class UserMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration { public UserMap() { @@ -22,11 +21,12 @@ namespace OpenAuth.Repository.Models.Mapping ToTable("User", "dbo"); // keys - HasKey(t => t.Id); + HasKey(t => t.Id); // Properties Property(t => t.Id) .HasColumnName("Id") + .HasMaxLength(50) .IsRequired(); Property(t => t.Account) .HasColumnName("Account") @@ -58,6 +58,7 @@ namespace OpenAuth.Repository.Models.Mapping .IsRequired(); Property(t => t.CrateId) .HasColumnName("CrateId") + .HasMaxLength(50) .IsOptional(); // Relationships diff --git a/OpenAuth.Repository/Models/Mapping/WFFrmMainMap.cs b/OpenAuth.Repository/Models/Mapping/WFFrmMainMap.cs index 0a087f6d..b0d880b1 100644 --- a/OpenAuth.Repository/Models/Mapping/WFFrmMainMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFFrmMainMap.cs @@ -1,96 +1,101 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFFrmMainMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFFrmMainMap() - { - // table - ToTable("WF_FrmMain", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.FrmCode) - .HasColumnName("FrmCode") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.FrmName) - .HasColumnName("FrmName") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.FrmType) - .HasColumnName("FrmType") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.FrmDbId) - .HasColumnName("FrmDbId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.FrmTable) - .HasColumnName("FrmTable") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.IsSystemTable) - .HasColumnName("isSystemTable") - .IsOptional(); - Property(t => t.FrmTableId) - .HasColumnName("FrmTableId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.FrmContent) - .HasColumnName("FrmContent") - .IsOptional(); - Property(t => t.SortCode) - .HasColumnName("SortCode") - .IsOptional(); - Property(t => t.DeleteMark) - .HasColumnName("DeleteMark") - .IsOptional(); - Property(t => t.EnabledMark) - .HasColumnName("EnabledMark") - .IsOptional(); - Property(t => t.Description) - .HasColumnName("Description") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsOptional(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.ModifyDate) - .HasColumnName("ModifyDate") - .IsOptional(); - Property(t => t.ModifyUserId) - .HasColumnName("ModifyUserId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.ModifyUserName) - .HasColumnName("ModifyUserName") - .HasMaxLength(50) - .IsOptional(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFFrmMainMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFFrmMainMap() + { + // table + ToTable("WF_FrmMain", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.FrmCode) + .HasColumnName("FrmCode") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.FrmName) + .HasColumnName("FrmName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.FrmType) + .HasColumnName("FrmType") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.FrmTable) + .HasColumnName("FrmTable") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.FrmTableId) + .HasColumnName("FrmTableId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.IsSystemTable) + .HasColumnName("isSystemTable") + .IsOptional(); + Property(t => t.FrmContent) + .HasColumnName("FrmContent") + .HasMaxLength(16) + .IsOptional(); + Property(t => t.SortCode) + .HasColumnName("SortCode") + .IsOptional(); + Property(t => t.DeleteMark) + .HasColumnName("DeleteMark") + .IsOptional(); + Property(t => t.FrmDbId) + .HasColumnName("FrmDbId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.EnabledMark) + .HasColumnName("EnabledMark") + .IsOptional(); + Property(t => t.Description) + .HasColumnName("Description") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ModifyDate) + .HasColumnName("ModifyDate") + .IsOptional(); + Property(t => t.ModifyUserId) + .HasColumnName("ModifyUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ModifyUserName) + .HasColumnName("ModifyUserName") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFProcessInstanceMap.cs b/OpenAuth.Repository/Models/Mapping/WFProcessInstanceMap.cs index 835fb6ca..a215807c 100644 --- a/OpenAuth.Repository/Models/Mapping/WFProcessInstanceMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFProcessInstanceMap.cs @@ -1,92 +1,97 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFProcessInstanceMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFProcessInstanceMap() - { - // table - ToTable("WF_ProcessInstance", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.Code) - .HasColumnName("Code") - .HasMaxLength(200) - .IsRequired(); - Property(t => t.CustomName) - .HasColumnName("CustomName") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.ActivityId) - .HasColumnName("ActivityId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.ActivityType) - .HasColumnName("ActivityType") - .IsRequired(); - Property(t => t.ActivityName) - .HasColumnName("ActivityName") - .HasMaxLength(200) - .IsRequired(); - Property(t => t.PreviousId) - .HasColumnName("PreviousId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.ProcessSchemeId) - .HasColumnName("ProcessSchemeId") - .IsRequired(); - Property(t => t.SchemeType) - .HasColumnName("SchemeType") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.FrmType) - .HasColumnName("FrmType") - .IsOptional(); - Property(t => t.EnabledMark) - .HasColumnName("EnabledMark") - .IsRequired(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsRequired(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.WfLevel) - .HasColumnName("wfLevel") - .IsOptional(); - Property(t => t.Description) - .HasColumnName("Description") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.IsFinish) - .HasColumnName("isFinish") - .IsOptional(); - Property(t => t.MakerList) - .HasColumnName("MakerList") - .HasMaxLength(1000) - .IsOptional(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFProcessInstanceMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFProcessInstanceMap() + { + // table + ToTable("WF_ProcessInstance", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.Code) + .HasColumnName("Code") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.CustomName) + .HasColumnName("CustomName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.ActivityId) + .HasColumnName("ActivityId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ActivityType) + .HasColumnName("ActivityType") + .IsOptional(); + Property(t => t.ActivityName) + .HasColumnName("ActivityName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.ProcessSchemeId) + .HasColumnName("ProcessSchemeId") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.PreviousId) + .HasColumnName("PreviousId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.FrmType) + .HasColumnName("FrmType") + .IsOptional(); + Property(t => t.SchemeType) + .HasColumnName("SchemeType") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.EnabledMark) + .HasColumnName("EnabledMark") + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.WfLevel) + .HasColumnName("wfLevel") + .IsOptional(); + Property(t => t.Description) + .HasColumnName("Description") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.IsFinish) + .HasColumnName("isFinish") + .IsOptional(); + Property(t => t.MakerList) + .HasColumnName("MakerList") + .HasMaxLength(1000) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFProcessOperationHistoryMap.cs b/OpenAuth.Repository/Models/Mapping/WFProcessOperationHistoryMap.cs index 4cf6e399..b54dcd57 100644 --- a/OpenAuth.Repository/Models/Mapping/WFProcessOperationHistoryMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFProcessOperationHistoryMap.cs @@ -1,49 +1,54 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFProcessOperationHistoryMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFProcessOperationHistoryMap() - { - // table - ToTable("WF_ProcessOperationHistory", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.ProcessId) - .HasColumnName("ProcessId") - .IsRequired(); - Property(t => t.Content) - .HasColumnName("Content") - .HasMaxLength(200) - .IsRequired(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsRequired(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsRequired(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFProcessOperationHistoryMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFProcessOperationHistoryMap() + { + // table + ToTable("WF_ProcessOperationHistory", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.ProcessId) + .HasColumnName("ProcessId") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.Content) + .HasColumnName("Content") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFProcessSchemeMap.cs b/OpenAuth.Repository/Models/Mapping/WFProcessSchemeMap.cs index 7495f0fe..943a6bf0 100644 --- a/OpenAuth.Repository/Models/Mapping/WFProcessSchemeMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFProcessSchemeMap.cs @@ -1,44 +1,49 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFProcessSchemeMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFProcessSchemeMap() - { - // table - ToTable("WF_ProcessScheme", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.SchemeContent) - .HasColumnName("SchemeContent") - .IsRequired(); - Property(t => t.SchemeInfoId) - .HasColumnName("SchemeInfoId") - .IsRequired(); - Property(t => t.SchemeVersion) - .HasColumnName("SchemeVersion") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.ProcessType) - .HasColumnName("ProcessType") - .IsRequired(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFProcessSchemeMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFProcessSchemeMap() + { + // table + ToTable("WF_ProcessScheme", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.SchemeContent) + .HasColumnName("SchemeContent") + .IsOptional(); + Property(t => t.SchemeInfoId) + .HasColumnName("SchemeInfoId") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.SchemeVersion) + .HasColumnName("SchemeVersion") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ProcessType) + .HasColumnName("ProcessType") + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFProcessTransitionHistoryMap.cs b/OpenAuth.Repository/Models/Mapping/WFProcessTransitionHistoryMap.cs index 83b35764..59f30f70 100644 --- a/OpenAuth.Repository/Models/Mapping/WFProcessTransitionHistoryMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFProcessTransitionHistoryMap.cs @@ -1,73 +1,78 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFProcessTransitionHistoryMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFProcessTransitionHistoryMap() - { - // table - ToTable("WF_ProcessTransitionHistory", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.ProcessId) - .HasColumnName("ProcessId") - .IsRequired(); - Property(t => t.FromNodeId) - .HasColumnName("fromNodeId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.FromNodeType) - .HasColumnName("fromNodeType") - .IsOptional(); - Property(t => t.FromNodeName) - .HasColumnName("fromNodeName") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.ToNodeId) - .HasColumnName("toNodeId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.ToNodeType) - .HasColumnName("toNodeType") - .IsOptional(); - Property(t => t.ToNodeName) - .HasColumnName("toNodeName") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.TransitionSate) - .HasColumnName("TransitionSate") - .IsRequired(); - Property(t => t.IsFinish) - .HasColumnName("isFinish") - .IsRequired(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsRequired(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsRequired(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFProcessTransitionHistoryMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFProcessTransitionHistoryMap() + { + // table + ToTable("WF_ProcessTransitionHistory", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.ProcessId) + .HasColumnName("ProcessId") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.FromNodeId) + .HasColumnName("fromNodeId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.FromNodeType) + .HasColumnName("fromNodeType") + .IsOptional(); + Property(t => t.FromNodeName) + .HasColumnName("fromNodeName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.ToNodeId) + .HasColumnName("toNodeId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ToNodeType) + .HasColumnName("toNodeType") + .IsOptional(); + Property(t => t.ToNodeName) + .HasColumnName("toNodeName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.TransitionSate) + .HasColumnName("TransitionSate") + .IsOptional(); + Property(t => t.IsFinish) + .HasColumnName("isFinish") + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFSchemeContentMap.cs b/OpenAuth.Repository/Models/Mapping/WFSchemeContentMap.cs index 09050635..a5ed7f27 100644 --- a/OpenAuth.Repository/Models/Mapping/WFSchemeContentMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFSchemeContentMap.cs @@ -1,52 +1,57 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFSchemeContentMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFSchemeContentMap() - { - // table - ToTable("WF_SchemeContent", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.SchemeInfoId) - .HasColumnName("SchemeInfoId") - .IsRequired(); - Property(t => t.SchemeVersion) - .HasColumnName("SchemeVersion") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.SchemeContent) - .HasColumnName("SchemeContent") - .IsOptional(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsRequired(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsRequired(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFSchemeContentMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFSchemeContentMap() + { + // table + ToTable("WF_SchemeContent", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.SchemeInfoId) + .HasColumnName("SchemeInfoId") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.SchemeVersion) + .HasColumnName("SchemeVersion") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.SchemeContent) + .HasColumnName("SchemeContent") + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/Mapping/WFSchemeInfoMap.cs b/OpenAuth.Repository/Models/Mapping/WFSchemeInfoMap.cs index 43742a19..5f3901c4 100644 --- a/OpenAuth.Repository/Models/Mapping/WFSchemeInfoMap.cs +++ b/OpenAuth.Repository/Models/Mapping/WFSchemeInfoMap.cs @@ -1,91 +1,95 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a CodeSmith Template. -// -// DO NOT MODIFY contents of this file. Changes to this -// file will be lost if the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenAuth.Repository.Models.Mapping -{ - public partial class WFSchemeInfoMap - : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration - { - public WFSchemeInfoMap() - { - // table - ToTable("WF_SchemeInfo", "dbo"); - - // keys - HasKey(t => t.Id); - - // Properties - Property(t => t.Id) - .HasColumnName("Id") - .IsRequired(); - Property(t => t.SchemeCode) - .HasColumnName("SchemeCode") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.SchemeName) - .HasColumnName("SchemeName") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.SchemeType) - .HasColumnName("SchemeType") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.SchemeVersion) - .HasColumnName("SchemeVersion") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.SchemeCanUser) - .HasColumnName("SchemeCanUser") - .IsOptional(); - Property(t => t.FrmType) - .HasColumnName("FrmType") - .IsOptional(); - Property(t => t.AuthorizeType) - .HasColumnName("AuthorizeType") - .IsOptional(); - Property(t => t.SortCode) - .HasColumnName("SortCode") - .IsOptional(); - Property(t => t.DeleteMark) - .HasColumnName("DeleteMark") - .IsRequired(); - Property(t => t.EnabledMark) - .HasColumnName("EnabledMark") - .IsRequired(); - Property(t => t.Description) - .HasColumnName("Description") - .HasMaxLength(200) - .IsOptional(); - Property(t => t.CreateDate) - .HasColumnName("CreateDate") - .IsRequired(); - Property(t => t.CreateUserId) - .HasColumnName("CreateUserId") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.CreateUserName) - .HasColumnName("CreateUserName") - .HasMaxLength(50) - .IsRequired(); - Property(t => t.ModifyDate) - .HasColumnName("ModifyDate") - .IsOptional(); - Property(t => t.ModifyUserId) - .HasColumnName("ModifyUserId") - .HasMaxLength(50) - .IsOptional(); - Property(t => t.ModifyUserName) - .HasColumnName("ModifyUserName") - .HasMaxLength(50) - .IsOptional(); - - // Relationships - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a CodeSmith Template. +// +// DO NOT MODIFY contents of this file. Changes to this +// file will be lost if the code is regenerated. +// +//------------------------------------------------------------------------------ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace OpenAuth.Repository.Models.Mapping +{ + public partial class WFSchemeInfoMap + : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration + { + public WFSchemeInfoMap() + { + // table + ToTable("WF_SchemeInfo", "dbo"); + + // keys + HasKey(t => t.Id); + + // Properties + Property(t => t.Id) + .HasColumnName("Id") + .HasMaxLength(50) + .IsRequired(); + Property(t => t.SchemeCode) + .HasColumnName("SchemeCode") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.SchemeName) + .HasColumnName("SchemeName") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.SchemeType) + .HasColumnName("SchemeType") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.SchemeVersion) + .HasColumnName("SchemeVersion") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.SchemeCanUser) + .HasColumnName("SchemeCanUser") + .IsOptional(); + Property(t => t.FrmType) + .HasColumnName("FrmType") + .IsOptional(); + Property(t => t.AuthorizeType) + .HasColumnName("AuthorizeType") + .IsOptional(); + Property(t => t.SortCode) + .HasColumnName("SortCode") + .IsOptional(); + Property(t => t.DeleteMark) + .HasColumnName("DeleteMark") + .IsOptional(); + Property(t => t.EnabledMark) + .HasColumnName("EnabledMark") + .IsOptional(); + Property(t => t.Description) + .HasColumnName("Description") + .HasMaxLength(200) + .IsOptional(); + Property(t => t.CreateDate) + .HasColumnName("CreateDate") + .IsOptional(); + Property(t => t.CreateUserId) + .HasColumnName("CreateUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.CreateUserName) + .HasColumnName("CreateUserName") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ModifyDate) + .HasColumnName("ModifyDate") + .IsOptional(); + Property(t => t.ModifyUserId) + .HasColumnName("ModifyUserId") + .HasMaxLength(50) + .IsOptional(); + Property(t => t.ModifyUserName) + .HasColumnName("ModifyUserName") + .HasMaxLength(50) + .IsOptional(); + + // Relationships + } + } +} diff --git a/OpenAuth.Repository/Models/OpenAuthDBContext.cs b/OpenAuth.Repository/Models/OpenAuthDBContext.cs index 1b596acd..b20042e3 100644 --- a/OpenAuth.Repository/Models/OpenAuthDBContext.cs +++ b/OpenAuth.Repository/Models/OpenAuthDBContext.cs @@ -6,8 +6,9 @@ // file will be lost if the code is regenerated. // //------------------------------------------------------------------------------ - +using System; using System.Data.Entity; +using System.Collections.Generic; using OpenAuth.Domain; using OpenAuth.Repository.Models.Mapping; @@ -27,9 +28,9 @@ namespace OpenAuth.Repository.Models : base(nameOrConnectionString) { } + public System.Data.Entity.DbSet Applications { get; set; } public System.Data.Entity.DbSet Categories { get; set; } - public System.Data.Entity.DbSet DicDetails { get; set; } - public System.Data.Entity.DbSet DicIndices { get; set; } + public System.Data.Entity.DbSet CategoryTypes { get; set; } public System.Data.Entity.DbSet Modules { get; set; } public System.Data.Entity.DbSet ModuleElements { get; set; } public System.Data.Entity.DbSet Orgs { get; set; } @@ -48,9 +49,9 @@ namespace OpenAuth.Repository.Models protected override void OnModelCreating(DbModelBuilder modelBuilder) { + modelBuilder.Configurations.Add(new ApplicationMap()); modelBuilder.Configurations.Add(new CategoryMap()); - modelBuilder.Configurations.Add(new DicDetailMap()); - modelBuilder.Configurations.Add(new DicIndexMap()); + modelBuilder.Configurations.Add(new CategoryTypeMap()); modelBuilder.Configurations.Add(new ModuleMap()); modelBuilder.Configurations.Add(new ModuleElementMap()); modelBuilder.Configurations.Add(new OrgMap()); @@ -66,6 +67,7 @@ namespace OpenAuth.Repository.Models modelBuilder.Configurations.Add(new WFProcessTransitionHistoryMap()); modelBuilder.Configurations.Add(new WFSchemeContentMap()); modelBuilder.Configurations.Add(new WFSchemeInfoMap()); + } } } \ No newline at end of file diff --git a/OpenAuth.Repository/ModuleRepository.cs b/OpenAuth.Repository/ModuleRepository.cs index 5219b9bc..09aedac6 100644 --- a/OpenAuth.Repository/ModuleRepository.cs +++ b/OpenAuth.Repository/ModuleRepository.cs @@ -13,30 +13,30 @@ namespace OpenAuth.Repository return Context.Modules.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public int GetRoleCntInOrgs(params Guid[] orgIds) + public int GetRoleCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public int GetModuleCntInOrgs(params Guid[] orgIds) + public int GetModuleCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public void Delete(Guid id) + public void Delete(string id) { Delete(u =>u.Id == id); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { - var result = from role in Context.Modules.Where(u =>u.ParentId != null && orgId.Contains(u.ParentId.Value)) select role; + var result = from role in Context.Modules.Where(u =>u.ParentId != null && orgId.Contains(u.ParentId)) select role; return result; diff --git a/OpenAuth.Repository/OpenAuth.Repository.csproj b/OpenAuth.Repository/OpenAuth.Repository.csproj index c4806c59..0ca0b77f 100644 --- a/OpenAuth.Repository/OpenAuth.Repository.csproj +++ b/OpenAuth.Repository/OpenAuth.Repository.csproj @@ -55,6 +55,8 @@ + + @@ -65,8 +67,6 @@ - - diff --git a/OpenAuth.Repository/OrgRepository.cs b/OpenAuth.Repository/OrgRepository.cs index 550c4830..aff5bc19 100644 --- a/OpenAuth.Repository/OrgRepository.cs +++ b/OpenAuth.Repository/OrgRepository.cs @@ -18,7 +18,7 @@ namespace OpenAuth.Repository /// /// 加载用户的所有机构 /// - public IEnumerable LoadByUser(Guid userId) + public IEnumerable LoadByUser(string userId) { var result = from userorg in Context.Relevances join org in Context.Orgs on userorg.SecondId equals org.Id @@ -31,7 +31,7 @@ namespace OpenAuth.Repository /// /// 加载角色的所有机构 /// - public IEnumerable LoadByRole(Guid roleId) + public IEnumerable LoadByRole(string roleId) { var result = from userorg in Context.Relevances join org in Context.Orgs on userorg.SecondId equals org.Id @@ -41,10 +41,10 @@ namespace OpenAuth.Repository } - public IEnumerable GetSubOrgs(Guid orgId) + public IEnumerable GetSubOrgs(string orgId) { string cascadeId = "0."; - if (orgId != Guid.Empty) + if (orgId != string.Empty) { var org = FindSingle(u => u.Id == orgId); if (org == null) diff --git a/OpenAuth.Repository/RelevanceRepository.cs b/OpenAuth.Repository/RelevanceRepository.cs index 187413a4..99d4075a 100644 --- a/OpenAuth.Repository/RelevanceRepository.cs +++ b/OpenAuth.Repository/RelevanceRepository.cs @@ -8,7 +8,7 @@ namespace OpenAuth.Repository { public class RelevanceRepository : BaseRepository, IRelevanceRepository { - public void DeleteBy(string key, params Guid[] firstIds) + public void DeleteBy(string key, params string[] firstIds) { Delete(u => firstIds.Contains(u.FirstId) && u.Key == key); } @@ -18,7 +18,7 @@ namespace OpenAuth.Repository /// /// 关联标识 /// 关联的<firstId, secondId>数组 - public void DeleteBy(string key, ILookup idMaps) + public void DeleteBy(string key, ILookup idMaps) { foreach (var sameVals in idMaps) { @@ -34,7 +34,7 @@ namespace OpenAuth.Repository /// /// 关联标识 /// 关联的<firstId, secondId>数组 - public void AddRelevance(string key, ILookup idMaps) + public void AddRelevance(string key, ILookup idMaps) { DeleteBy(key, idMaps); BatchAdd((from sameVals in idMaps diff --git a/OpenAuth.Repository/ResourceRepository.cs b/OpenAuth.Repository/ResourceRepository.cs index 139af2e6..99febec3 100644 --- a/OpenAuth.Repository/ResourceRepository.cs +++ b/OpenAuth.Repository/ResourceRepository.cs @@ -8,21 +8,21 @@ namespace OpenAuth.Repository { public class ResourceRepository : BaseRepository, IResourceRepository { - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public void Delete(Guid id) + public void Delete(string id) { Delete(u => u.Id == id); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { - bool isZero = orgId.Length == 1 && orgId[0] == Guid.Empty; //判断传进来的是否为0 + bool isZero = orgId.Length == 1 && orgId[0] == string.Empty; //判断传进来的是否为0 var result = from resource in Context.Resources.Where(u =>isZero - || u.CascadeId != null &&orgId.Contains(u.CategoryId.Value)) select resource; + || u.CascadeId != null &&orgId.Contains(u.CategoryId)) select resource; return result; } @@ -32,7 +32,7 @@ namespace OpenAuth.Repository return Context.Resources.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public int GetResourceCntInOrgs(params Guid[] orgIds) + public int GetResourceCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } diff --git a/OpenAuth.Repository/RoleRepository.cs b/OpenAuth.Repository/RoleRepository.cs index 309f4b23..64604952 100644 --- a/OpenAuth.Repository/RoleRepository.cs +++ b/OpenAuth.Repository/RoleRepository.cs @@ -15,22 +15,22 @@ namespace OpenAuth.Repository return Context.Roles.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public int GetRoleCntInOrgs(params Guid[] orgIds) + public int GetRoleCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public void Delete(Guid id) + public void Delete(string id) { Delete(u =>u.Id == id); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { var roles = Context.Relevances.Where(u => u.Key == "RoleOrg" && orgId.Contains(u.SecondId)).Select(u => u.FirstId); //机构关联的角色 @@ -41,10 +41,10 @@ namespace OpenAuth.Repository } - public IEnumerable LoadForUser(Guid userId) + public IEnumerable LoadForUser(string userId) { - if (userId == Guid.Empty) + if (userId == string.Empty) return Find(null); var userRoleIds = diff --git a/OpenAuth.Repository/StockRepository.cs b/OpenAuth.Repository/StockRepository.cs index 392f4305..084f62de 100644 --- a/OpenAuth.Repository/StockRepository.cs +++ b/OpenAuth.Repository/StockRepository.cs @@ -14,25 +14,25 @@ namespace OpenAuth.Repository return Context.Stocks.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { - var result = from stock in Context.Stocks where stock.OrgId != null && orgId.Contains(stock.OrgId.Value) + var result = from stock in Context.Stocks where stock.OrgId != null && orgId.Contains(stock.OrgId) select stock; return result; } - public int GetStockCntInOrgs(params Guid[] orgIds) + public int GetStockCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize); } - public void Delete(Guid id) + public void Delete(string id) { Delete(u =>u.Id == id); } diff --git a/OpenAuth.Repository/UnitWork.cs b/OpenAuth.Repository/UnitWork.cs index b6765523..d8bffb85 100644 --- a/OpenAuth.Repository/UnitWork.cs +++ b/OpenAuth.Repository/UnitWork.cs @@ -64,7 +64,7 @@ namespace OpenAuth.Repository public void Add(T entity) where T : Domain.Entity { - entity.Id = Guid.NewGuid(); + entity.Id = Guid.NewGuid().ToString(); Context.Set().Add(entity); } @@ -76,7 +76,7 @@ namespace OpenAuth.Repository { foreach (var entity in entities) { - entity.Id = Guid.NewGuid(); + entity.Id = Guid.NewGuid().ToString(); } Context.Set().AddRange(entities); } diff --git a/OpenAuth.Repository/UserRepository.cs b/OpenAuth.Repository/UserRepository.cs index 3fb278a6..54492c3d 100644 --- a/OpenAuth.Repository/UserRepository.cs +++ b/OpenAuth.Repository/UserRepository.cs @@ -18,7 +18,7 @@ namespace OpenAuth.Repository return Context.Users.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize); } - public IEnumerable LoadInOrgs(params Guid[] orgId) + public IEnumerable LoadInOrgs(params string[] orgId) { var result = from user in Context.Users where ( @@ -32,12 +32,12 @@ namespace OpenAuth.Repository } - public int GetUserCntInOrgs(params Guid[] orgIds) + public int GetUserCntInOrgs(params string[] orgIds) { return LoadInOrgs(orgIds).Count(); } - public IEnumerable LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds) + public IEnumerable LoadInOrgs(int pageindex, int pagesize, params string[] orgIds) { return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize); } diff --git a/OpenAuth.UnitTest/TestAuthen.cs b/OpenAuth.UnitTest/TestAuthen.cs index 27226bf7..106adf62 100644 --- a/OpenAuth.UnitTest/TestAuthen.cs +++ b/OpenAuth.UnitTest/TestAuthen.cs @@ -1,4 +1,7 @@ using System; +using System.Diagnostics; +using System.Linq; +using Infrastructure; using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenAuth.Domain.Service; using OpenAuth.Repository; @@ -17,7 +20,10 @@ namespace OpenAuth.UnitTest AuthoriseFactory factory = new AuthoriseFactory(new UnitWork() ); var service= factory.Create("System"); - var orgs = service.Orgs; + var modules = service.Modules; + + var moduleTree = modules.GenerateTree(u => u.Id, u => u.ParentId).ToList(); + Debug.WriteLine(JsonHelper.Instance.Serialize(moduleTree)); } } } diff --git a/OpenAuth.UnitTest/TestOrg.cs b/OpenAuth.UnitTest/TestOrg.cs index 96c6f18f..872ca027 100644 --- a/OpenAuth.UnitTest/TestOrg.cs +++ b/OpenAuth.UnitTest/TestOrg.cs @@ -28,7 +28,7 @@ namespace OpenAuth.UnitTest int val = random.Next(); _app.AddOrUpdate(new Org { - Id = Guid.Empty, + Id = string.Empty, Name = "test" + val, CreateTime = DateTime.Now, ParentId = null, diff --git a/OpenAuth.UnitTest/TestUser.cs b/OpenAuth.UnitTest/TestUser.cs index 9d9be52e..dbd76956 100644 --- a/OpenAuth.UnitTest/TestUser.cs +++ b/OpenAuth.UnitTest/TestUser.cs @@ -45,7 +45,7 @@ namespace OpenAuth.UnitTest [TestMethod] public void GetUser() { - var users = _app.Load(new Guid("990cb229-cc18-41f3-8e2b-13f0f0110798"), 2, 30); + var users = _app.Load("990cb229-cc18-41f3-8e2b-13f0f0110798", 2, 30); Console.WriteLine(users.total); } diff --git a/OpenAuth.UnitTest/TestWorkflow.cs b/OpenAuth.UnitTest/TestWorkflow.cs index e9400a64..dee4d534 100644 --- a/OpenAuth.UnitTest/TestWorkflow.cs +++ b/OpenAuth.UnitTest/TestWorkflow.cs @@ -33,7 +33,7 @@ namespace OpenAuth.UnitTest string name = "请假" + DateTime.Now.ToString("yy-mm-dd_HH_mm_ss"); string str ="{\"Code\":\"请病假\",\"CustomName\":\""+name+"\",\"wfLevel1\":\"1\",\"wfLevel2\":\"2\",\"wfLevel3\":\"3\",\"Description\":\" \",\"EnabledMark\":1,\"wfLevel\":\"2\"}"; string frmData ="{\"4fcd4c6f-eb6b-6a6d-eb4e-7948763c5bba\":\"\",\"88061dda-642e-bcdb-909b-cea2bbe5ad69\":\" \"}"; - _runApp.CreateInstance(Guid.Empty, Guid.Parse("5f0ca3df-390a-4bd7-aecb-5304bf2d191c"), str.ToObject(), frmData); + _runApp.CreateInstance(string.Empty, (string)("5f0ca3df-390a-4bd7-aecb-5304bf2d191c"), str.ToObject(), frmData); } }