| | |
| | | if (entity == null) throw Oops.Oh(EnumErrorCodeType.s404, "该菜单"); |
| | | if (entity.ParentId != request.ParentId) throw Oops.Oh(EnumErrorCodeType.s410, "上级Id"); |
| | | request.Adapt(entity); |
| | | if (await CheckExist(entity)) throw Oops.Oh(EnumErrorCodeType.s405, "菜单编号"); |
| | | if (await CheckExist(entity)) throw Oops.Oh(EnumErrorCodeType.s406, "菜单编号"); |
| | | await rep.UpdateAsync(entity); |
| | | return entity.Id; |
| | | } |
| | |
| | | if (entity == null) throw Oops.Oh(EnumErrorCodeType.s404, "该菜单"); |
| | | if (entity.ParentId != request.ParentId) throw Oops.Oh(EnumErrorCodeType.s410, "上级Id"); |
| | | request.Adapt(entity); |
| | | if (await CheckExist(entity)) throw Oops.Oh(EnumErrorCodeType.s405, "菜单编号"); |
| | | if (await CheckExist(entity)) throw Oops.Oh(EnumErrorCodeType.s406, "菜单编号"); |
| | | await rep.UpdateAsync(entity); |
| | | return entity.Id; |
| | | } |