优化代码

This commit is contained in:
不做码农
2023-07-23 16:28:56 +08:00
parent 5d9d1e2f38
commit c54c306a9d
6 changed files with 46 additions and 50 deletions

View File

@@ -1,7 +1,9 @@
using Infrastructure;
using Aliyun.OSS;
using Infrastructure;
using Infrastructure.Attribute;
using Infrastructure.Enums;
using Infrastructure.Extensions;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using ZR.Admin.WebApi.Extensions;
@@ -71,8 +73,8 @@ namespace ZR.Admin.WebApi.Controllers.System
{
throw new CustomException($"修改岗位{post.PostName}失败,岗位编码已存在");
}
post.Create_by = HttpContext.GetName();
post.ToCreate(HttpContext);
return ToResponse(PostService.Add(post));
}
@@ -94,7 +96,7 @@ namespace ZR.Admin.WebApi.Controllers.System
{
throw new CustomException($"修改岗位{post.PostName}失败,岗位编码已存在");
}
post.Update_by = HttpContext.GetName();
post.ToUpdate(HttpContext);
return ToResponse(PostService.Update(post));
}