优化文章管理

This commit is contained in:
不做码农
2022-04-23 21:59:34 +08:00
parent 6d6dd72116
commit c6d59c7390
2 changed files with 6 additions and 6 deletions

View File

@@ -141,7 +141,7 @@ namespace ZR.Admin.WebApi.Controllers
{
//从 Dto 映射到 实体
var addModel = parm.Adapt<Article>().ToCreate(context: HttpContext);
addModel.AuthorName = User.Identity.Name;
addModel.AuthorName = HttpContext.GetName();
var response = _ArticleService.Update(it => it.Cid == addModel.Cid,
f => new Article
@@ -149,7 +149,7 @@ namespace ZR.Admin.WebApi.Controllers
Title = addModel.Title,
Content = addModel.Content,
Tags = addModel.Tags,
Category_id = addModel.Category_id,
Category_Id = addModel.Category_Id,
UpdateTime = addModel.UpdateTime,
Status = addModel.Status
}).ToCreate();