This commit is contained in:
2025-09-22 20:39:23 +08:00
parent 32549f64a1
commit 1b0eb339b1
8 changed files with 370 additions and 41 deletions
+22
View File
@@ -3,6 +3,7 @@ namespace BLL
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.ServiceModel.Security;
using System.Web.UI.WebControls;
public static class UserService
@@ -390,6 +391,27 @@ namespace BLL
return result;
}
/// <summary>
/// 根据用户Id判断用户是否有维护邮箱,返回姓名
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static bool IsUserHaveEmail(string userId, out string userName)
{
bool result = false;
userName = string.Empty;
if (!string.IsNullOrWhiteSpace(userId))
{
var user = (from x in Funs.DB.Sys_User where x.UserId == userId select x).FirstOrDefault();
if (user != null)
{
result = !string.IsNullOrWhiteSpace(user.Email);
userName = user.UserName;
}
}
return result;
}
/// <summary>
/// 根据用户Id获取用户邮箱
/// </summary>