小程序接口修改

This commit is contained in:
2023-07-11 16:32:16 +08:00
parent ca5c3fe9a7
commit 4449a7754f
68 changed files with 4634 additions and 2984 deletions
+53 -15
View File
@@ -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))
{