mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
调整结构
This commit is contained in:
@@ -29,7 +29,12 @@ namespace Infrastructure
|
||||
Func<T, K> 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<T>
|
||||
{
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载一个分类及子分类全部Categorys
|
||||
/// </summary>
|
||||
public GridData Load(Guid parentId, int pageindex, int pagesize)
|
||||
public GridData Load(string parentId, int pageindex, int pagesize)
|
||||
{
|
||||
IQueryable<Category> categories;
|
||||
int total = 0;
|
||||
if (parentId == Guid.Empty)
|
||||
if (parentId == string.Empty)
|
||||
{
|
||||
categories = _unitWork.Find<Category>(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
|
||||
/// <summary>
|
||||
/// 获取当前组织的所有下级组织
|
||||
/// </summary>
|
||||
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)
|
||||
|
@@ -8,7 +8,7 @@ namespace OpenAuth.App.Extention
|
||||
/// <summary>
|
||||
/// GUID
|
||||
/// </summary>
|
||||
public Guid processId { get; set; }
|
||||
public string processId { get; set; }
|
||||
/// <summary>
|
||||
/// 工作流模板内容
|
||||
/// </summary>
|
||||
|
@@ -41,7 +41,7 @@ namespace OpenAuth.App
|
||||
_moduleEleManService.AddOrUpdate(newbtn);
|
||||
}
|
||||
|
||||
public IEnumerable<ModuleElement> LoadByModuleId(Guid id)
|
||||
public IEnumerable<ModuleElement> LoadByModuleId(string id)
|
||||
{
|
||||
string username = AuthUtil.GetUserName();
|
||||
return _moduleEleManService.LoadByModuleId(username, id);
|
||||
@@ -56,13 +56,13 @@ namespace OpenAuth.App
|
||||
/// 当为UserElement时,表示UserId
|
||||
/// </param>
|
||||
/// <param name="moduleId">模块ID</param>
|
||||
public List<dynamic> LoadWithAccess(string accessType, Guid firstId, Guid moduleId)
|
||||
public List<dynamic> 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);
|
||||
}
|
||||
|
@@ -20,12 +20,12 @@ namespace OpenAuth.App
|
||||
/// <summary>
|
||||
/// 加载一个节点下面的所有
|
||||
/// </summary>
|
||||
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:这里会加载用户及用户角色的所有模块,“为用户分配模块”功能会给人一种混乱的感觉,但可以接受
|
||||
/// </summary>
|
||||
/// <param name="userId">The user unique identifier.</param>
|
||||
public List<Module> LoadForUser(Guid userId)
|
||||
public List<Module> LoadForUser(string userId)
|
||||
{
|
||||
return _moduleManService.LoadForUser(userId);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace OpenAuth.App
|
||||
/// 加载特定角色的模块
|
||||
/// </summary>
|
||||
/// <param name="roleId">The role unique identifier.</param>
|
||||
public List<Module> LoadForRole(Guid roleId)
|
||||
public List<Module> LoadForRole(string roleId)
|
||||
{
|
||||
return _moduleManService.LoadForRole(roleId);
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="orgId">The org unique identifier.</param>
|
||||
/// <returns>IEnumerable{Org}.</returns>
|
||||
public IList<Org> LoadDirectChildren(Guid orgId)
|
||||
public IList<Org> LoadDirectChildren(string orgId)
|
||||
{
|
||||
return _repository.Find(u => u.ParentId == orgId).ToList();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace OpenAuth.App
|
||||
/// 得到部门的所有子部门
|
||||
/// <para>如果orgId为0,表示取得所有部门</para>
|
||||
/// </summary>
|
||||
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
|
||||
/// <param name="org">The org.</param>
|
||||
/// <returns>System.Int32.</returns>
|
||||
/// <exception cref="System.Exception">未能找到该组织的父节点信息</exception>
|
||||
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
|
||||
/// <summary>
|
||||
/// 删除指定ID的部门及其所有子部门
|
||||
/// </summary>
|
||||
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:这里会加载用户及用户角色的所有角色,“为用户分配角色”功能会给人一种混乱的感觉,但可以接受
|
||||
/// </summary>
|
||||
/// <param name="userId">The user unique identifier.</param>
|
||||
public List<Org> LoadForUser(Guid userId)
|
||||
public List<Org> LoadForUser(string userId)
|
||||
{
|
||||
//用户角色
|
||||
var userRoleIds =
|
||||
@@ -124,7 +124,7 @@ namespace OpenAuth.App
|
||||
/// 加载特定角色的角色
|
||||
/// </summary>
|
||||
/// <param name="roleId">The role unique identifier.</param>
|
||||
public List<Org> LoadForRole(Guid roleId)
|
||||
public List<Org> 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)
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载一个节点下面的一个或全部Resources
|
||||
/// </summary>
|
||||
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
|
||||
/// </param>
|
||||
/// <param name="cId">分类ID</param>
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, Guid firstId, Guid cId)
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, string firstId, string cId)
|
||||
{
|
||||
return _resManagerService.LoadWithAccess(username, accessType, firstId, cId);
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ namespace OpenAuth.App
|
||||
/// <para>比如给用户分配资源,那么firstId就是用户ID,secIds就是资源ID列表</para>
|
||||
/// </summary>
|
||||
/// <param name="type">关联的类型,如"UserResource"</param>
|
||||
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
|
||||
/// <param name="type">关联的类型,如"UserResource"</param>
|
||||
/// <param name="firstId">The first identifier.</param>
|
||||
/// <param name="secIds">The sec ids.</param>
|
||||
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));
|
||||
}
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载一个部门及子部门全部Roles
|
||||
/// </summary>
|
||||
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<Role> 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
|
||||
/// <summary>
|
||||
/// 获取当前组织的所有下级组织
|
||||
/// </summary>
|
||||
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<Role>();
|
||||
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<Role> LoadForUser(Guid userId)
|
||||
public List<Role> LoadForUser(string userId)
|
||||
{
|
||||
return _repository.LoadForUser(userId).ToList();
|
||||
}
|
||||
|
||||
public List<RoleVM> LoadForOrgAndUser(Guid orgId, Guid userId)
|
||||
public List<RoleVM> 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<Guid> GetUsersInRole(string ruleName)
|
||||
public List<string> GetUsersInRole(string ruleName)
|
||||
{
|
||||
var role = _repository.FindSingle(u => u.Name == ruleName);
|
||||
if (role == null) return null;
|
||||
|
@@ -29,7 +29,7 @@ namespace OpenAuth.App.SSO
|
||||
{
|
||||
userInfo = new User
|
||||
{
|
||||
Id = Guid.Empty,
|
||||
Id = string.Empty,
|
||||
Account = "System",
|
||||
Name ="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա",
|
||||
Password = "123456"
|
||||
|
@@ -17,12 +17,12 @@ namespace OpenAuth.App
|
||||
/// <summary>
|
||||
/// 根据部门ID得到进出库信息
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载一个部门及子部门全部用户
|
||||
/// </summary>
|
||||
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<User> 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
|
||||
/// <summary>
|
||||
/// 获取当前组织的所有下级组织
|
||||
/// </summary>
|
||||
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<User> GetUsers(IEnumerable<Guid> userids)
|
||||
public IEnumerable<User> GetUsers(IEnumerable<string> userids)
|
||||
{
|
||||
return _repository.Find(u => userids.Contains(u.Id));
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ namespace OpenAuth.App.ViewModel
|
||||
/// ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Guid Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
@@ -29,7 +29,7 @@ namespace OpenAuth.App.ViewModel
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Guid? ParentId { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 节点图标文件名称
|
||||
|
@@ -24,7 +24,7 @@ namespace OpenAuth.App.ViewModel
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Guid Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
|
@@ -12,7 +12,7 @@ namespace OpenAuth.App.ViewModel
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Guid Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@@ -25,12 +25,12 @@ namespace OpenAuth.App
|
||||
return _unitWork.Find<WFFrmMain>(null).ToList();
|
||||
}
|
||||
|
||||
public WFFrmMain GetForm(Guid keyValue)
|
||||
public WFFrmMain GetForm(string keyValue)
|
||||
{
|
||||
return _unitWork.FindSingle<WFFrmMain>(u => u.Id == keyValue);
|
||||
}
|
||||
|
||||
public void RemoveForm(Guid[] keyValue)
|
||||
public void RemoveForm(string[] keyValue)
|
||||
{
|
||||
_unitWork.Delete<WFFrmMain>(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();
|
||||
|
@@ -29,7 +29,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="keyVlaue"></param>
|
||||
/// <returns></returns>
|
||||
public WFProcessInstance GetEntity(Guid keyVlaue)
|
||||
public WFProcessInstance GetEntity(string keyVlaue)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -50,11 +50,11 @@ namespace OpenAuth.App
|
||||
/// <param name="processSchemeEntity"></param>
|
||||
/// <param name="wfOperationHistoryEntity"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="keyValue">主键</param>
|
||||
/// <returns></returns>
|
||||
public int DeleteProcess(Guid keyValue)
|
||||
public int DeleteProcess(string keyValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -232,7 +232,7 @@ namespace OpenAuth.App
|
||||
/// <param name="keyValue"></param>
|
||||
/// <param name="state">0暂停,1启用,2取消(召回)</param>
|
||||
/// <returns></returns>
|
||||
public int OperateVirtualProcess(Guid keyValue,int state)
|
||||
public int OperateVirtualProcess(string keyValue,int state)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -288,7 +288,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="processId"></param>
|
||||
/// <param name="makeLists"></param>
|
||||
public void DesignateProcess(Guid processId, string makeLists)
|
||||
public void DesignateProcess(string processId, string makeLists)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -345,7 +345,7 @@ namespace OpenAuth.App
|
||||
/// <param name="description">备注</param>
|
||||
/// <param name="frmData">表单数据信息</param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="processId"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
/// <param name="nodeId"></param>
|
||||
/// <param name="description"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
/// 召回流程进程
|
||||
/// </summary>
|
||||
/// <param name="processId"></param>
|
||||
public void CallingBackProcess(Guid processId)
|
||||
public void CallingBackProcess(string processId)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -706,7 +706,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="processId"></param>
|
||||
/// <returns></returns>
|
||||
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<WFProcessScheme>(u => u.Id == keyValue);
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="keyValue">The key value.</param>
|
||||
/// <returns>WFProcessScheme.</returns>
|
||||
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
|
||||
/// <param name="keyValue">The key value.</param>
|
||||
/// <param name="nodeId">The node identifier.</param>
|
||||
/// <returns>WFProcessScheme.</returns>
|
||||
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<WFProcessInstance>(u => u.Id == keyValue);
|
||||
}
|
||||
@@ -1033,7 +1033,7 @@ namespace OpenAuth.App
|
||||
/// </summary>
|
||||
/// <param name="processId">The process identifier.</param>
|
||||
/// <param name="verificationData">The verification data.</param>
|
||||
public void VerificationProcess(Guid processId, string verificationData)
|
||||
public void VerificationProcess(string processId, string verificationData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@ namespace OpenAuth.App
|
||||
}
|
||||
else
|
||||
{
|
||||
Guid schemeid = Guid.Parse(keyValue);
|
||||
string schemeid = (string)(keyValue);
|
||||
WFSchemeContent modelentityold =
|
||||
_unitWork.FindSingle<WFSchemeContent>(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<WFSchemeInfo>(u =>keyValue.Contains(u.Id));
|
||||
_unitWork.Delete<WFSchemeContent>(u =>keyValue.Contains(u.SchemeInfoId));
|
||||
}
|
||||
|
||||
public WFSchemeInfo GetEntity(Guid keyValue)
|
||||
public WFSchemeInfo GetEntity(string keyValue)
|
||||
{
|
||||
return _unitWork.FindSingle<WFSchemeInfo>(u => u.Id == keyValue);
|
||||
}
|
||||
|
||||
public WFSchemeContent GetSchemeEntity(Guid schemeinfoId, string schemeinfoSchemeVersion)
|
||||
public WFSchemeContent GetSchemeEntity(string schemeinfoId, string schemeinfoSchemeVersion)
|
||||
{
|
||||
return _unitWork.FindSingle<WFSchemeContent>(u =>
|
||||
u.SchemeInfoId == schemeinfoId && u.SchemeVersion == schemeinfoSchemeVersion);
|
||||
|
66
OpenAuth.Domain/Core/Application.cs
Normal file
66
OpenAuth.Domain/Core/Application.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// 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
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 应用ID
|
||||
/// </summary>
|
||||
public string AppId { get; set; }
|
||||
/// <summary>
|
||||
/// 应用密钥
|
||||
/// </summary>
|
||||
public string AppKey { get; set; }
|
||||
/// <summary>
|
||||
/// 应用描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// 应用图标
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
/// <summary>
|
||||
/// 是否可用
|
||||
/// </summary>
|
||||
public bool Disable { get; set; }
|
||||
/// <summary>
|
||||
/// 创建日期
|
||||
/// </summary>
|
||||
public System.DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public string CreateUser { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -21,10 +22,11 @@ namespace OpenAuth.Domain
|
||||
{
|
||||
this.CascadeId= string.Empty;
|
||||
this.Name= string.Empty;
|
||||
this.Code= string.Empty;
|
||||
this.Status= 0;
|
||||
this.SortNo= 0;
|
||||
this.RootKey= string.Empty;
|
||||
this.RootName= string.Empty;
|
||||
this.TypeId= string.Empty;
|
||||
this.ParentId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +37,10 @@ namespace OpenAuth.Domain
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 当前状态
|
||||
/// </summary>
|
||||
@@ -46,15 +52,11 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
/// 分类所属科目
|
||||
/// </summary>
|
||||
public string RootKey { get; set; }
|
||||
/// <summary>
|
||||
/// 分类所属科目名称
|
||||
/// </summary>
|
||||
public string RootName { get; set; }
|
||||
public string TypeId { get; set; }
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
public System.Guid? ParentId { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,22 +7,23 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据字典
|
||||
/// 分类类型
|
||||
/// </summary>
|
||||
public partial class DicIndex :Entity
|
||||
public partial class CategoryType : Entity
|
||||
{
|
||||
public DicIndex()
|
||||
public CategoryType()
|
||||
{
|
||||
this.Name= string.Empty;
|
||||
this.Key= string.Empty;
|
||||
this.SortNo= 0;
|
||||
this.Description= string.Empty;
|
||||
this.Code= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateUser= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,21 +31,17 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 编码
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// 创建日期
|
||||
/// </summary>
|
||||
public int SortNo { get; set; }
|
||||
public System.DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// 所属分类
|
||||
/// </summary>
|
||||
public System.Guid? CategoryId { get; set; }
|
||||
public string CreateUser { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// 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
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据字典详情
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
/// <summary>
|
||||
/// 文本描述
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
public int SortNo { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// 所属字典ID
|
||||
/// </summary>
|
||||
public System.Guid DicId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace OpenAuth.Domain
|
||||
this.ParentName= string.Empty;
|
||||
this.Vector= string.Empty;
|
||||
this.SortNo= 0;
|
||||
this.ParentId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,10 +48,6 @@ namespace OpenAuth.Domain
|
||||
/// 热键
|
||||
/// </summary>
|
||||
public string HotKey { get; set; }
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 是否叶子节点
|
||||
/// </summary>
|
||||
@@ -78,6 +76,10 @@ namespace OpenAuth.Domain
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
public int SortNo { get; set; }
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
public string ParentId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace OpenAuth.Domain
|
||||
this.Class= string.Empty;
|
||||
this.Remark= string.Empty;
|
||||
this.Sort= 0;
|
||||
this.ModuleId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -67,9 +69,9 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public int Sort { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 功能模块Id
|
||||
/// </summary>
|
||||
public System.Guid ModuleId { get; set; }
|
||||
public string ModuleId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -31,6 +32,7 @@ namespace OpenAuth.Domain
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CreateId= 0;
|
||||
this.SortNo= 0;
|
||||
this.ParentId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -92,7 +94,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
public System.Guid? ParentId { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -23,7 +24,9 @@ namespace OpenAuth.Domain
|
||||
this.Key= string.Empty;
|
||||
this.Status= 0;
|
||||
this.OperateTime= DateTime.Now;
|
||||
this.OperatorId= 0;
|
||||
this.OperatorId= string.Empty;
|
||||
this.FirstId= string.Empty;
|
||||
this.SecondId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,7 +34,7 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 映射标识
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
/// <summary>
|
||||
@@ -45,15 +48,15 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
/// 授权人
|
||||
/// </summary>
|
||||
public int OperatorId { get; set; }
|
||||
public string OperatorId { get; set; }
|
||||
/// <summary>
|
||||
/// 第一个表主键ID
|
||||
/// </summary>
|
||||
public System.Guid FirstId { get; set; }
|
||||
public string FirstId { get; set; }
|
||||
/// <summary>
|
||||
/// 第二个表主键ID
|
||||
/// </summary>
|
||||
public System.Guid SecondId { get; set; }
|
||||
public string SecondId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -25,6 +26,9 @@ namespace OpenAuth.Domain
|
||||
this.Status= 0;
|
||||
this.SortNo= 0;
|
||||
this.Description= string.Empty;
|
||||
this.ParentId= string.Empty;
|
||||
this.CategoryId= string.Empty;
|
||||
this.AppId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,7 +36,7 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public string CascadeId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 资源英文唯一标识
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
/// <summary>
|
||||
@@ -47,10 +51,6 @@ namespace OpenAuth.Domain
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
public int SortNo { get; set; }
|
||||
/// <summary>
|
||||
/// 资源分类
|
||||
/// </summary>
|
||||
public Guid? CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
@@ -58,7 +58,15 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
/// 父节点流水号
|
||||
/// </summary>
|
||||
public System.Guid? ParentId { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 资源分类
|
||||
/// </summary>
|
||||
public string CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 资源所属应用
|
||||
/// </summary>
|
||||
public string AppId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
|
@@ -7,8 +7,9 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
@@ -24,7 +25,9 @@ namespace OpenAuth.Domain
|
||||
this.Price= 0;
|
||||
this.Status= 0;
|
||||
this.Viewable= string.Empty;
|
||||
this.User= string.Empty;
|
||||
this.Time= DateTime.Now;
|
||||
this.OrgId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -44,9 +47,13 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 可见范围
|
||||
/// </summary>
|
||||
public string Viewable { get; set; }
|
||||
/// <summary>
|
||||
/// 操作人
|
||||
/// </summary>
|
||||
public string User { get; set; }
|
||||
/// <summary>
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
@@ -54,7 +61,7 @@ namespace OpenAuth.Domain
|
||||
/// <summary>
|
||||
/// 组织ID
|
||||
/// </summary>
|
||||
public System.Guid? OrgId { get; set; }
|
||||
public string OrgId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -7,13 +7,14 @@
|
||||
// Author:Yubao Li
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 用户基本信息表
|
||||
/// </summary>
|
||||
public partial class User : Entity
|
||||
{
|
||||
@@ -27,43 +28,45 @@ namespace OpenAuth.Domain
|
||||
this.Type= 0;
|
||||
this.BizCode= string.Empty;
|
||||
this.CreateTime= DateTime.Now;
|
||||
this.CrateId= string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 用户登录帐号
|
||||
/// </summary>
|
||||
public string Account { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 用户姓名
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 性别
|
||||
/// </summary>
|
||||
public int Sex { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 用户状态
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 用户类型
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 业务对照码
|
||||
/// </summary>
|
||||
public string BizCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 经办时间
|
||||
/// </summary>
|
||||
public System.DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public System.Guid? CrateId { get; set; }
|
||||
public string CrateId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单模板表
|
||||
/// </summary>
|
||||
public partial class WFFrmMain : Entity
|
||||
{
|
||||
@@ -23,10 +23,10 @@ namespace OpenAuth.Domain
|
||||
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.FrmDbId= string.Empty;
|
||||
this.Description= string.Empty;
|
||||
this.CreateDate= DateTime.Now;
|
||||
this.CreateUserId= string.Empty;
|
||||
@@ -37,75 +37,75 @@ namespace OpenAuth.Domain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单编号
|
||||
/// </summary>
|
||||
public string FrmCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单名称
|
||||
/// </summary>
|
||||
public string FrmName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单分类
|
||||
/// </summary>
|
||||
public string FrmType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FrmDbId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 数据表
|
||||
/// </summary>
|
||||
public string FrmTable { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? IsSystemTable { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 关联表的主键
|
||||
/// </summary>
|
||||
public string FrmTableId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 是否需要建表0不建表,1建表
|
||||
/// </summary>
|
||||
public int? IsSystemTable { get; set; }
|
||||
/// <summary>
|
||||
/// 表单内容
|
||||
/// </summary>
|
||||
public string FrmContent { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 排序码
|
||||
/// </summary>
|
||||
public int? SortCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 删除标记
|
||||
/// </summary>
|
||||
public int? DeleteMark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 数据库Id
|
||||
/// </summary>
|
||||
public string FrmDbId { get; set; }
|
||||
/// <summary>
|
||||
/// 有效
|
||||
/// </summary>
|
||||
public int? EnabledMark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public System.DateTime? ModifyDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改用户主键
|
||||
/// </summary>
|
||||
public string ModifyUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
public string ModifyUserName { get; set; }
|
||||
|
||||
|
@@ -14,7 +14,7 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流流程实例表
|
||||
/// </summary>
|
||||
public partial class WFProcessInstance : Entity
|
||||
{
|
||||
@@ -23,12 +23,10 @@ namespace OpenAuth.Domain
|
||||
this.Code= string.Empty;
|
||||
this.CustomName= string.Empty;
|
||||
this.ActivityId= string.Empty;
|
||||
this.ActivityType= 0;
|
||||
this.ActivityName= string.Empty;
|
||||
this.ProcessSchemeId= 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;
|
||||
@@ -37,71 +35,71 @@ namespace OpenAuth.Domain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 实例编号
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 自定义名称
|
||||
/// </summary>
|
||||
public string CustomName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 当前节点ID
|
||||
/// </summary>
|
||||
public string ActivityId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 当前节点类型(0会签节点)
|
||||
/// </summary>
|
||||
public int ActivityType { get; set; }
|
||||
public int? ActivityType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 当前节点名称
|
||||
/// </summary>
|
||||
public string ActivityName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程实例模板Id
|
||||
/// </summary>
|
||||
public string ProcessSchemeId { get; set; }
|
||||
/// <summary>
|
||||
/// 前一个ID
|
||||
/// </summary>
|
||||
public string PreviousId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Guid ProcessSchemeId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string SchemeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单类型
|
||||
/// </summary>
|
||||
public int? FrmType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程类型
|
||||
/// </summary>
|
||||
public int EnabledMark { get; set; }
|
||||
public string SchemeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 有效标志
|
||||
/// </summary>
|
||||
public System.DateTime CreateDate { get; set; }
|
||||
public int? EnabledMark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 等级
|
||||
/// </summary>
|
||||
public int? WfLevel { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 实例备注
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 是否完成
|
||||
/// </summary>
|
||||
public int? IsFinish { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 执行人
|
||||
/// </summary>
|
||||
public string MakerList { get; set; }
|
||||
|
||||
@@ -117,10 +115,11 @@ namespace OpenAuth.Domain
|
||||
/// 编辑调用
|
||||
/// </summary>
|
||||
/// <param name="keyValue"></param>
|
||||
public void Modify(Guid keyValue)
|
||||
public void Modify(string keyValue)
|
||||
{
|
||||
this.Id = keyValue;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
@@ -14,13 +14,13 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流实例操作记录
|
||||
/// </summary>
|
||||
public partial class WFProcessOperationHistory : Entity
|
||||
{
|
||||
public WFProcessOperationHistory()
|
||||
{
|
||||
this.ProcessId= Guid.Empty;
|
||||
this.ProcessId= string.Empty;
|
||||
this.Content= string.Empty;
|
||||
this.CreateDate= DateTime.Now;
|
||||
this.CreateUserId= string.Empty;
|
||||
@@ -28,23 +28,23 @@ namespace OpenAuth.Domain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 实例进程Id
|
||||
/// </summary>
|
||||
public Guid ProcessId { get; set; }
|
||||
public string ProcessId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 操作内容
|
||||
/// </summary>
|
||||
public string Content { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public System.DateTime CreateDate { get; set; }
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
|
@@ -14,35 +14,33 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流实例模板对应表
|
||||
/// </summary>
|
||||
public partial class WFProcessScheme : Entity
|
||||
{
|
||||
public WFProcessScheme()
|
||||
{
|
||||
this.SchemeContent= string.Empty;
|
||||
this.SchemeInfoId= Guid.Empty;
|
||||
this.SchemeInfoId= string.Empty;
|
||||
this.SchemeVersion= string.Empty;
|
||||
this.ProcessType= 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程模板内容
|
||||
/// </summary>
|
||||
public string SchemeContent { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程模板ID
|
||||
/// </summary>
|
||||
public Guid SchemeInfoId { get; set; }
|
||||
public string SchemeInfoId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程内容版本
|
||||
/// </summary>
|
||||
public string SchemeVersion { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 类型(0正常,3草稿)
|
||||
/// </summary>
|
||||
public int ProcessType { get; set; }
|
||||
|
||||
public int? ProcessType { get; set; }
|
||||
|
||||
#region 扩展操作
|
||||
/// <summary>
|
||||
@@ -50,16 +48,17 @@ namespace OpenAuth.Domain
|
||||
/// </summary>
|
||||
public void Create()
|
||||
{
|
||||
this.Id = Guid.NewGuid();
|
||||
this.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑调用
|
||||
/// </summary>
|
||||
/// <param name="keyValue"></param>
|
||||
public void Modify(Guid keyValue)
|
||||
public void Modify(string keyValue)
|
||||
{
|
||||
this.Id = keyValue;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
@@ -14,70 +14,68 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流实例流转历史记录
|
||||
/// </summary>
|
||||
public partial class WFProcessTransitionHistory : Entity
|
||||
{
|
||||
public WFProcessTransitionHistory()
|
||||
{
|
||||
this.ProcessId= Guid.Empty;
|
||||
this.ProcessId= string.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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 实例进程Id
|
||||
/// </summary>
|
||||
public Guid ProcessId { get; set; }
|
||||
public string ProcessId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 开始节点Id
|
||||
/// </summary>
|
||||
public string FromNodeId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 开始节点类型
|
||||
/// </summary>
|
||||
public int? FromNodeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 开始节点名称
|
||||
/// </summary>
|
||||
public string FromNodeName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 结束节点Id
|
||||
/// </summary>
|
||||
public string ToNodeId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 结束节点类型
|
||||
/// </summary>
|
||||
public int? ToNodeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 结束节点名称
|
||||
/// </summary>
|
||||
public string ToNodeName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 转化状态
|
||||
/// </summary>
|
||||
public int TransitionSate { get; set; }
|
||||
public int? TransitionSate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 是否结束
|
||||
/// </summary>
|
||||
public int IsFinish { get; set; }
|
||||
public int? IsFinish { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 转化时间
|
||||
/// </summary>
|
||||
public System.DateTime CreateDate { get; set; }
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 操作人Id
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 操作人名称
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
|
@@ -14,13 +14,13 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流模板内容表
|
||||
/// </summary>
|
||||
public partial class WFSchemeContent : Entity
|
||||
{
|
||||
public WFSchemeContent()
|
||||
{
|
||||
this.SchemeInfoId= Guid.Empty;
|
||||
this.SchemeInfoId= string.Empty;
|
||||
this.SchemeVersion= string.Empty;
|
||||
this.SchemeContent= string.Empty;
|
||||
this.CreateDate= DateTime.Now;
|
||||
@@ -29,27 +29,27 @@ namespace OpenAuth.Domain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流模板信息主键Id
|
||||
/// </summary>
|
||||
public Guid SchemeInfoId { get; set; }
|
||||
public string SchemeInfoId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程内容版本
|
||||
/// </summary>
|
||||
public string SchemeVersion { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程内容
|
||||
/// </summary>
|
||||
public string SchemeContent { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public System.DateTime CreateDate { get; set; }
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
|
@@ -14,7 +14,7 @@ using System.Text;
|
||||
namespace OpenAuth.Domain
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 工作流模板信息表
|
||||
/// </summary>
|
||||
public partial class WFSchemeInfo : Entity
|
||||
{
|
||||
@@ -25,8 +25,6 @@ namespace OpenAuth.Domain
|
||||
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;
|
||||
@@ -37,71 +35,71 @@ namespace OpenAuth.Domain
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程编号
|
||||
/// </summary>
|
||||
public string SchemeCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程名称
|
||||
/// </summary>
|
||||
public string SchemeName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程分类
|
||||
/// </summary>
|
||||
public string SchemeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程内容版本
|
||||
/// </summary>
|
||||
public string SchemeVersion { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 流程模板使用者
|
||||
/// </summary>
|
||||
public string SchemeCanUser { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 表单类型
|
||||
/// </summary>
|
||||
public int? FrmType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 模板权限类型0所有人,1指定成员
|
||||
/// </summary>
|
||||
public int? AuthorizeType { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 排序码
|
||||
/// </summary>
|
||||
public int? SortCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 删除标记
|
||||
/// </summary>
|
||||
public int DeleteMark { get; set; }
|
||||
public int? DeleteMark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 有效
|
||||
/// </summary>
|
||||
public int EnabledMark { get; set; }
|
||||
public int? EnabledMark { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public System.DateTime CreateDate { get; set; }
|
||||
public System.DateTime? CreateDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户主键
|
||||
/// </summary>
|
||||
public string CreateUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string CreateUserName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public System.DateTime? ModifyDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改用户主键
|
||||
/// </summary>
|
||||
public string ModifyUserId { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
public string ModifyUserName { get; set; }
|
||||
|
||||
|
@@ -8,16 +8,16 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Category> LoadCategorys(int pageindex, int pagesize);
|
||||
|
||||
IEnumerable<Category> LoadInOrgs(params Guid[] orgId);
|
||||
int GetCategoryCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<Category> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<Category> LoadInOrgs(params string[] orgId);
|
||||
int GetCategoryCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<Category> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
|
||||
/// <summary>
|
||||
/// 获取子分类ID
|
||||
/// </summary>
|
||||
Guid[] GetSubIds(Guid orgId);
|
||||
string[] GetSubIds(string orgId);
|
||||
|
||||
void Delete(Guid id);
|
||||
void Delete(string id);
|
||||
|
||||
}
|
||||
}
|
@@ -8,12 +8,12 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Module> LoadModules(int pageindex, int pagesize);
|
||||
|
||||
IEnumerable<Module> LoadInOrgs(params Guid[] orgId);
|
||||
int GetModuleCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<Module> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<Module> LoadInOrgs(params string[] orgId);
|
||||
int GetModuleCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<Module> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
|
||||
|
||||
void Delete(Guid id);
|
||||
void Delete(string id);
|
||||
|
||||
}
|
||||
}
|
@@ -10,14 +10,14 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Org> LoadOrgs();
|
||||
|
||||
IEnumerable<Org> LoadByUser(Guid userId);
|
||||
IEnumerable<Org> LoadByUser(string userId);
|
||||
|
||||
IEnumerable<Org> LoadByRole(Guid roleId);
|
||||
IEnumerable<Org> LoadByRole(string roleId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取包括自己在内的全部子部门
|
||||
/// </summary>
|
||||
/// <param name="orgId">部门ID</param>
|
||||
IEnumerable<Org> GetSubOrgs(Guid orgId);
|
||||
IEnumerable<Org> GetSubOrgs(string orgId);
|
||||
}
|
||||
}
|
||||
|
@@ -20,9 +20,9 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
public interface IRelevanceRepository : IRepository<Relevance>
|
||||
{
|
||||
void DeleteBy(string key, params Guid[] firstIds);
|
||||
void DeleteBy(string key, ILookup<Guid, Guid> idMaps);
|
||||
void DeleteBy(string key, params string[] firstIds);
|
||||
void DeleteBy(string key, ILookup<string, string> idMaps);
|
||||
|
||||
void AddRelevance( string key, ILookup<Guid, Guid> idMaps);
|
||||
void AddRelevance( string key, ILookup<string, string> idMaps);
|
||||
}
|
||||
}
|
||||
|
@@ -8,11 +8,11 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Resource> LoadResources(int pageindex, int pagesize);
|
||||
|
||||
IEnumerable<Resource> LoadInOrgs(params Guid[] orgId);
|
||||
int GetResourceCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<Resource> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<Resource> LoadInOrgs(params string[] orgId);
|
||||
int GetResourceCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<Resource> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
|
||||
void Delete(Guid id);
|
||||
void Delete(string id);
|
||||
|
||||
}
|
||||
}
|
@@ -8,12 +8,12 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Role> LoadRoles(int pageindex, int pagesize);
|
||||
|
||||
int GetRoleCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<Role> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<Role> LoadInOrgs(params Guid[] orgId);
|
||||
IEnumerable<Role> LoadForUser(Guid userId);
|
||||
int GetRoleCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<Role> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
IEnumerable<Role> LoadInOrgs(params string[] orgId);
|
||||
IEnumerable<Role> LoadForUser(string userId);
|
||||
|
||||
void Delete(Guid id);
|
||||
void Delete(string id);
|
||||
|
||||
}
|
||||
}
|
@@ -8,11 +8,11 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<Stock> LoadStocks(int pageindex, int pagesize);
|
||||
|
||||
IEnumerable<Stock> LoadInOrgs(params Guid[] orgId);
|
||||
int GetStockCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<Stock> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<Stock> LoadInOrgs(params string[] orgId);
|
||||
int GetStockCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<Stock> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
|
||||
void Delete(Guid id);
|
||||
void Delete(string id);
|
||||
|
||||
}
|
||||
}
|
@@ -8,9 +8,9 @@ namespace OpenAuth.Domain.Interface
|
||||
{
|
||||
IEnumerable<User> LoadUsers(int pageindex, int pagesize);
|
||||
|
||||
IEnumerable<User> LoadInOrgs(params Guid[] orgId);
|
||||
int GetUserCntInOrgs(params Guid[] orgIds);
|
||||
IEnumerable<User> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds);
|
||||
IEnumerable<User> LoadInOrgs(params string[] orgId);
|
||||
int GetUserCntInOrgs(params string[] orgIds);
|
||||
IEnumerable<User> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds);
|
||||
|
||||
}
|
||||
}
|
@@ -42,10 +42,10 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Core\Application.cs" />
|
||||
<Compile Include="Core\Category.cs" />
|
||||
<Compile Include="Core\CategoryType.cs" />
|
||||
<Compile Include="Core\UserExt.cs" />
|
||||
<Compile Include="Core\DicDetail.cs" />
|
||||
<Compile Include="Core\DicIndex.cs" />
|
||||
<Compile Include="Core\Entity.cs" />
|
||||
<Compile Include="Interface\ICategoryRepository.cs" />
|
||||
<Compile Include="Interface\IModuleRepository.cs" />
|
||||
|
@@ -25,7 +25,7 @@ namespace OpenAuth.Domain.Service
|
||||
protected IUnitWork _unitWork;
|
||||
protected User _user;
|
||||
|
||||
private List<Guid> _userRoleIds; //用户角色GUID
|
||||
private List<string> _userRoleIds; //用户角色GUID
|
||||
|
||||
public AuthoriseService(IUnitWork unitWork)
|
||||
{
|
||||
|
@@ -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<ModuleElement> LoadByModuleId(string loginuser, Guid id)
|
||||
public IEnumerable<ModuleElement> LoadByModuleId(string loginuser, string id)
|
||||
{
|
||||
var service = _factory.Create(loginuser);
|
||||
if (!service.GetModuleElementsQuery().Any()) //用户没有任何资源
|
||||
@@ -68,7 +68,7 @@ namespace OpenAuth.Domain.Service
|
||||
/// 当为UserElement时,表示UserId
|
||||
/// </param>
|
||||
/// <param name="moduleId">模块ID</param>
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, Guid firstId, Guid moduleId)
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, string firstId, string moduleId)
|
||||
{
|
||||
var listVms = new List<dynamic>();
|
||||
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<Relevance>(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<ModuleElement>(u =>objs.Contains(u.Id));
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ namespace OpenAuth.Domain.Service
|
||||
/// <summary>
|
||||
/// 加载一个节点下面的所有
|
||||
/// </summary>
|
||||
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
|
||||
/// 加载特定用户的模块
|
||||
/// </summary>
|
||||
/// <param name="userId">The user unique identifier.</param>
|
||||
public List<Module> LoadForUser(Guid userId)
|
||||
public List<Module> LoadForUser(string userId)
|
||||
{
|
||||
//用户角色
|
||||
var userRoleIds =
|
||||
@@ -129,7 +129,7 @@ namespace OpenAuth.Domain.Service
|
||||
/// 加载特定角色的模块
|
||||
/// </summary>
|
||||
/// <param name="roleId">The role unique identifier.</param>
|
||||
public List<Module> LoadForRole(Guid roleId)
|
||||
public List<Module> 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)
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载用户一个节点下面的一个或全部Resources
|
||||
/// </summary>
|
||||
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
|
||||
/// </param>
|
||||
/// <param name="cId">分类ID</param>
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, Guid firstId, Guid cId)
|
||||
public List<dynamic> LoadWithAccess(string username, string accessType, string firstId, string cId)
|
||||
{
|
||||
var listVms = new List<dynamic>();
|
||||
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)
|
||||
{
|
||||
|
@@ -26,7 +26,7 @@ namespace OpenAuth.Domain.Service
|
||||
/// <summary>
|
||||
/// 根据部门ID得到进出库信息
|
||||
/// </summary>
|
||||
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<Func<Stock, bool>> exp = u => u.OrgId != null &&orgs.Contains(u.OrgId.Value) && (u.Viewable == "" || keys.Contains(u.Viewable));
|
||||
Expression<Func<Stock, bool>> 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);
|
||||
}
|
||||
|
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
|
@@ -90,7 +90,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue">主键</param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="SchemeVersion"></param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="keyValue">主键值</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string RemoveForm(Guid[] ids)
|
||||
public string RemoveForm(string[] ids)
|
||||
{
|
||||
WfFlowInfoBll.RemoveForm(ids);
|
||||
return Result.ToJson();
|
||||
|
@@ -105,12 +105,12 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="type">0发起,3草稿</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string CreateProcess(Guid wfSchemeInfoId, string wfProcessInstanceJson, string frmData)
|
||||
public string CreateProcess(string wfSchemeInfoId, string wfProcessInstanceJson, string frmData)
|
||||
{
|
||||
WFProcessInstance wfProcessInstanceEntity = wfProcessInstanceJson.ToObject<WFProcessInstance>();
|
||||
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
|
||||
/// <param name="verificationData">审核数据</param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <summary>
|
||||
/// 删除申请
|
||||
/// </summary>
|
||||
public string Delete(Guid[] ids)
|
||||
public string Delete(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -159,7 +159,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="isPermission"></param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[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
|
||||
/// <param name="keyValue"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetProcessInstanceJson(Guid keyValue)
|
||||
public ActionResult GetProcessInstanceJson(string keyValue)
|
||||
{
|
||||
var processInstance = App.GetProcessInstanceEntity(keyValue);
|
||||
return Content(processInstance.ToJson());
|
||||
|
@@ -58,7 +58,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="keyValue">主键</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult GetFormJson(Guid keyValue)
|
||||
public ActionResult GetFormJson(string keyValue)
|
||||
{
|
||||
var data = WfFrmMainBll.GetForm(keyValue);
|
||||
return Content(data.ToJson());
|
||||
@@ -96,7 +96,7 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
/// <param name="ids">主键值</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public string RemoveForm(Guid[] ids)
|
||||
public string RemoveForm(string[] ids)
|
||||
{
|
||||
WfFrmMainBll.RemoveForm(ids);
|
||||
return Result.ToJson();
|
||||
|
@@ -23,7 +23,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载分类下面的所有分类
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
|
@@ -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
|
||||
/// <param name="firstId">The first identifier.</param>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <returns>ActionResult.</returns>
|
||||
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));
|
||||
}
|
||||
|
@@ -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
|
||||
/// <summary>
|
||||
/// 加载模块下面的所有模块
|
||||
/// </summary>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="firstId">The user identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
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
|
||||
/// </summary>
|
||||
/// <param name="firstId">The role identifier.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
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
|
||||
{
|
||||
|
@@ -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
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
[HttpPost]
|
||||
public string DelOrg(Guid[] ids)
|
||||
public string DelOrg(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载某分类的所有Resources
|
||||
/// </summary>
|
||||
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
|
||||
/// <para>如:UserResource/RoleResource</para>
|
||||
/// </param>
|
||||
/// <returns>ActionResult.</returns>
|
||||
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
|
||||
/// <param name="firstId">关联表中的firstId</param>
|
||||
/// <param name="key">关联表中的key</param>
|
||||
/// <returns>System.String.</returns>
|
||||
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));
|
||||
}
|
||||
|
@@ -39,13 +39,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载角色下面的所有用户
|
||||
/// </summary>
|
||||
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));
|
||||
}
|
||||
|
@@ -45,12 +45,12 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载节点下面的所有Stocks
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
|
@@ -40,13 +40,13 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// <summary>
|
||||
/// 加载组织下面的所有用户
|
||||
/// </summary>
|
||||
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
|
||||
/// </summary>
|
||||
public string GetAccessedUsers()
|
||||
{
|
||||
IEnumerable<UserView> users = App.Load(Guid.Empty, 1, 10).data;
|
||||
IEnumerable<UserView> users = App.Load(string.Empty, 1, 10).data;
|
||||
var result = new Dictionary<string , object>();
|
||||
foreach (var user in users)
|
||||
{
|
||||
|
@@ -17,8 +17,8 @@ namespace OpenAuth.Mvc.Controllers
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@@ -64,7 +64,7 @@ namespace OpenAuth.Repository
|
||||
|
||||
public void Add(T entity)
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
Context.Set<T>().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<T>().AddRange(entities);
|
||||
Save();
|
||||
|
@@ -14,7 +14,7 @@ namespace OpenAuth.Repository
|
||||
return Context.Categories.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<Category> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Category> 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<Category> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Category> 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
|
||||
/// <summary>
|
||||
/// 获取当前节点的所有下级节点
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
|
65
OpenAuth.Repository/Models/Mapping/ApplicationMap.cs
Normal file
65
OpenAuth.Repository/Models/Mapping/ApplicationMap.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// 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.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class ApplicationMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Application>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Category>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Category>
|
||||
{
|
||||
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
|
||||
|
@@ -6,18 +6,19 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<DicIndex>
|
||||
public partial class CategoryTypeMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.CategoryType>
|
||||
{
|
||||
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
|
@@ -1,54 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// 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.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class DicDetailMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<DicDetail>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<ModuleElement>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.ModuleElement>
|
||||
{
|
||||
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
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Module>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Module>
|
||||
{
|
||||
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
|
||||
}
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Org>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Org>
|
||||
{
|
||||
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
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Relevance>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Relevance>
|
||||
{
|
||||
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
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Resource>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Resource>
|
||||
{
|
||||
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
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Role>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Role>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@@ -6,13 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using OpenAuth.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public partial class StockMap
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Stock>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.Stock>
|
||||
{
|
||||
public StockMap()
|
||||
{
|
||||
@@ -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")
|
||||
@@ -44,11 +46,16 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.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
|
||||
|
@@ -6,15 +6,14 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<User>
|
||||
: System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<OpenAuth.Domain.User>
|
||||
{
|
||||
public UserMap()
|
||||
{
|
||||
@@ -22,11 +21,12 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
ToTable("User", "dbo");
|
||||
|
||||
// keys
|
||||
HasKey<Guid>(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
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FrmCode)
|
||||
.HasColumnName("FrmCode")
|
||||
@@ -36,23 +40,20 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.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.IsSystemTable)
|
||||
.HasColumnName("isSystemTable")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmContent)
|
||||
.HasColumnName("FrmContent")
|
||||
.HasMaxLength(16)
|
||||
.IsOptional();
|
||||
Property(t => t.SortCode)
|
||||
.HasColumnName("SortCode")
|
||||
@@ -60,6 +61,10 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsOptional();
|
||||
Property(t => t.FrmDbId)
|
||||
.HasColumnName("FrmDbId")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsOptional();
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,11 +26,12 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.Code)
|
||||
.HasColumnName("Code")
|
||||
.HasMaxLength(200)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CustomName)
|
||||
.HasColumnName("CustomName")
|
||||
.HasMaxLength(200)
|
||||
@@ -35,42 +39,43 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
Property(t => t.ActivityId)
|
||||
.HasColumnName("ActivityId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.ActivityType)
|
||||
.HasColumnName("ActivityType")
|
||||
.IsRequired();
|
||||
.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.ProcessSchemeId)
|
||||
.HasColumnName("ProcessSchemeId")
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.FrmType)
|
||||
.HasColumnName("FrmType")
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeType)
|
||||
.HasColumnName("SchemeType")
|
||||
.HasMaxLength(50)
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.WfLevel)
|
||||
.HasColumnName("wfLevel")
|
||||
.IsOptional();
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,25 +26,27 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// 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)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,20 +26,22 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeInfoId)
|
||||
.HasColumnName("SchemeInfoId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeVersion)
|
||||
.HasColumnName("SchemeVersion")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.ProcessType)
|
||||
.HasColumnName("ProcessType")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,14 +26,16 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// 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)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.FromNodeType)
|
||||
.HasColumnName("fromNodeType")
|
||||
.IsOptional();
|
||||
@@ -41,7 +46,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
Property(t => t.ToNodeId)
|
||||
.HasColumnName("toNodeId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.ToNodeType)
|
||||
.HasColumnName("toNodeType")
|
||||
.IsOptional();
|
||||
@@ -51,21 +56,21 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsOptional();
|
||||
Property(t => t.TransitionSate)
|
||||
.HasColumnName("TransitionSate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.IsFinish)
|
||||
.HasColumnName("isFinish")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,28 +26,30 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// 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)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.SchemeContent)
|
||||
.HasColumnName("SchemeContent")
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
|
||||
// Relationships
|
||||
}
|
||||
|
@@ -6,6 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
@@ -23,6 +26,7 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
// Properties
|
||||
Property(t => t.Id)
|
||||
.HasColumnName("Id")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
Property(t => t.SchemeCode)
|
||||
.HasColumnName("SchemeCode")
|
||||
@@ -54,25 +58,25 @@ namespace OpenAuth.Repository.Models.Mapping
|
||||
.IsOptional();
|
||||
Property(t => t.DeleteMark)
|
||||
.HasColumnName("DeleteMark")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.EnabledMark)
|
||||
.HasColumnName("EnabledMark")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.Description)
|
||||
.HasColumnName("Description")
|
||||
.HasMaxLength(200)
|
||||
.IsOptional();
|
||||
Property(t => t.CreateDate)
|
||||
.HasColumnName("CreateDate")
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserId)
|
||||
.HasColumnName("CreateUserId")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.CreateUserName)
|
||||
.HasColumnName("CreateUserName")
|
||||
.HasMaxLength(50)
|
||||
.IsRequired();
|
||||
.IsOptional();
|
||||
Property(t => t.ModifyDate)
|
||||
.HasColumnName("ModifyDate")
|
||||
.IsOptional();
|
||||
|
@@ -6,8 +6,9 @@
|
||||
// file will be lost if the code is regenerated.
|
||||
// </autogenerated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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<Application> Applications { get; set; }
|
||||
public System.Data.Entity.DbSet<Category> Categories { get; set; }
|
||||
public System.Data.Entity.DbSet<DicDetail> DicDetails { get; set; }
|
||||
public System.Data.Entity.DbSet<DicIndex> DicIndices { get; set; }
|
||||
public System.Data.Entity.DbSet<CategoryType> CategoryTypes { get; set; }
|
||||
public System.Data.Entity.DbSet<Module> Modules { get; set; }
|
||||
public System.Data.Entity.DbSet<ModuleElement> ModuleElements { get; set; }
|
||||
public System.Data.Entity.DbSet<Org> 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());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -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<Module> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Module> 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<Module> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Module> 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;
|
||||
|
||||
|
@@ -55,6 +55,8 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\Mapping\ApplicationMap.cs" />
|
||||
<Compile Include="Models\Mapping\CategoryTypeMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFFrmMainMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFProcessInstanceMap.cs" />
|
||||
<Compile Include="Models\Mapping\WFProcessOperationHistoryMap.cs" />
|
||||
@@ -65,8 +67,6 @@
|
||||
<Compile Include="UnitWork.cs" />
|
||||
<Compile Include="BaseRepository.cs" />
|
||||
<Compile Include="Models\Mapping\CategoryMap.cs" />
|
||||
<Compile Include="Models\Mapping\DicDetailMap.cs" />
|
||||
<Compile Include="Models\Mapping\DicIndexMap.cs" />
|
||||
<Compile Include="Models\Mapping\ModuleElementMap.cs" />
|
||||
<Compile Include="Models\Mapping\ModuleMap.cs" />
|
||||
<Compile Include="Models\Mapping\OrgMap.cs" />
|
||||
|
@@ -18,7 +18,7 @@ namespace OpenAuth.Repository
|
||||
/// <summary>
|
||||
/// 加载用户的所有机构
|
||||
/// </summary>
|
||||
public IEnumerable<Org> LoadByUser(Guid userId)
|
||||
public IEnumerable<Org> 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
|
||||
/// <summary>
|
||||
/// 加载角色的所有机构
|
||||
/// </summary>
|
||||
public IEnumerable<Org> LoadByRole(Guid roleId)
|
||||
public IEnumerable<Org> 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<Org> GetSubOrgs(Guid orgId)
|
||||
public IEnumerable<Org> GetSubOrgs(string orgId)
|
||||
{
|
||||
string cascadeId = "0.";
|
||||
if (orgId != Guid.Empty)
|
||||
if (orgId != string.Empty)
|
||||
{
|
||||
var org = FindSingle(u => u.Id == orgId);
|
||||
if (org == null)
|
||||
|
@@ -8,7 +8,7 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
public class RelevanceRepository : BaseRepository<Relevance>, 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
|
||||
/// </summary>
|
||||
/// <param name="key">关联标识</param>
|
||||
/// <param name="idMaps">关联的<firstId, secondId>数组</param>
|
||||
public void DeleteBy(string key, ILookup<Guid, Guid> idMaps)
|
||||
public void DeleteBy(string key, ILookup<string, string> idMaps)
|
||||
{
|
||||
foreach (var sameVals in idMaps)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace OpenAuth.Repository
|
||||
/// </summary>
|
||||
/// <param name="key">关联标识</param>
|
||||
/// <param name="idMaps">关联的<firstId, secondId>数组</param>
|
||||
public void AddRelevance(string key, ILookup<Guid, Guid> idMaps)
|
||||
public void AddRelevance(string key, ILookup<string, string> idMaps)
|
||||
{
|
||||
DeleteBy(key, idMaps);
|
||||
BatchAdd((from sameVals in idMaps
|
||||
|
@@ -8,21 +8,21 @@ namespace OpenAuth.Repository
|
||||
{
|
||||
public class ResourceRepository : BaseRepository<Resource>, IResourceRepository
|
||||
{
|
||||
public IEnumerable<Resource> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Resource> 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<Resource> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Resource> 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();
|
||||
}
|
||||
|
@@ -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<Role> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Role> 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<Role> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Role> 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<Role> LoadForUser(Guid userId)
|
||||
public IEnumerable<Role> LoadForUser(string userId)
|
||||
{
|
||||
|
||||
if (userId == Guid.Empty)
|
||||
if (userId == string.Empty)
|
||||
return Find(null);
|
||||
|
||||
var userRoleIds =
|
||||
|
@@ -14,25 +14,25 @@ namespace OpenAuth.Repository
|
||||
return Context.Stocks.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<Stock> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<Stock> 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<Stock> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<Stock> 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);
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ namespace OpenAuth.Repository
|
||||
|
||||
public void Add<T>(T entity) where T : Domain.Entity
|
||||
{
|
||||
entity.Id = Guid.NewGuid();
|
||||
entity.Id = Guid.NewGuid().ToString();
|
||||
Context.Set<T>().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<T>().AddRange(entities);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ namespace OpenAuth.Repository
|
||||
return Context.Users.OrderBy(u => u.Id).Skip((pageindex - 1) * pagesize).Take(pagesize);
|
||||
}
|
||||
|
||||
public IEnumerable<User> LoadInOrgs(params Guid[] orgId)
|
||||
public IEnumerable<User> 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<User> LoadInOrgs(int pageindex, int pagesize, params Guid[] orgIds)
|
||||
public IEnumerable<User> LoadInOrgs(int pageindex, int pagesize, params string[] orgIds)
|
||||
{
|
||||
return LoadInOrgs(orgIds).OrderBy(u =>u.Id).Skip((pageindex -1)*pagesize).Take(pagesize);
|
||||
}
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user