From 2da5c6be190d8078393eb2df777863931218ad19 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期五, 08 八月 2025 10:16:40 +0800 Subject: [PATCH] feat:开发 --- FlexJobApi.Core/Entities/Common/Resource.cs | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/FlexJobApi.Core/Entities/Common/Resource.cs b/FlexJobApi.Core/Entities/Common/Resource.cs index 196433f..a412a53 100644 --- a/FlexJobApi.Core/Entities/Common/Resource.cs +++ b/FlexJobApi.Core/Entities/Common/Resource.cs @@ -1,7 +1,9 @@ -锘縰sing System; +锘縰sing Furion.FriendlyException; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; @@ -113,5 +115,22 @@ /// 鏄惁宸茶繃鏈� /// </summary> public bool IsExpired { get; set; } + + public HttpMethod GetHttpMethod() + { + switch (Method) + { + case EnumResourceMethod.Get: + return HttpMethod.Get; + case EnumResourceMethod.Post: + return HttpMethod.Post; + case EnumResourceMethod.Put: + return HttpMethod.Put; + case EnumResourceMethod.Delete: + return HttpMethod.Delete; + default: + throw Oops.Oh(EnumErrorCodeType.s400, "涓嶆敮鎸佺殑璇锋眰绫诲瀷"); + } + } } } -- Gitblit v1.9.1