2112
This commit is contained in:
@@ -30,12 +30,12 @@ namespace BLL.APIService
|
||||
}
|
||||
public static void GetSyncUserInfo()
|
||||
{
|
||||
var token = GetUserToken(); //获取接口token
|
||||
//var token = GetUserToken(); //获取接口token
|
||||
var dic = GetDepartList(); //把本地数据库中的部门全部取出作为字典
|
||||
var dicUser = GetUserInfoByAccount(); //同上把所有用户取出来
|
||||
//string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
|
||||
//string result = System.IO.File.ReadAllText(file);
|
||||
string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
|
||||
string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
|
||||
string result = System.IO.File.ReadAllText(file);
|
||||
//string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
|
||||
var data = JsonHelper.DeserializeJsonToObject<ResultData<List<UserInfo>>>(result);
|
||||
List<Model.SyncDataUserLogs> logList = new List<Model.SyncDataUserLogs>();
|
||||
if (data.code == "200")
|
||||
@@ -246,7 +246,7 @@ namespace BLL.APIService
|
||||
/// <returns></returns>
|
||||
private static Dictionary<string,string> GetUserInfoByAccount()
|
||||
{
|
||||
return BLL.Funs.DB.Sys_User.Select(t => new { t.UserId, t.Account }).ToList()
|
||||
return BLL.Funs.DB.Sys_User.Where(t=>t.IsPost==true).Select(t => new { t.UserId, t.Account }).ToList()
|
||||
.ToDictionary(t => t.Account.ToLower(), t => t.UserId);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user