10/16更新
This commit is contained in:
@@ -49,6 +49,8 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
/// <returns></returns>
|
||||
public override Task<Result> Add(ArticleEntity entity)
|
||||
{
|
||||
//如果标题为空,默认为内容的前20个字符
|
||||
entity.Title = entity.Title ?? entity.Content.Substring(0, 20);
|
||||
entity.UserId = HttpContext.GetUserIdInfo();
|
||||
return base.Add(entity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user