forked from KawhiWei/Sukt.Admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
695 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Sukt.Core/src/Sukt.Core.API/Startups/AspNetCoreMvcModule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Sukt.Core.Shared.SuktAppModules; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Sukt.Core.API.Startups | ||
{ | ||
public class AspNetCoreMvcModule: SuktAppModuleBase | ||
{ | ||
public override IServiceCollection ConfigureServices(IServiceCollection service) | ||
{ | ||
service.AddControllers().AddNewtonsoftJson(options => { | ||
options.SerializerSettings.ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver(); | ||
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; | ||
}); | ||
return service; | ||
} | ||
public override void Configure(IApplicationBuilder applicationBuilder) | ||
{ | ||
applicationBuilder.UseRouting(); | ||
applicationBuilder.UseEndpoints(endpoints => | ||
{ | ||
endpoints.MapControllers(); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System; | ||
|
||
namespace Sukt.Core.Application.Contracts | ||
{ | ||
public class Class1 | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace Sukt.Core.Application | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Sukt.Core/src/Sukt.Core.Domain/DomainInterfaces/IRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Domain.DomainInterfaces | ||
{ | ||
public interface IRepository | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace Sukt.Core.Dtos | ||
{ | ||
public class Class1 | ||
{ | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
Sukt.Core/src/Sukt.Core.Dtos/DataDictionaryDto/DataDictionaryOutDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using AutoMapper; | ||
using Sukt.Core.Domain.Models.DataDictionary; | ||
using Sukt.Core.Shared.Entity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Dtos.DataDictionaryDto | ||
{ | ||
[AutoMap(typeof(DataDictionaryEntity))] | ||
public class DataDictionaryOutDto: OutputDtoBase<Guid> | ||
{ | ||
/// <summary> | ||
/// 数据字典标题 | ||
/// </summary> | ||
[DisplayName("数据字典标题")] | ||
public string Title { get; set; } | ||
/// <summary> | ||
/// 数据字典值 | ||
/// </summary> | ||
[DisplayName("数据字典值")] | ||
public string Value { get; set; } | ||
/// <summary> | ||
/// 数据字典备注 | ||
/// </summary> | ||
[DisplayName("数据字典备注")] | ||
public string Remark { get; set; } | ||
/// <summary> | ||
/// 数据字典父级 | ||
/// </summary> | ||
[DisplayName("数据字典父级")] | ||
public Guid ParentId { get; set; } = Guid.Empty; | ||
/// <summary> | ||
/// 排序 | ||
/// </summary> | ||
[DisplayName("排序")] | ||
public int Sort { get; set; } | ||
/// <summary> | ||
///获取或设置 编码 | ||
/// </summary> | ||
[DisplayName("唯一编码")] | ||
public string Code { get; set; } | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
Sukt.Core/src/Sukt.Core.Dtos/DataDictionaryDto/DictionaryProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using AutoMapper; | ||
using Sukt.Core.Domain.Models.DataDictionary; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Dtos.DataDictionaryDto | ||
{ | ||
public class DictionaryProfile: Profile | ||
{ | ||
public DictionaryProfile() | ||
{ | ||
CreateMap<DataDictionaryEntity, TreeDictionaryOutDto>().ForMember(x => x.title, opt => opt.MapFrom(x => x.Title)); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
Sukt.Core/src/Sukt.Core.Dtos/DataDictionaryDto/TreeDictionaryOutDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Sukt.Core.Shared.Entity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Dtos.DataDictionaryDto | ||
{ | ||
public class TreeDictionaryOutDto: OutputDtoBase<Guid> | ||
{ | ||
/// <summary> | ||
/// 标题 | ||
/// </summary> | ||
public string title { get; set; } | ||
/// <summary> | ||
/// 是否展开直子节点 | ||
/// </summary> | ||
public bool expand { get; set; } | ||
/// <summary> | ||
/// 禁掉响应 | ||
/// </summary> | ||
public string disabled { get; set; } | ||
/// <summary> | ||
/// 组织架构深度 | ||
/// </summary> | ||
public string Depth { get; set; } | ||
/// <summary> | ||
/// 父级ID | ||
/// </summary> | ||
public Guid ParentId { get; set; } | ||
/// <summary> | ||
/// 当前节点以上所有组织架构 | ||
/// </summary> | ||
public string ParenNumber { get; set; } | ||
/// <summary> | ||
/// 组织架构标题 | ||
/// </summary> | ||
public List<TreeDictionaryOutDto> Children { get; set; } = new List<TreeDictionaryOutDto>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Sukt.Core.Shared.Extensions.ResultExtensions; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Shared.AjaxResult | ||
{ | ||
public class PageList<T>:ResultBase | ||
{ | ||
public PageList():this(new T[0],0,"查询成功",true) | ||
{ | ||
|
||
} | ||
public PageList(IEnumerable<T> data, int total, string message = "查询成功", bool success = true) | ||
{ | ||
Data = data; | ||
Total = total; | ||
Success = success; | ||
this.Message = message; | ||
} | ||
/// <summary> | ||
/// 分页数据返回集合 | ||
/// </summary> | ||
public IEnumerable<T> Data { get; set; } | ||
/// <summary> | ||
/// 查询条件的总条数 | ||
/// </summary> | ||
public int Total { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Sukt.Core.Shared.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Sukt.Core.Shared.Entity | ||
{ | ||
public class BaseQuery | ||
{ | ||
/// <summary> | ||
/// 页码 | ||
/// </summary> | ||
public int PageIndex { get; set; } = 1; | ||
/// <summary> | ||
/// 页行数 | ||
/// </summary> | ||
public int PageRow { get; set; } = 10; | ||
/// <summary> | ||
/// 排序字段 | ||
/// </summary> | ||
public string SortName { get; set; } = "Id"; | ||
/// <summary> | ||
/// 排序方向 | ||
/// </summary> | ||
public SortDirectionEnum SortDirection { get; set; } = SortDirectionEnum.Ascending; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.