feat: 优化主题置顶显示,同时添加模板
This commit is contained in:
23
Yi.Abp.Net8/.template.config/template.json
Normal file
23
Yi.Abp.Net8/.template.config/template.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json.schemastore.org/template",
|
||||||
|
"author": "ccnetcore",
|
||||||
|
"classifications": [ "Common", "Code" ],
|
||||||
|
"identity": "yi",
|
||||||
|
"name": "YI",
|
||||||
|
"shortName": "yi",
|
||||||
|
"sourceName": "Yi.Abp",
|
||||||
|
"tags": {
|
||||||
|
"language": "C#",
|
||||||
|
"type": "item"
|
||||||
|
},
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"modifiers": [
|
||||||
|
{
|
||||||
|
"exclude": [ "bin/**/*", "obj/**/*", "*.user", "*.vspscc", "*.vssscc", "*.cache",".git/**/*",".vs/**/*" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
|
|||||||
public Guid? PlateId { get; set; }
|
public Guid? PlateId { get; set; }
|
||||||
|
|
||||||
//Ĭ<>ϲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ö<EFBFBD>
|
//Ĭ<>ϲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ö<EFBFBD>
|
||||||
public bool IsTop { get; set; } = false;
|
public bool? IsTop { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//<2F><>ѯ<EFBFBD><D1AF>ʽ
|
//<2F><>ѯ<EFBFBD><D1AF>ʽ
|
||||||
|
|||||||
@@ -106,10 +106,7 @@ namespace Yi.Framework.Bbs.Application.Services
|
|||||||
var items = await _forumManager._discussRepository._DbQueryable
|
var items = await _forumManager._discussRepository._DbQueryable
|
||||||
.WhereIF(!string.IsNullOrEmpty(input.Title), x => x.Title.Contains(input.Title))
|
.WhereIF(!string.IsNullOrEmpty(input.Title), x => x.Title.Contains(input.Title))
|
||||||
.WhereIF(input.PlateId is not null, x => x.PlateId == input.PlateId)
|
.WhereIF(input.PlateId is not null, x => x.PlateId == input.PlateId)
|
||||||
|
.WhereIF(input.IsTop is not null,x=>x.IsTop==input.IsTop)
|
||||||
|
|
||||||
.WhereIF(input.IsTop == true, x => x.IsTop == input.IsTop)
|
|
||||||
|
|
||||||
.LeftJoin<UserEntity>((discuss, user) => discuss.CreatorId == user.Id)
|
.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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user