using MiaoYu.Api.Admin.ApplicationServices.DevelopmentTools.LowCode.Impl; using MiaoYu.Shared.Admin.Models.LowCodes; namespace MiaoYu.Api.Admin.Controllers.DevelopmentTools.LowCode; [ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找", DisplayName = nameof(LowCodeTableController))] public class LowCodeTableController : AdminControllerBase { public LowCodeTableController(LowCodeTableService defaultService) : base(defaultService) { } /// /// 获取列表 /// /// /// [HttpPost] public async Task FindListAsync([FromBody] PagingSearchInput pagingSearchInput) { return await _defaultService.FindListAsync(pagingSearchInput); } /// /// 根据id数组删除 /// /// /// [HttpPost] public async Task DeleteListAsync([FromBody] List ids) { await _defaultService.DeleteListAsync(ids); return true; } /// /// 同步表 /// /// [HttpPost] public Task SynchronizationAsync() { return _defaultService.SynchronizationAsync(); } /// /// 根据表名和数据库标识变更表配置(推荐使用) /// /// 变更参数,包含表配置列表 /// 保存成功返回 true [HttpPost] public Task ChangeByTableAsync([FromBody] TableChangeInput input) { return _defaultService.ChangeByTableAsync(input); } /// /// 变更数据 /// /// /// [HttpPost] [Obsolete("请使用 ChangeByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task ChangeAsync([FromBody] List lowCodeTables) { return _defaultService.ChangeAsync(lowCodeTables); } /// /// 根据表名和数据库标识查询表单数据(推荐使用) /// /// 查询参数,包含表名和数据库标识 /// 表单数据字典 [ActionDescriptor(DisplayName = "查询数据")] [HttpPost] public Task> FindFormByTableAsync([FromBody] TableFormQueryInput input) { return _defaultService.FindFormByTableAsync(input); } /// /// 查询表单数据 /// /// /// [ActionDescriptor(DisplayName = "查询数据")] [HttpGet("{id?}")] [Obsolete("请使用 FindFormByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task> FindFormAsync([FromRoute] Guid id) { return _defaultService.FindFormAsync(id); } /// /// 根据表名和数据库标识保存表单数据(推荐使用) /// /// 保存参数,包含表名、数据库标识和配置信息 /// 保存成功返回 true [RequestLimitFilter] [ActionDescriptor(DisplayName = "保存表单")] [HttpPost] [ApiCheckModel] public Task SaveFormByTableAsync([FromBody] TableFormSaveInput input) { return _defaultService.SaveFormByTableAsync(input); } /// /// 添加 /// /// /// [RequestLimitFilter] [ActionDescriptor(PermissionFunctionConsts.Function_Insert, DisplayName = "创建表单")] [HttpPost] [ApiCheckModel] [Obsolete("请使用 SaveFormByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task CreateAsync([FromBody] LowCodeTable form) { return _defaultService.SaveFormAsync(form); } /// /// 编辑 /// /// /// [RequestLimitFilter] [ActionDescriptor(PermissionFunctionConsts.Function_Update, DisplayName = "编辑表单")] [HttpPost] [ApiCheckModel] [Obsolete("请使用 SaveFormByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task UpdateAsync([FromBody] LowCodeTable form) { return _defaultService.SaveFormAsync(form); } }