using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Interface; using DS.WMS.Core.Sys.Dtos; using DS.WMS.Core.Sys.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 基础数据权限模板模块 /// public class CodeDataRuleTemplateController : ApiController { private readonly IDataRuleTemplateService _invokeService; /// /// 构造函数 /// /// public CodeDataRuleTemplateController(IDataRuleTemplateService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetDataRuleTemplateList")] public async Task>> GetDataRuleTemplateList([FromBody] PageRequest request) { var res =await _invokeService.GetListByPage(request); return res; } /// /// 根据权限id获取数据权限模板 /// /// /// [HttpPost] [Route("GetDataRuleTemplateSelectList")] public async Task>> GetDataRuleTemplateSelectList([FromQuery] string id) { var res = await _invokeService.GetDataRuleTemplateSelectList(id); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditDataRuleTemplate")] public async Task EditDataRuleTemplate([FromBody] CodeDataRuleTemplateReq req) { var res = await _invokeService.EditDataRuleTemplate(req); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetDataRuleTemplateInfo")] public async Task> GetDataRuleTemplateInfo([FromQuery] string id) { var res = await _invokeService.GetDataRuleTemplateInfo(id); return res; } /// /// 批量删除 /// /// req /// [HttpPost] [Route("BatchDelDataRuleTemplate")] public async Task BatchDelDataRuleTemplate([FromBody] IdModel req) { var res =await _invokeService.BatchDelDataRuleTemplate(req); return res; } }