小程序接口修改
This commit is contained in:
@@ -160,13 +160,26 @@ namespace BLL
|
||||
|
||||
return userName;
|
||||
}
|
||||
public static string GetUserNameByUserIdForApi(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string userName = string.Empty;
|
||||
Model.Sys_User user = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
if (user != null)
|
||||
{
|
||||
userName = user.UserName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户获取用户名称
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetUserNameAndTelByUserId(string userId)
|
||||
return userName;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据用户获取用户名称
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetUserNameAndTelByUserId(string userId)
|
||||
{
|
||||
string userName = string.Empty;
|
||||
Model.Sys_User user = Funs.DB.Sys_User.FirstOrDefault(e => e.UserId == userId);
|
||||
@@ -1322,16 +1335,41 @@ namespace BLL
|
||||
}
|
||||
|
||||
return userName;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public static string getUserNamesUserIdsForApi(object userIds)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string userName = string.Empty;
|
||||
if (userIds != null)
|
||||
{
|
||||
string[] ids = userIds.ToString().Split(',');
|
||||
foreach (string id in ids)
|
||||
{
|
||||
var q = db.Sys_User.FirstOrDefault(e => e.UserId == id);
|
||||
if (q != null)
|
||||
{
|
||||
userName += q.UserName + ",";
|
||||
}
|
||||
}
|
||||
if (userName != string.Empty)
|
||||
{
|
||||
userName = userName.Substring(0, userName.Length - 1); ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetProjectUserListByProjectIdForApi(string projectId, string name)
|
||||
return userName;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Sys_User> GetProjectUserListByProjectIdForApi(string projectId, string name)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user