mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
新增打印方案返回id
This commit is contained in:
parent
c5e735b2e8
commit
5481cd91c5
@ -71,7 +71,7 @@ namespace OpenAuth.App
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Add(AddOrUpdateSysPrinterPlanReq obj)
|
||||
public string Add(AddOrUpdateSysPrinterPlanReq obj)
|
||||
{
|
||||
//程序类型取入口应用的名称,可以根据自己需要调整
|
||||
var addObj = obj.MapTo<SysPrinterPlan>();
|
||||
@ -82,6 +82,7 @@ namespace OpenAuth.App
|
||||
addObj.CreateTime = DateTime.Now;
|
||||
addObj.CreateUser = _auth.GetUserName();
|
||||
Repository.Insert(addObj);
|
||||
return addObj.Id;
|
||||
}
|
||||
|
||||
public void Update(AddOrUpdateSysPrinterPlanReq obj)
|
||||
|
@ -39,12 +39,12 @@ namespace OpenAuth.WebApi.Controllers
|
||||
|
||||
//添加
|
||||
[HttpPost]
|
||||
public Response Add(AddOrUpdateSysPrinterPlanReq obj)
|
||||
public Response<string> Add(AddOrUpdateSysPrinterPlanReq obj)
|
||||
{
|
||||
var result = new Response();
|
||||
var result = new Response<string>();
|
||||
try
|
||||
{
|
||||
_app.Add(obj);
|
||||
result.Result=_app.Add(obj);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
Reference in New Issue
Block a user