Browse Source

app2.0借阅管理接口完善

娄底高职分支
ndbs 2 years ago
parent
commit
73b64c3f75
1 changed files with 74 additions and 0 deletions
  1. +74
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs

+ 74
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs View File

@@ -23,6 +23,10 @@ namespace Learun.Application.WebApi.Modules
: base("/Learun/adms/EducationalAdministration/BookBorrow")
{
Get["/pagelist"] = GetPageList;
//Get["/list"] = GetList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

@@ -44,6 +48,76 @@ namespace Learun.Application.WebApi.Modules
};
return Success(jsonData);
}

///// <summary>
///// 获取页面显示列表数据
///// <summary>
///// <param name="_"></param>
///// <returns></returns>
//public Response GetList(dynamic _)
//{
// string queryJson = this.GetReqData();
// var data = bookBorrowIBLL.GetPageList(queryJson);
// return Success(data);
//}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var Book_borrowinfoData = bookBorrowIBLL.GetBook_borrowinfoEntity(keyValue);
var jsonData = new
{
Book_borrowinfo = Book_borrowinfoData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
bookBorrowIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Book_borrowinfoEntity entity = parameter.strEntity.ToObject<Book_borrowinfoEntity>();
bookBorrowIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

Loading…
Cancel
Save