优化实体统一首字母大写

This commit is contained in:
不做码农
2022-09-01 21:54:53 +08:00
parent 401338eadb
commit c372c9a9e2
17 changed files with 184 additions and 185 deletions

View File

@@ -106,11 +106,11 @@ namespace ZR.Admin.WebApi.Controllers.System
.NameMatchingStrategy(NameMatchingStrategy.IgnoreCase);//忽略字段名称的大小写;//忽略除以上配置的所有字段
var modal = menuDto.Adapt<SysMenu>(config).ToUpdate(HttpContext);
if (UserConstants.YES_FRAME.Equals(modal.isFrame) && !modal.path.StartsWith("http"))
if (UserConstants.YES_FRAME.Equals(modal.IsFrame) && !modal.Path.StartsWith("http"))
{
return ToResponse(ApiResult.Error($"修改菜单'{modal.MenuName}'失败地址必须以http(s)://开头"));
}
if (modal.MenuId.Equals(modal.parentId))
if (modal.MenuId.Equals(modal.ParentId))
{
return ToResponse(ApiResult.Error($"修改菜单'{modal.MenuName}'失败,上级菜单不能选择自己"));
}
@@ -141,7 +141,7 @@ namespace ZR.Admin.WebApi.Controllers.System
{
return ToResponse(ApiResult.Error($"新增菜单'{menu.MenuName}'失败,菜单名称已存在"));
}
if (UserConstants.YES_FRAME.Equals(menu.isFrame) && !menu.path.StartsWith("http"))
if (UserConstants.YES_FRAME.Equals(menu.IsFrame) && !menu.Path.StartsWith("http"))
{
return ToResponse(ApiResult.Error($"新增菜单'{menu.MenuName}'失败地址必须以http(s)://开头"));
}
@@ -189,7 +189,7 @@ namespace ZR.Admin.WebApi.Controllers.System
MenuDto MenuDto = new()
{
MenuId = id,
orderNum = value
OrderNum = value
};
if (MenuDto == null) { return ToResponse(ApiResult.Error(101, "请求参数错误")); }