Merge branch 'abp' of https://gitee.com/ccnetcore/Yi into abp
# Conflicts: # .gitignore # Yi.Abp.Net8/src/Yi.Abp.Web/Logs/log-20231214.txt
This commit is contained in:
@@ -70,19 +70,22 @@ namespace Yi.Framework.SqlSugarCore
|
||||
private void CodeFirst(IServiceProvider service)
|
||||
{
|
||||
|
||||
var moduleContainer = service.GetRequiredService<IModuleContainer>();
|
||||
var db = service.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient;
|
||||
var moduleContainer = service.GetRequiredService<IModuleContainer>();
|
||||
var db = service.GetRequiredService<ISqlSugarDbContext>().SqlSugarClient;
|
||||
|
||||
//尝试创建数据库
|
||||
db.DbMaintenance.CreateDatabase();
|
||||
|
||||
List<Type> types = new List<Type>();
|
||||
foreach (var module in moduleContainer.Modules)
|
||||
{
|
||||
types.AddRange(module.Assembly.GetTypes().Where(x => x.GetCustomAttribute<SugarTable>() != null).Where(x => x.GetCustomAttribute<SplitTableAttribute>() is null));
|
||||
}
|
||||
if (types.Count > 0)
|
||||
{
|
||||
db.CodeFirst.InitTables(types.ToArray());
|
||||
}
|
||||
|
||||
List<Type> types = new List<Type>();
|
||||
foreach (var module in moduleContainer.Modules)
|
||||
{
|
||||
types.AddRange(module.Assembly.GetTypes().Where(x => x.GetCustomAttribute<SugarTable>() != null).Where(x => x.GetCustomAttribute<SplitTableAttribute>() is null));
|
||||
}
|
||||
if (types.Count > 0)
|
||||
{
|
||||
db.CodeFirst.InitTables(types.ToArray());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task DataSeedAsync(IServiceProvider service)
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
|
||||
public string Content { get; set; }
|
||||
public string? Color { get; set; }
|
||||
|
||||
public List<Guid> PermissionUserIds { get; set; }
|
||||
public List<Guid>? PermissionUserIds { get; set; }
|
||||
|
||||
public DiscussPermissionTypeEnum PermissionType { get; set; }
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Yi.Framework.Bbs.Application.Services
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取文章全部平铺信息
|
||||
/// 获取文章全部树级信息
|
||||
/// </summary>
|
||||
/// <param name="discussId"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Data;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Bbs.SqlSugarCore.DataSeeds
|
||||
{
|
||||
public class BbsDictionaryDataSeed : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private ISqlSugarRepository<DictionaryEntity> _repository;
|
||||
private ISqlSugarRepository<DictionaryTypeEntity> _typeRepository;
|
||||
public BbsDictionaryDataSeed(ISqlSugarRepository<DictionaryEntity> repository, ISqlSugarRepository<DictionaryTypeEntity> typeRepository) {
|
||||
_repository=repository;
|
||||
_typeRepository=typeRepository;
|
||||
|
||||
}
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
if (!await _typeRepository.IsAnyAsync(x => x.DictType== "bbs_type_lable"))
|
||||
{
|
||||
await _typeRepository.InsertManyAsync(GetSeedDictionaryTypeData());
|
||||
await _repository.InsertManyAsync(GetSeedDictionaryData());
|
||||
}
|
||||
}
|
||||
public List<DictionaryEntity> GetSeedDictionaryData()
|
||||
{
|
||||
List<DictionaryEntity> entities = new List<DictionaryEntity>();
|
||||
DictionaryEntity dictInfo1 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "前端",
|
||||
DictValue = "0",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 100,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
|
||||
};
|
||||
entities.Add(dictInfo1);
|
||||
|
||||
DictionaryEntity dictInfo2 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "后端",
|
||||
DictValue = "1",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 99,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo2);
|
||||
|
||||
DictionaryEntity dictInfo3 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "运维",
|
||||
DictValue = "2",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 98,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo3);
|
||||
DictionaryEntity dictInfo4 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "测试",
|
||||
DictValue = "3",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 97,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo4);
|
||||
|
||||
DictionaryEntity dictInfo5 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "UI",
|
||||
DictValue = "4",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 96,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo5);
|
||||
|
||||
|
||||
DictionaryEntity dictInfo6 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "产品",
|
||||
DictValue = "5",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 95,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo6);
|
||||
|
||||
DictionaryEntity dictInfo7 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "项目",
|
||||
DictValue = "6",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 94,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo7);
|
||||
|
||||
DictionaryEntity dictInfo8 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "C#",
|
||||
DictValue = "7",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 93,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo8);
|
||||
|
||||
DictionaryEntity dictInfo9 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = ".Net",
|
||||
DictValue = "8",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 92,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo9);
|
||||
|
||||
|
||||
DictionaryEntity dictInfo10 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = ".NetCore",
|
||||
DictValue = "9",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 91,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo10);
|
||||
|
||||
|
||||
DictionaryEntity dictInfo11 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "Asp.NetCore",
|
||||
DictValue = "10",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 90,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo11);
|
||||
|
||||
DictionaryEntity dictInfo12 = new DictionaryEntity()
|
||||
{
|
||||
|
||||
DictLabel = "Abp.vNext",
|
||||
DictValue = "11",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 89,
|
||||
Remark = "",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dictInfo12);
|
||||
|
||||
return entities;
|
||||
}
|
||||
|
||||
public List<DictionaryTypeEntity> GetSeedDictionaryTypeData()
|
||||
{
|
||||
List<DictionaryTypeEntity> entities = new List<DictionaryTypeEntity>();
|
||||
DictionaryTypeEntity dict1 = new DictionaryTypeEntity()
|
||||
{
|
||||
|
||||
DictName = "BBS类型标签",
|
||||
DictType = "bbs_type_lable",
|
||||
OrderNum = 200,
|
||||
Remark = "BBS类型标签",
|
||||
IsDeleted = false,
|
||||
State = true
|
||||
};
|
||||
entities.Add(dict1);
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar.DistributedSystem.Snowflake;
|
||||
using Volo.Abp.Data;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Guids;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
using Yi.Framework.Rbac.Domain.Shared.Enums;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
|
||||
namespace Yi.Framework.Bbs.SqlSugarCore.DataSeeds
|
||||
{
|
||||
public class BbsMenuDataSeed : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private IGuidGenerator _guidGenerator;
|
||||
private ISqlSugarRepository<MenuEntity, Guid> _repository;
|
||||
public BbsMenuDataSeed(ISqlSugarRepository<MenuEntity,Guid> repository, IGuidGenerator guidGenerator)
|
||||
{
|
||||
_repository=repository;
|
||||
_guidGenerator=guidGenerator;
|
||||
}
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
if (!await _repository.IsAnyAsync(x => x.MenuName == "BBS"))
|
||||
{
|
||||
await _repository.InsertManyAsync(GetSeedData());
|
||||
}
|
||||
}
|
||||
|
||||
public List<MenuEntity> GetSeedData()
|
||||
{
|
||||
List<MenuEntity> entities = new List<MenuEntity>();
|
||||
//BBS
|
||||
MenuEntity bbs = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
MenuName = "BBS",
|
||||
MenuType = MenuTypeEnum.Catalogue,
|
||||
Router = "/bbs",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
MenuIcon = "monitor",
|
||||
OrderNum = 91,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(bbs);
|
||||
|
||||
|
||||
|
||||
//板块管理
|
||||
MenuEntity plate = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "板块管理",
|
||||
PermissionCode = "bbs:plate:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "plate",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "bbs/plate/index",
|
||||
MenuIcon = "component",
|
||||
OrderNum = 100,
|
||||
ParentId = bbs.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(plate);
|
||||
|
||||
//文章管理
|
||||
MenuEntity article = new MenuEntity(_guidGenerator.Create())
|
||||
{
|
||||
|
||||
MenuName = "文章管理",
|
||||
PermissionCode = "bbs:article:list",
|
||||
MenuType = MenuTypeEnum.Menu,
|
||||
Router = "article",
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
IsCache = true,
|
||||
Component = "bbs/article/index",
|
||||
MenuIcon = "documentation",
|
||||
OrderNum = 99,
|
||||
ParentId = bbs.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
entities.Add(article);
|
||||
|
||||
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace Yi.Framework.Bbs.SqlSugarCore.Repositories
|
||||
|
||||
public async Task<List<ArticleEntity>> GetTreeAsync(Expression<Func<ArticleEntity, bool>> where)
|
||||
{
|
||||
return await _DbQueryable.Where(where).ToTreeAsync(x => x.Children, x => x.ParentId, 0);
|
||||
return await _DbQueryable.Where(where).ToTreeAsync(x => x.Children, x => x.ParentId, Guid.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.FileManger
|
||||
{
|
||||
public class FileGetListOutputDto:EntityDto<Guid>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.Rbac.Application.FileManger;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Contracts.IServices
|
||||
{
|
||||
public interface IFileService : IApplicationService
|
||||
{
|
||||
Task<string> GetReturnPathAsync(Guid code, bool? isThumbnail);
|
||||
Task<List<FileGetListOutputDto>> Post(IFormFileCollection file);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Guids;
|
||||
using Yi.Framework.Core.Enums;
|
||||
using Yi.Framework.Core.Helper;
|
||||
using Yi.Framework.Rbac.Application.Contracts.IServices;
|
||||
using Yi.Framework.Rbac.Application.FileManger;
|
||||
using Yi.Framework.Rbac.Domain.Entities;
|
||||
|
||||
namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
public class FileService : ApplicationService, IFileService
|
||||
{
|
||||
private readonly IRepository<FileAggregateRoot> _repository;
|
||||
private readonly HttpContext _httpContext;
|
||||
private IGuidGenerator _guidGenerator;
|
||||
public FileService(IRepository<FileAggregateRoot> repository, IHttpContextAccessor httpContextAccessor, IGuidGenerator guidGenerator)
|
||||
{
|
||||
_guidGenerator = guidGenerator;
|
||||
_repository = repository;
|
||||
_httpContext = httpContextAccessor.HttpContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载文件,是否缩略图
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("file/{code}/{isThumbnail?}")]
|
||||
public async Task<IActionResult> Get([FromRoute] Guid code, [FromRoute] bool? isThumbnail)
|
||||
{
|
||||
var path = await GetReturnPathAsync(code, isThumbnail);
|
||||
|
||||
var steam = await File.ReadAllBytesAsync(path);
|
||||
|
||||
//考虑从路径中获取
|
||||
var fileContentType = MimeHelper.GetMimeMapping(Path.GetFileName(path));
|
||||
//设置附件下载,下载名称
|
||||
//_httpContext.FileAttachmentHandle(file.FileName);
|
||||
return new FileContentResult(steam, fileContentType ?? @"text/plain");
|
||||
}
|
||||
|
||||
public async Task<string> GetReturnPathAsync(Guid code, bool? isThumbnail)
|
||||
{
|
||||
var file = await _repository.GetAsync(x => x.Id == code);
|
||||
if (file is null)
|
||||
{
|
||||
throw new UserFriendlyException("文件编号未匹配", "404");
|
||||
}
|
||||
var path = file.FilePath;
|
||||
//如果为缩略图,需要修改路径
|
||||
if (isThumbnail is true)
|
||||
{
|
||||
path = $"wwwroot/{FileTypeEnum.Thumbnail}/{file.Id}{Path.GetExtension(file.FileName)}";
|
||||
}
|
||||
//路径为: 文件路径/文件id+文件扩展名
|
||||
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
throw new UserFriendlyException("本地文件不存在", "404");
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传文件
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<FileGetListOutputDto>> Post([FromForm] IFormFileCollection file)
|
||||
{
|
||||
if (file.Count() == 0)
|
||||
{
|
||||
throw new ArgumentException("文件上传为空!");
|
||||
}
|
||||
//批量插入
|
||||
List<FileAggregateRoot> entities = new();
|
||||
|
||||
foreach (var f in file)
|
||||
{
|
||||
FileAggregateRoot data = new(_guidGenerator.Create());
|
||||
data.FileSize = (decimal)f.Length / 1024;
|
||||
data.FileName = f.FileName;
|
||||
|
||||
var type = MimeHelper.GetFileType(f.FileName);
|
||||
|
||||
//落盘文件,文件名为雪花id+自己的扩展名
|
||||
string filename = data.Id.ToString() + Path.GetExtension(f.FileName);
|
||||
string typePath = $"wwwroot/{type}";
|
||||
if (!Directory.Exists(typePath))
|
||||
{
|
||||
Directory.CreateDirectory(typePath);
|
||||
}
|
||||
var filePath = Path.Combine(typePath, filename);
|
||||
data.FilePath = filePath;
|
||||
|
||||
|
||||
//生成文件
|
||||
using (var stream = new FileStream(filePath, FileMode.CreateNew, FileAccess.ReadWrite))
|
||||
{
|
||||
await f.CopyToAsync(stream);
|
||||
|
||||
//如果是图片类型,还需要生成缩略图,当然,如果图片很小,直接复制过去即可
|
||||
if (FileTypeEnum.Image.Equals(type))
|
||||
{
|
||||
string thumbnailPath = $"wwwroot/{FileTypeEnum.Thumbnail}";
|
||||
if (!Directory.Exists(thumbnailPath))
|
||||
{
|
||||
Directory.CreateDirectory(thumbnailPath);
|
||||
}
|
||||
string thumbnailFilePath = Path.Combine(thumbnailPath, filename);
|
||||
try
|
||||
{
|
||||
// _imageSharpManager.ImageCompress(f.FileName, f.OpenReadStream(), thumbnailFilePath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
var result = new byte[stream.Length];
|
||||
await stream.ReadAsync(result, 0, result.Length);
|
||||
await File.WriteAllBytesAsync(thumbnailFilePath, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
entities.Add(data);
|
||||
}
|
||||
await _repository.InsertManyAsync(entities);
|
||||
return entities.Adapt<List<FileGetListOutputDto>>();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<ItemGroup>
|
||||
<Compile Remove="Events\**" />
|
||||
<EmbeddedResource Remove="Events\**" />
|
||||
<None Remove="Events\**" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
@@ -15,8 +20,4 @@
|
||||
<ProjectReference Include="..\Yi.Framework.Rbac.Domain\Yi.Framework.Rbac.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Events\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SqlSugar;
|
||||
using Volo.Abp.Auditing;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Yi.Framework.Rbac.Domain.Entities
|
||||
{
|
||||
public class FileAggregateRoot : AggregateRoot<Guid>, IAuditedObject
|
||||
{
|
||||
public FileAggregateRoot()
|
||||
{
|
||||
}
|
||||
|
||||
public FileAggregateRoot(Guid fileId)
|
||||
{
|
||||
this.Id = fileId;
|
||||
}
|
||||
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public override Guid Id { get; protected set; }
|
||||
/// <summary>
|
||||
/// 文件大小
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FileSize")]
|
||||
public decimal FileSize { get; set; }
|
||||
/// <summary>
|
||||
/// 文件名
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FileName")]
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "FilePath")]
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public DateTime CreationTime { get; set; }
|
||||
public Guid? CreatorId { get; set; }
|
||||
|
||||
public Guid? LastModifierId { get; set; }
|
||||
|
||||
public DateTime? LastModificationTime { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -652,7 +652,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/role/index",
|
||||
MenuIcon = "peoples",
|
||||
OrderNum = 100,
|
||||
OrderNum = 99,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -720,7 +720,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/menu/index",
|
||||
MenuIcon = "tree-table",
|
||||
OrderNum = 100,
|
||||
OrderNum = 98,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -787,7 +787,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/dept/index",
|
||||
MenuIcon = "tree",
|
||||
OrderNum = 100,
|
||||
OrderNum = 97,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -856,7 +856,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/post/index",
|
||||
MenuIcon = "post",
|
||||
OrderNum = 100,
|
||||
OrderNum = 96,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -923,7 +923,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/dict/index",
|
||||
MenuIcon = "dict",
|
||||
OrderNum = 100,
|
||||
OrderNum = 95,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -991,7 +991,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsCache = true,
|
||||
Component = "system/config/index",
|
||||
MenuIcon = "edit",
|
||||
OrderNum = 100,
|
||||
OrderNum = 94,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
@@ -1058,7 +1058,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
|
||||
IsShow = true,
|
||||
IsLink = false,
|
||||
MenuIcon = "log",
|
||||
OrderNum = 100,
|
||||
OrderNum = 93,
|
||||
ParentId = system.Id,
|
||||
IsDeleted = false
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore.Repositories
|
||||
|
||||
user.Roles = new List<RoleEntity>();
|
||||
userRoleMenu.User = user.Adapt<UserDto>();
|
||||
|
||||
userRoleMenu.Menus = userRoleMenu.Menus.OrderByDescending(x => x.OrderNum).ToHashSet();
|
||||
return userRoleMenu;
|
||||
}
|
||||
}
|
||||
|
||||
84
Yi.Abp.Net8/src/Yi.Abp.Web/Logs/log-20231215.txt
Normal file
84
Yi.Abp.Net8/src/Yi.Abp.Web/Logs/log-20231215.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
2023-12-15 00:10:51.343 +08:00 [INF] Yi框架-Abp.vNext,启动!
|
||||
2023-12-15 00:10:57.118 +08:00 [INF] Loaded ABP modules:
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.Web.YiAbpWebModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.SqlsugarCore.YiAbpSqlSugarCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.Domain.YiAbpDomainModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.Domain.Shared.YiAbpDomainSharedModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Rbac.Domain.Shared.YiFrameworkRbacDomainSharedModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainSharedModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Settings.AbpSettingsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Security.AbpSecurityModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Data.AbpDataModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Threading.AbpThreadingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Mapster.YiFrameworkMapsterModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Core.YiFrameworkCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Bbs.Domain.Shared.YiFrameworkBbsDomainSharedModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Rbac.Domain.YiFrameworkRbacDomainModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.AspNetCore.SignalR.AbpAspNetCoreSignalRModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Json.AbpJsonModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Json.SystemTextJson.AbpJsonSystemTextJsonModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Json.AbpJsonAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Timing.AbpTimingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Http.AbpHttpModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Minify.AbpMinifyModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Validation.AbpValidationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Guids.AbpGuidsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Caching.AbpCachingModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Serialization.AbpSerializationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Bbs.Domain.YiFrameworkBbsDomainModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Rbac.SqlSugarCore.YiFrameworkRbacSqlSugarCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.SqlSugarCore.YiFrameworkSqlSugarCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Bbs.SqlSugarCore.YiFrameworkBbsSqlSugarCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.Application.YiAbpApplicationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Abp.Application.Contracts.YiAbpApplicationContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Rbac.Application.Contracts.YiFrameworkRbacApplicationContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Ddd.Application.Contracts.YiFrameworkDddApplicationContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Bbs.Application.Contracts.YiFrameworkBbsApplicationContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Rbac.Application.YiFrameworkRbacApplicationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Ddd.Application.YiFrameworkDddApplicationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Features.AbpFeaturesModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.BackgroundWorkers.Quartz.AbpBackgroundWorkersQuartzModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Quartz.AbpQuartzModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Yi.Framework.Bbs.Application.YiFrameworkBbsApplicationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.UI.AbpUiModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule
|
||||
2023-12-15 00:10:57.120 +08:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule
|
||||
2023-12-15 00:10:57.121 +08:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule
|
||||
2023-12-15 00:10:57.121 +08:00 [INF] - Volo.Abp.AspNetCore.Authentication.JwtBearer.AbpAspNetCoreAuthenticationJwtBearerModule
|
||||
2023-12-15 00:10:57.121 +08:00 [INF] - Yi.Framework.AspNetCore.YiFrameworkAspNetCoreModule
|
||||
2023-12-15 00:10:58.044 +08:00 [INF] User profile is available. Using 'C:\Users\45431\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
|
||||
2023-12-15 00:10:58.208 +08:00 [INF] Initialized all ABP modules.
|
||||
2023-12-15 00:10:58.431 +08:00 [INF] Now listening on: http://[::]:19001
|
||||
2023-12-15 00:10:58.431 +08:00 [INF] Application started. Press Ctrl+C to shut down.
|
||||
2023-12-15 00:10:58.431 +08:00 [INF] Hosting environment: Development
|
||||
2023-12-15 00:10:58.431 +08:00 [INF] Content root path: D:\CSharp\Yi\Yi.Abp.Net8\src\Yi.Abp.Web
|
||||
Reference in New Issue
Block a user