|  |  |  | 
|---|
|  |  |  | using System.Reflection; | 
|---|
|  |  |  | using System.Text; | 
|---|
|  |  |  | using System.Threading.Tasks; | 
|---|
|  |  |  | using WIDESEA_Core.Attributes; | 
|---|
|  |  |  | using WIDESEA_Core.BaseServices; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | namespace WIDESEA_Core.BaseController | 
|---|
|  |  |  | 
|---|
|  |  |  | Service = service; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 鍒嗛〉鑾峰彇鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="options"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("GetPageData")] | 
|---|
|  |  |  | public virtual ActionResult GetPageData([FromBody] PageDataOptions options) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("GetPageData", new object[] { options })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 鍒嗛〉鑾峰彇鏄庣粏鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="pageData"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("GetDetailPage")] | 
|---|
|  |  |  | public virtual ActionResult GetDetailPage([FromBody] PageDataOptions pageData) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("GetDetailPage", new object[] { pageData })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 娣诲姞鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="options"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("AddData")] | 
|---|
|  |  |  | public virtual ActionResult AddData([FromBody] TEntity options) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("AddData", new object[] { options })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [HttpPost, Route("Add")] | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 娣诲姞鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="options"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("Add"), MethodParamsValidate] | 
|---|
|  |  |  | public virtual ActionResult Add([FromBody] SaveModel options) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("AddData", new object[] { options })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [HttpPost, Route("Update")] | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 淇敼鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="options"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("Update"), MethodParamsValidate] | 
|---|
|  |  |  | public virtual ActionResult Update([FromBody] SaveModel options) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("UpdateData", new object[] { options })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 淇敼鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="options"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("UpdateData")] | 
|---|
|  |  |  | public virtual ActionResult UpdateData([FromBody] TEntity options) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("UpdateData", new object[] { options })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 鍒犻櫎鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="key"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("Del")] | 
|---|
|  |  |  | public virtual ActionResult Del([FromBody] object[] key) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("DeleteData", new object[] { key })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 瀵煎嚭鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="loadData"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("Export")] | 
|---|
|  |  |  | public virtual ActionResult Export([FromBody] PageDataOptions loadData) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | return Json(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 涓嬭浇瀵煎叆妯℃澘 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, HttpGet, Route("DownLoadTemplate")] | 
|---|
|  |  |  | public virtual ActionResult DownLoadTemplate() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | return Json(result); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 瀵煎叆鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <param name="fileInput"></param> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("Import")] | 
|---|
|  |  |  | public virtual ActionResult Import(List<IFormFile> fileInput) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return Json(InvokeService("Import", new object[] { fileInput })); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 瀵煎嚭绉嶅瓙鏁版嵁 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpPost, Route("ExportSeedData"), AllowAnonymous] | 
|---|
|  |  |  | public ActionResult ExportSeedData() | 
|---|
|  |  |  | { | 
|---|