Merge branch 'abp' of https://gitee.com/ccnetcore/Yi into abp
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Volo.Abp.Application.Dtos;
|
using Volo.Abp.Application.Dtos;
|
||||||
using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
|
using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
|
||||||
|
using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate;
|
||||||
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
||||||
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
|
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
|
||||||
|
|
||||||
@@ -37,5 +38,7 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
|
|||||||
public bool IsAgree { get; set; } = false;
|
public bool IsAgree { get; set; } = false;
|
||||||
public List<Guid>? PermissionUserIds { get; set; }
|
public List<Guid>? PermissionUserIds { get; set; }
|
||||||
public BbsUserGetListOutputDto User { get; set; }
|
public BbsUserGetListOutputDto User { get; set; }
|
||||||
|
|
||||||
|
public PlateGetOutputDto Plate { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ namespace Yi.Framework.Bbs.Application.Services
|
|||||||
//查询主题发布 浏览主题 事件,浏览数+1
|
//查询主题发布 浏览主题 事件,浏览数+1
|
||||||
var item = await _forumManager._discussRepository._DbQueryable.LeftJoin<UserEntity>((discuss, user) => discuss.CreatorId == user.Id)
|
var item = await _forumManager._discussRepository._DbQueryable.LeftJoin<UserEntity>((discuss, user) => discuss.CreatorId == user.Id)
|
||||||
.LeftJoin<BbsUserExtraInfoEntity>((discuss, user, info) => user.Id == info.UserId)
|
.LeftJoin<BbsUserExtraInfoEntity>((discuss, user, info) => user.Id == info.UserId)
|
||||||
.Select((discuss, user, info) => new DiscussGetOutputDto
|
.LeftJoin<PlateEntity>((discuss, user, info,plate) => plate.Id == discuss.PlateId)
|
||||||
|
.Select((discuss, user, info, plate) => new DiscussGetOutputDto
|
||||||
{
|
{
|
||||||
Id=discuss.Id,
|
Id=discuss.Id,
|
||||||
IsAgree = SqlFunc.Subqueryable<AgreeEntity>().WhereIF(CurrentUser.Id != null, x => x.CreatorId == CurrentUser.Id && x.DiscussId == discuss.Id).Any(),
|
IsAgree = SqlFunc.Subqueryable<AgreeEntity>().WhereIF(CurrentUser.Id != null, x => x.CreatorId == CurrentUser.Id && x.DiscussId == discuss.Id).Any(),
|
||||||
@@ -70,6 +71,15 @@ namespace Yi.Framework.Bbs.Application.Services
|
|||||||
Id = user.Id,
|
Id = user.Id,
|
||||||
Level = info.Level,
|
Level = info.Level,
|
||||||
UserLimit = info.UserLimit
|
UserLimit = info.UserLimit
|
||||||
|
},
|
||||||
|
Plate=new Contracts.Dtos.Plate.PlateGetOutputDto()
|
||||||
|
{
|
||||||
|
Name=plate.Name,
|
||||||
|
Id=plate.Id,
|
||||||
|
Code=plate.Code,
|
||||||
|
Introduction=plate.Introduction,
|
||||||
|
Logo=plate.Logo
|
||||||
|
|
||||||
}
|
}
|
||||||
}, true)
|
}, true)
|
||||||
.SingleAsync(discuss => discuss.Id == id);
|
.SingleAsync(discuss => discuss.Id == id);
|
||||||
|
|||||||
Reference in New Issue
Block a user