routine update

This commit is contained in:
yubaolee
2016-10-17 11:43:56 +08:00
parent df75ea7fb0
commit e514779974
28 changed files with 1099 additions and 522 deletions

View File

@@ -28,9 +28,9 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 加载分类下面的所有分类
/// </summary>
public string Load(Guid parentId, int pageCurrent = 1, int pageSize = 30)
public string Load(Guid parentId, int page = 1, int rows = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(parentId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(parentId, page, rows));
}
public string LoadForTree()

View File

@@ -35,9 +35,9 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 加载模块下面的所有模块
/// </summary>
public string Load(Guid orgId, int pageCurrent = 1, int pageSize = 30)
public string Load(Guid orgId, int page = 1, int rows = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(orgId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(orgId, page, rows));
}
/// <summary>

View File

@@ -45,9 +45,9 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 加载某分类的所有Resources
/// </summary>
public string Load(Guid categoryId, int pageCurrent = 1, int pageSize = 30)
public string Load(Guid categoryId, int page = 1, int rows = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetUserName(), categoryId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetUserName(), categoryId, page, rows));
}
public string LoadForTree()

View File

@@ -1,8 +1,6 @@
using Infrastructure;
using OpenAuth.App;
using OpenAuth.Domain;
using System;
using System.Linq;
using System.Web.Http;
using System.Web.Mvc;
using Newtonsoft.Json.Linq;
@@ -51,13 +49,14 @@ namespace OpenAuth.Mvc.Controllers
return JsonHelper.Instance.Serialize(_app.Load(orgId, pageCurrent, pageSize));
}
public string Delete(string Id)
[System.Web.Mvc.HttpPost]
public string Delete(Guid[] ids)
{
try
{
foreach (var obj in Id.Split(','))
foreach (var obj in ids)
{
_app.Delete(Guid.Parse(obj));
_app.Delete(obj);
}
}
catch (Exception e)

View File

@@ -50,9 +50,9 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 加载节点下面的所有Stocks
/// </summary>
public string Load(Guid parentId, int pageCurrent = 1, int pageSize = 30)
public string Load(Guid parentId, int page = 1, int rows = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetUserName(), parentId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(AuthUtil.GetUserName(), parentId, page, rows));
}
public string Delete(Guid Id)

View File

@@ -45,9 +45,9 @@ namespace OpenAuth.Mvc.Controllers
/// <summary>
/// 加载组织下面的所有用户
/// </summary>
public string Load(Guid orgId, int pageCurrent = 1, int pageSize = 30)
public string Load(Guid orgId, int page = 1, int rows = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(orgId, pageCurrent, pageSize));
return JsonHelper.Instance.Serialize(_app.Load(orgId, page, rows));
}
[HttpPost]