sunpengfei
2025-08-14 6001ccc7e7052b64931235b65a8b5d02f35ad1bd
FlexJobApi.Core/Utils/StringUtils/StringUtils.cs
@@ -35,9 +35,10 @@
            return !str.IsNull();
        }
        public static Guid? ToGuid(this string str)
        public static Guid? ToGuid(this string str, string requiredMessage = null)
        {
            if (str.IsNotNull() && Guid.TryParse(str, out var guid) && guid != Guid.Empty) return guid;
            if (requiredMessage.IsNotNull()) throw Oops.Oh(EnumErrorCodeType.s400, requiredMessage);
            return null;
        }