using MiaoYu.Api.Admin.ApplicationServices.DevelopmentTools.LowCode.Impl; using MiaoYu.Shared.Admin.Models.LowCodes; using MiaoYu.Repository.Admin.Entities.LowCode; namespace MiaoYu.Api.Admin.Controllers.DevelopmentTools.LowCode; [ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找", DisplayName = nameof(LowCodeTableInfoController))] public class LowCodeTableInfoController : AdminControllerBase { public LowCodeTableInfoController(LowCodeTableInfoService defaultService) : base(defaultService) { } /// /// 根据表名和数据库标识获取列列表(推荐使用) /// /// 查询参数,包含表名和数据库标识 /// [HttpPost] public Task FindListByTableAsync([FromBody] TableColumnQueryInput input) { return _defaultService.FindListByTableAsync(input); } /// /// 获取列表 /// /// /// [HttpPost] [Obsolete("请使用 FindListByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] 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; } /// /// 根据表名和数据库标识同步字段(推荐使用) /// /// 同步参数,包含表名和数据库标识 /// 同步成功返回 true [HttpPost] public Task SynchronizationByTableAsync([FromBody] TableSyncInput input) { return _defaultService.SynchronizationByTableAsync(input); } /// /// 同步表 /// /// [HttpPost("{tableId}")] [Obsolete("请使用 SynchronizationByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task SynchronizationAsync([FromRoute] Guid tableId) { return _defaultService.SynchronizationColumnByTableIdAsync(tableId); } /// /// 根据表名和数据库标识变更列配置(推荐使用) /// /// 修改参数,包含表名、数据库标识和列配置列表 /// 保存成功返回 true [HttpPost] public Task ChangeByTableAsync([FromBody] TableColumnChangeInput input) { return _defaultService.ChangeByTableAsync(input); } /// /// 变更数据 /// /// /// [HttpPost] [Obsolete("请使用 ChangeByTableAsync 接口,该接口使用 TableName + DataBase 作为查询参数")] public Task ChangeAsync([FromBody] List lowCodeTableInfos) { return _defaultService.ChangeAsync(lowCodeTableInfos); } }