chore: 构建稳定版本

This commit is contained in:
陈淳
2023-12-11 09:55:12 +08:00
parent 098d4bc85f
commit 769a6a9c63
756 changed files with 10431 additions and 19867 deletions

View File

@@ -0,0 +1,110 @@
using Mapster;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Services;
using Yi.Framework.Bbs.Application.Contracts.Dtos.AccessLog;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
public class AccessLogService : ApplicationService, IAccessLogService
{
private readonly ISqlSugarRepository<AccessLogEntity> _repository;
public AccessLogService(ISqlSugarRepository<AccessLogEntity> repository) { _repository = repository; }
public DateTime GetWeekFirst()
{
var week = DateTime.Now.DayOfWeek;
switch (week)
{
case DayOfWeek.Sunday:
return DateTime.Now.AddDays(-6).Date;
case DayOfWeek.Monday:
return DateTime.Now.AddDays(-0).Date;
case DayOfWeek.Tuesday:
return DateTime.Now.AddDays(-1).Date;
case DayOfWeek.Wednesday:
return DateTime.Now.AddDays(-2).Date;
case DayOfWeek.Thursday:
return DateTime.Now.AddDays(-3).Date;
case DayOfWeek.Friday:
return DateTime.Now.AddDays(-4).Date;
case DayOfWeek.Saturday:
return DateTime.Now.AddDays(-5).Date;
default:
throw new ArgumentException("日期错误");
}
}
/// <summary>
/// 触发
/// </summary>
/// <returns></returns>
[HttpPost("")]
public async Task AccessAsync()
{
//可判断http重复防止同一ip多次访问
var last = await _repository._DbQueryable.OrderByDescending(x => x.CreationTime).FirstAsync();
if (last is null || last.CreationTime.Date != DateTime.Today)
{
await _repository.InsertAsync(new AccessLogEntity());
}
else
{
await _repository._Db.Updateable<AccessLogEntity>().SetColumns(it => it.Number == it.Number + 1).Where(it => it.Id == last.Id).ExecuteCommandAsync();
}
}
/// <summary>
/// 获取当前周数据
/// </summary>
/// <returns></returns>
public async Task<AccessLogDto[]> GetWeekAsync()
{
var lastSeven = await _repository._DbQueryable.OrderByDescending(x => x.CreationTime).ToPageListAsync(1, 7);
return WeekTimeHandler(lastSeven.ToArray());
}
private AccessLogDto[] WeekTimeHandler(AccessLogEntity[] data)
{
data = data.Where(x => x.CreationTime >= GetWeekFirst()).OrderByDescending(x => x.CreationTime).DistinctBy(x => x.CreationTime.DayOfWeek).ToArray();
Dictionary<DayOfWeek, AccessLogDto> processedData = new Dictionary<DayOfWeek, AccessLogDto>();
// 初始化字典将每天的数据都设为0
foreach (DayOfWeek dayOfWeek in Enum.GetValues(typeof(DayOfWeek)))
{
processedData.Add(dayOfWeek, new AccessLogDto());
}
// 处理原始数据
foreach (var item in data)
{
DayOfWeek dayOfWeek = item.CreationTime.DayOfWeek;
// 如果当天有数据则更新字典中的值为对应的Number
var sss = data.Adapt<AccessLogDto>();
processedData[dayOfWeek] = item.Adapt<AccessLogDto>();
}
var result = processedData.Values.ToList();
//此时的时间是周日-周一-周二,需要处理
var first = result[0]; // 获取第一个元素
result.RemoveAt(0); // 移除第一个元素
result.Add(first); // 将第一个元素添加到末尾
return result.ToArray();
}
}
}

View File

@@ -0,0 +1,68 @@
using Volo.Abp;
using Volo.Abp.Application.Services;
using Volo.Abp.Uow;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Argee;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// 点赞功能
/// </summary>
public class AgreeService : ApplicationService, IApplicationService
{
public AgreeService(ISqlSugarRepository<AgreeEntity> repository, ISqlSugarRepository<DiscussEntity> discssRepository)
{
_repository = repository;
_discssRepository = discssRepository;
}
private ISqlSugarRepository<AgreeEntity> _repository { get; set; }
private ISqlSugarRepository<DiscussEntity> _discssRepository { get; set; }
/// <summary>
/// 点赞,返回true为点赞+1返回false为点赞-1
/// </summary>
/// <returns></returns>
[UnitOfWork]
public async Task<AgreeDto> PostOperateAsync(Guid discussId)
{
var entity = await _repository.GetFirstAsync(x => x.DiscussId == discussId && x.CreatorId == this.CurrentUser.Id);
//判断是否已经点赞过
if (entity is null)
{
//没点赞过,添加记录即可,,修改总点赞数量
await _repository.InsertAsync(new AgreeEntity(discussId));
var discussEntity = await _discssRepository.GetByIdAsync(discussId);
if (discussEntity is null)
{
throw new UserFriendlyException("主题为空");
}
discussEntity.AgreeNum += 1;
await _discssRepository.UpdateAsync(discussEntity);
return new AgreeDto(true);
}
else
{
//点赞过,删除即可,修改总点赞数量
await _repository.DeleteByIdAsync(entity.Id);
var discussEntity = await _discssRepository.GetByIdAsync(discussId);
if (discussEntity is null)
{
throw new UserFriendlyException("主题为空");
}
discussEntity.AgreeNum -= 1;
await _discssRepository.UpdateAsync(discussEntity);
return new AgreeDto(false);
}
}
}
}

View File

@@ -0,0 +1,115 @@
using System.Collections.Generic;
using Mapster;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Article;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Bbs.Domain.Repositories;
using Yi.Framework.Bbs.Domain.Shared.Consts;
using Yi.Framework.Core.Extensions;
using Yi.Framework.Ddd.Application;
using Yi.Framework.Rbac.Domain.Shared.Consts;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Article服务实现
/// </summary>
public class ArticleService : YiCrudAppService<ArticleEntity, ArticleGetOutputDto, ArticleGetListOutputDto, Guid, ArticleGetListInputVo, ArticleCreateInputVo, ArticleUpdateInputVo>,
IArticleService
{
public ArticleService(IArticleRepository articleRepository,
ISqlSugarRepository<DiscussEntity> discussRepository,
IDiscussService discussService) : base(articleRepository)
{
_articleRepository = articleRepository;
_discussRepository = discussRepository;
_discussService = discussService;
}
private IArticleRepository _articleRepository { get; set; }
private ISqlSugarRepository<DiscussEntity> _discussRepository { get; set; }
private IDiscussService _discussService { get; set; }
/// <summary>
/// 获取文章全部平铺信息
/// </summary>
/// <param name="discussId"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[Route("article/all/discuss-id/{discussId}")]
public async Task<List<ArticleAllOutputDto>> GetAllAsync([FromRoute] Guid discussId)
{
await _discussService.VerifyDiscussPermissionAsync(discussId);
var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId);
//var result = entities.Tile();
var items = entities.Adapt<List<ArticleAllOutputDto>>();
return items;
}
/// <summary>
/// 查询文章
/// </summary>
/// <param name="discussId"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async Task<List<ArticleGetListOutputDto>> GetDiscussIdAsync([FromRoute] Guid discussId)
{
if (!await _discussRepository.IsAnyAsync(x => x.Id == discussId))
{
throw new UserFriendlyException(DiscussConst.No_Exist);
}
var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId);
var items = await MapToGetListOutputDtosAsync(entities);
return items;
}
/// <summary>
/// 发表文章
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async override Task<ArticleGetOutputDto> CreateAsync(ArticleCreateInputVo input)
{
var discuss = await _discussRepository.GetFirstAsync(x => x.Id == input.DiscussId);
if (discuss is null)
{
throw new UserFriendlyException(DiscussConst.No_Exist);
}
if (input.ParentId != Guid.Empty && !await _articleRepository.IsAnyAsync(x => x.Id == input.ParentId))
{
throw new UserFriendlyException(ArticleConst.No_Exist);
}
await VerifyDiscussCreateIdAsync(discuss.CreatorId);
return await base.CreateAsync(input);
}
/// <summary>
/// 效验创建权限
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public async Task VerifyDiscussCreateIdAsync(Guid? userId)
{
//只有文章是特殊的,不能在其他主题下创建
//主题的创建者不是当前用户,同时,没有权限或者超级管理
//false & true & false ,三个条件任意满意一个,即可成功使用||,最后取反,一个都不满足
//
if (userId != CurrentUser.Id && !UserConst.Admin.Equals(this.CurrentUser.UserName) && this.LazyServiceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext.GetUserPermissions(TokenTypeConst.Permission).Contains("bbs:discuss:add"))
{
throw new UserFriendlyException("无权限在其他用户主题中创建子文章");
}
}
}
}

View File

@@ -0,0 +1,19 @@
using Volo.Abp.Domain.Repositories;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Banner;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Ddd.Application;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Banner服务实现
/// </summary>
public class BannerService : YiCrudAppService<BannerEntity, BannerGetOutputDto, BannerGetListOutputDto, Guid, BannerGetListInputVo, BannerCreateInputVo, BannerUpdateInputVo>,
IBannerService
{
public BannerService(IRepository<BannerEntity, Guid> repository) : base(repository)
{
}
}
}

View File

@@ -0,0 +1,107 @@
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Comment;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Bbs.Domain.Managers;
using Yi.Framework.Bbs.Domain.Shared.Consts;
using Yi.Framework.Ddd.Application;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// 评论
/// </summary>
public class CommentService : YiCrudAppService<CommentEntity, CommentGetOutputDto, CommentGetListOutputDto, Guid, CommentGetListInputVo, CommentCreateInputVo, CommentUpdateInputVo>,
ICommentService
{
private readonly ISqlSugarRepository<CommentEntity, Guid> _repository;
public CommentService(ForumManager forumManager, ISqlSugarRepository<DiscussEntity> discussRepository, IDiscussService discussService, ISqlSugarRepository<CommentEntity,Guid> CommentRepository) :base(CommentRepository)
{
_forumManager = forumManager;
_discussRepository = discussRepository;
_discussService = discussService;
_repository = CommentRepository;
}
private ForumManager _forumManager { get; set; }
private ISqlSugarRepository<DiscussEntity> _discussRepository { get; set; }
private IDiscussService _discussService { get; set; }
/// <summary>
/// 获取改主题下的评论,结构为二维列表,该查询无分页
/// </summary>
/// <param name="discussId"></param>
/// <param name="input"></param>
/// <returns></returns>
public async Task<PagedResultDto<CommentGetListOutputDto>> GetDiscussIdAsync([FromRoute] Guid discussId, [FromQuery] CommentGetListInputVo input)
{
await _discussService.VerifyDiscussPermissionAsync(discussId);
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.Content), x => x.Content.Contains(input.Content))
.Where(x => x.DiscussId == discussId)
.Includes(x => x.CreateUser)
.ToListAsync();
//结果初始值,第一层等于全部根节点
var outPut = entities.Where(x => x.ParentId ==Guid.Empty).OrderByDescending(x => x.CreationTime).ToList();
//将全部数据进行hash
var dic = entities.ToDictionary(x => x.Id);
foreach (var comment in entities)
{
//不是根节点,需要赋值 被评论者用户信息等
if (comment.ParentId != Guid.Empty)
{
var parentComment = dic[comment.ParentId];
comment.CommentedUser = parentComment.CreateUser;
}
//root或者parent id根节点都是等于0的
var id = comment.RootId;
if (id != Guid.Empty)
{
dic[id].Children.Add(comment);
}
}
//子类需要排序
outPut.ForEach(x =>
{
x.Children = x.Children.OrderByDescending(x => x.CreationTime).ToList();
});
//获取全量主题评论, 先获取顶级的,将其他子组合到顶级下,形成一个二维,先转成dto
List<CommentGetListOutputDto> items = await MapToGetListOutputDtosAsync(outPut);
return new PagedResultDto<CommentGetListOutputDto>(entities.Count(), items);
}
/// <summary>
/// 发表评论
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public override async Task<CommentGetOutputDto> CreateAsync(CommentCreateInputVo input)
{
if (!await _discussRepository.IsAnyAsync(x => x.Id == input.DiscussId))
{
throw new UserFriendlyException(DiscussConst.No_Exist);
}
var entity = await _forumManager.CreateCommentAsync(input.DiscussId, input.ParentId, input.RootId, input.Content);
return await MapToGetOutputDtoAsync(entity);
}
}
}

View File

@@ -0,0 +1,148 @@
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.EventBus.Local;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Bbs.Domain.Managers;
using Yi.Framework.Bbs.Domain.Shared.Consts;
using Yi.Framework.Bbs.Domain.Shared.Enums;
using Yi.Framework.Ddd.Application;
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
using Yi.Framework.Rbac.Domain.Entities;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
/// </summary>
public class DiscussService : YiCrudAppService<DiscussEntity, DiscussGetOutputDto, DiscussGetListOutputDto, Guid, DiscussGetListInputVo, DiscussCreateInputVo, DiscussUpdateInputVo>,
IDiscussService
{
public DiscussService(ForumManager forumManager, ISqlSugarRepository<PlateEntity> plateEntityRepository, ILocalEventBus localEventBus) : base(forumManager._discussRepository)
{
_forumManager = forumManager;
_plateEntityRepository = plateEntityRepository;
_localEventBus = localEventBus;
}
private readonly ILocalEventBus _localEventBus;
private ForumManager _forumManager { get; set; }
private ISqlSugarRepository<PlateEntity> _plateEntityRepository { get; set; }
/// <summary>
/// 单查
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async override Task<DiscussGetOutputDto> GetAsync(Guid id)
{
//查询主题发布 浏览主题 事件,浏览数+1
var item = await _forumManager._discussRepository._DbQueryable.LeftJoin<UserEntity>((discuss, user) => discuss.CreatorId == user.Id)
.Select((discuss, user) => new DiscussGetOutputDto
{
User = new UserGetListOutputDto() { UserName = user.UserName, Nick = user.Nick, Icon = user.Icon }
}, true).SingleAsync(discuss => discuss.Id == id);
if (item is not null)
{
await VerifyDiscussPermissionAsync(item.Id);
throw new NotImplementedException("等待更新消息通知");
//_eventPublisher.PublishAsync(new SeeDiscussEventSource(new SeeDiscussEventArgs { DiscussId = item.Id, OldSeeNum = item.SeeNum }));
}
return item;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<PagedResultDto<DiscussGetListOutputDto>> GetListAsync([FromQuery] DiscussGetListInputVo input)
{
//需要关联创建者用户
RefAsync<int> total = 0;
var items = await _forumManager._discussRepository._DbQueryable
.WhereIF(!string.IsNullOrEmpty(input.Title), x => x.Title.Contains(input.Title))
.WhereIF(input.PlateId is not null, x => x.PlateId == input.PlateId)
.Where(x => x.IsTop == input.IsTop)
.LeftJoin<UserEntity>((discuss, user) => discuss.CreatorId == user.Id)
.OrderByIF(input.Type == QueryDiscussTypeEnum.New, discuss => discuss.CreationTime, OrderByType.Desc)
.OrderByIF(input.Type == QueryDiscussTypeEnum.Host, discuss => discuss.SeeNum, OrderByType.Desc)
.OrderByIF(input.Type == QueryDiscussTypeEnum.Suggest, discuss => discuss.AgreeNum, OrderByType.Desc)
.Select((discuss, user) => new DiscussGetListOutputDto
{
Id = discuss.Id,
IsAgree = SqlFunc.Subqueryable<AgreeEntity>().Where(x => x.CreatorId == CurrentUser.Id && x.DiscussId == discuss.Id).Any(),
User = new UserGetListOutputDto() { Id = user.Id, UserName = user.UserName, Nick = user.Nick, Icon = user.Icon }
}, true)
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
//查询完主题之后,要过滤一下私有的主题信息
items.ApplyPermissionTypeFilter(CurrentUser.Id ?? Guid.Empty);
return new PagedResultDto<DiscussGetListOutputDto>(total, items);
}
/// <summary>
/// 创建主题
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<DiscussGetOutputDto> CreateAsync(DiscussCreateInputVo input)
{
if (!await _plateEntityRepository.IsAnyAsync(x => x.Id == input.PlateId))
{
throw new UserFriendlyException(PlateConst.No_Exist);
}
var entity = await _forumManager.CreateDiscussAsync(await MapToEntityAsync(input));
return await MapToGetOutputDtoAsync(entity);
}
/// <summary>
/// 效验主题查询权限
/// </summary>
/// <param name="discussId"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async Task VerifyDiscussPermissionAsync(Guid discussId)
{
var discuss = await _forumManager._discussRepository.GetFirstAsync(x => x.Id == discussId);
if (discuss is null)
{
throw new UserFriendlyException(DiscussConst.No_Exist);
}
if (discuss.PermissionType == DiscussPermissionTypeEnum.Oneself)
{
if (discuss.CreatorId != CurrentUser.Id)
{
throw new UserFriendlyException(DiscussConst.Privacy);
}
}
if (discuss.PermissionType == DiscussPermissionTypeEnum.User)
{
if (discuss.CreatorId != CurrentUser.Id && !discuss.PermissionUserIds.Contains(CurrentUser.Id ?? Guid.Empty))
{
throw new UserFriendlyException(DiscussConst.Privacy);
}
}
}
}
}

View File

@@ -0,0 +1,54 @@
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
using Yi.Framework.Bbs.Application.Contracts.Dtos.MyType;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Ddd.Application;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Label服务实现
/// </summary>
public class MyTypeService : YiCrudAppService<MyTypeEntity, MyTypeOutputDto, MyTypeGetListOutputDto, Guid, MyTypeGetListInputVo, MyTypeCreateInputVo, MyTypeUpdateInputVo>,
IMyTypeService
{
private ISqlSugarRepository<MyTypeEntity, Guid> _repository;
public MyTypeService(ISqlSugarRepository<MyTypeEntity,Guid> repository, IDataFilter dataFilter):base(repository)
{
_repository= repository;
_dataFilter = dataFilter;
}
private IDataFilter _dataFilter { get; set; }
/// <summary>
/// 获取当前用户的主题类型
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public Task<PagedResultDto<MyTypeGetListOutputDto>> GetListCurrentAsync(MyTypeGetListInputVo input)
{
//过滤器需要更换
//_dataFilter.Enable<MyTypeEntity>(x => x.UserId == CurrentUser.Id);
//_dataFilter.AddFilter<MyTypeEntity>(x => x.UserId == CurrentUser.Id);
return base.GetListAsync(input);
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public override async Task<MyTypeOutputDto> CreateAsync(MyTypeCreateInputVo input)
{
var entity = await MapToEntityAsync(input);
entity.UserId = CurrentUser.Id??Guid.Empty;
entity.IsDeleted = false;
var outputEntity = await _repository.InsertReturnEntityAsync(entity);
return await MapToGetOutputDtoAsync(outputEntity);
}
}
}

View File

@@ -0,0 +1,19 @@
using Volo.Abp.Domain.Repositories;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate;
using Yi.Framework.Bbs.Application.Contracts.IServices;
using Yi.Framework.Bbs.Domain.Entities;
using Yi.Framework.Ddd.Application;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Plate服务实现
/// </summary>
public class PlateService : YiCrudAppService<PlateEntity, PlateGetOutputDto, PlateGetListOutputDto, Guid, PlateGetListInputVo, PlateCreateInputVo, PlateUpdateInputVo>,
IPlateService
{
public PlateService(IRepository<PlateEntity, Guid> repository) : base(repository)
{
}
}
}

View File

@@ -0,0 +1,22 @@
using Volo.Abp.Application.Services;
using Yi.Framework.Bbs.Application.Contracts.IServices;
namespace Yi.Framework.Bbs.Application.Services
{
/// <summary>
/// Setting服务实现
/// </summary>
public class SettingService : ApplicationService,
ISettingService
{
/// <summary>
/// 获取配置标题
/// </summary>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public Task<string> GetTitleAsync()
{
return Task.FromResult("你好世界");
}
}
}

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\rbac\Yi.Framework.Rbac.Application\Yi.Framework.Rbac.Application.csproj" />
<ProjectReference Include="..\Yi.Framework.Bbs.Application.Contracts\Yi.Framework.Bbs.Application.Contracts.csproj" />
<ProjectReference Include="..\Yi.Framework.Bbs.Domain\Yi.Framework.Bbs.Domain.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,163 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Yi.Framework.Bbs.Application</name>
</assembly>
<members>
<member name="M:Yi.Framework.Bbs.Application.Services.AccessLogService.AccessAsync">
<summary>
触发
</summary>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.AccessLogService.GetWeekAsync">
<summary>
获取当前周数据
</summary>
<returns></returns>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.AgreeService">
<summary>
点赞功能
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.AgreeService.PostOperateAsync(System.Guid)">
<summary>
点赞,返回true为点赞+1返回false为点赞-1
</summary>
<returns></returns>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.ArticleService">
<summary>
Article服务实现
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.ArticleService.GetAllAsync(System.Guid)">
<summary>
获取文章全部平铺信息
</summary>
<param name="discussId"></param>
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.ArticleService.GetDiscussIdAsync(System.Guid)">
<summary>
查询文章
</summary>
<param name="discussId"></param>
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.ArticleService.CreateAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.Article.ArticleCreateInputVo)">
<summary>
发表文章
</summary>
<param name="input"></param>
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.ArticleService.VerifyDiscussCreateIdAsync(System.Nullable{System.Guid})">
<summary>
效验创建权限
</summary>
<param name="userId"></param>
<returns></returns>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.BannerService">
<summary>
Banner服务实现
</summary>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.CommentService">
<summary>
评论
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.CommentService.GetDiscussIdAsync(System.Guid,Yi.Framework.Bbs.Application.Contracts.Dtos.Comment.CommentGetListInputVo)">
<summary>
获取改主题下的评论,结构为二维列表,该查询无分页
</summary>
<param name="discussId"></param>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.CommentService.CreateAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.Comment.CommentCreateInputVo)">
<summary>
发表评论
</summary>
<param name="input"></param>
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.DiscussService">
<summary>
Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.DiscussService.GetAsync(System.Guid)">
<summary>
单查
</summary>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.DiscussService.GetListAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss.DiscussGetListInputVo)">
<summary>
查询
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.DiscussService.CreateAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss.DiscussCreateInputVo)">
<summary>
创建主题
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.DiscussService.VerifyDiscussPermissionAsync(System.Guid)">
<summary>
效验主题查询权限
</summary>
<param name="discussId"></param>
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.MyTypeService">
<summary>
Label服务实现
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.MyTypeService.GetListCurrentAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.MyType.MyTypeGetListInputVo)">
<summary>
获取当前用户的主题类型
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.MyTypeService.CreateAsync(Yi.Framework.Bbs.Application.Contracts.Dtos.MyType.MyTypeCreateInputVo)">
<summary>
创建
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.PlateService">
<summary>
Plate服务实现
</summary>
</member>
<member name="T:Yi.Framework.Bbs.Application.Services.SettingService">
<summary>
Setting服务实现
</summary>
</member>
<member name="M:Yi.Framework.Bbs.Application.Services.SettingService.GetTitleAsync">
<summary>
获取配置标题
</summary>
<returns></returns>
<exception cref="T:System.NotImplementedException"></exception>
</member>
</members>
</doc>

View File

@@ -0,0 +1,18 @@
using Volo.Abp.Modularity;
using Yi.Framework.Bbs.Application.Contracts;
using Yi.Framework.Bbs.Domain;
using Yi.Framework.Rbac.Application;
namespace Yi.Framework.Bbs.Application
{
[DependsOn(typeof(YiFrameworkBbsDomainModule),
typeof(YiFrameworkBbsApplicationContractsModule),
typeof(YiFrameworkRbacApplicationModule)
)]
public class YiFrameworkBbsApplicationModule : AbpModule
{
}
}