feat: 完成webfirst 数据表管理前端模块
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using EasyTool;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Yi.Framework.Infrastructure.Ddd.Dtos;
|
||||
using Yi.Framework.Infrastructure.Ddd.Services;
|
||||
using Yi.Framework.Module.DictionaryManager.Dtos.DictionaryType;
|
||||
using Yi.Framework.Module.WebFirstManager.Dtos.Field;
|
||||
using Yi.Framework.Module.WebFirstManager.Entities;
|
||||
using Yi.Framework.Module.WebFirstManager.Enums;
|
||||
|
||||
namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
{
|
||||
@@ -16,7 +22,31 @@ namespace Yi.Framework.Module.WebFirstManager.Impl
|
||||
/// 字段管理
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings("WebFirstManager")]
|
||||
public class FieldService:CrudAppService<FieldEntity, FieldDto,long, FieldGetListInput> ,IFieldService,ITransient,IDynamicApiController
|
||||
public class FieldService : CrudAppService<FieldEntity, FieldDto, long, FieldGetListInput>, IFieldService, ITransient, IDynamicApiController
|
||||
{
|
||||
public async override Task<PagedResultDto<FieldDto>> GetListAsync([FromQuery] FieldGetListInput input)
|
||||
{
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _DbQueryable.WhereIF(input.TableId is not null, x => x.TableId.Equals(input.TableId!))
|
||||
.WhereIF(input.Name is not null, x => x.Name!.Contains(input.Name!))
|
||||
|
||||
.ToPageListAsync(input.PageNum, input.PageSize, total);
|
||||
|
||||
return new PagedResultDto<FieldDto>
|
||||
{
|
||||
Total = total,
|
||||
Items = await MapToGetListOutputDtosAsync(entities)
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取类型枚举
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("type")]
|
||||
public object GetFieldTypeEnum()
|
||||
{
|
||||
return typeof(FieldTypeEnum).GetFields(BindingFlags.Static | BindingFlags.Public).Select(x => new { lable = x.Name, value = (int)EnumUtil.GetValueByName<FieldTypeEnum>(x.Name) }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,6 +523,12 @@
|
||||
字段管理
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Impl.FieldService.GetFieldTypeEnum">
|
||||
<summary>
|
||||
获取类型枚举
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Yi.Framework.Module.WebFirstManager.Impl.WebFirstService.PostWebBuildCodeAsync">
|
||||
<summary>
|
||||
Web To Code
|
||||
|
||||
@@ -38,6 +38,7 @@ public class Startup : AppStartup
|
||||
{
|
||||
// 注册作业,并配置作业触发器
|
||||
//options.AddJob<TestJob>(Triggers.Period(10000));
|
||||
//options.AddJob<SystemDataJob>(Triggers.Period(10000));
|
||||
options.AddJob<SystemDataJob>(Triggers.Cron("0 0 0,12 ? * ?", CronStringFormat.WithSeconds)); // 表示每天凌晨与12点
|
||||
});
|
||||
services.AddFileLogging("log/application-{0:yyyy}-{0:MM}-{0:dd}.log", options =>
|
||||
|
||||
Reference in New Issue
Block a user