 
 
 
  
//------------------------------------------------------------------------------
//     T4模板文件：基础接口类
//     此代码由T4模板自动生成
//     对此文件的更改可能会导致不正确的行为，并且如果重新生成代码，这些更改将会丢失。
//------------------------------------------------------------------------------
using APT.Infrastructure.Core;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using APT.Utility;
using APT.Infrastructure.Api;
using APT.BaseData.Domain.ApiModel.PF;
 namespace APT.LG.WebApi.Controllers.Api
 {
	using APT.BaseData.Domain.Entities.LG;
			#region  Oprate-表单操作日志表
	 /// <summary>
    ///  表单操作日志表
    /// </summary>
	 [Route("api/LG/Oprate")]
     public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
     {   
         /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Entities")]
        public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
        {
            return WitEntities(null, filter);
        }
         /// <summary>
        /// 排序查询所有数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>

        [HttpPost, Route("OrderEntities")]
        public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
        {
            return WitOrderEntities(null, filter);
        }
         /// <summary>
        /// 分页查询数据
        /// </summary>
        /// <param name="pageFilter">分页过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Paged")]
        public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
        {
            return WitPaged(null, pageFilter);
        }
        /// <summary>
        /// 排序分页查询数据
        /// </summary>
        /// <param name="pageFilter">分页过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("OrderPaged")]
        public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
        {
            return WitOrderPaged(null, pageFilter);
        }
        /// <summary>
        /// 根据主键删除数据
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        [HttpGet, Route("Delete")]
        public JsonActionResult<bool> Delete(string id)
        {
            return WitRealDelete(id);
        }

        /// <summary>
        /// 更新或新增数据
        /// </summary>
        /// <param name="entity">对象实体</param>
        /// <returns></returns>
        [HttpPost, Route("Update")]
        public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
        {
            return WitUpdate(entity);
        }

        /// <summary>
        /// 批量更新
        /// </summary>
        /// <param name="entity">对象实体</param>
        /// <returns></returns>
        [HttpPost, Route("BatchUpdate")]
        public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
        {
              return WitBantchUpdate(entity?.Data);
        }

        /// <summary>
        /// 批量删除数据
        /// </summary>
        /// <param name="ids">id字符串（id用逗号分隔）</param>
        /// <returns></returns>
        [HttpGet, Route("BatchDelete")]
        public JsonActionResult<bool> BatchDelete(string ids)
        {
            return WitRealBatchDelete(ids);
        }

        /// <summary>
        /// 获得单条实体数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Get")]
        public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
        {
            return WitEntity(null, filter);
        }
        
     }
	 #endregion
		 }
 
