public ActionResult GetUserById(string id) { var result = new ResultAdaptDto(); if (!id.IsEmptyId()) { var user = _userApp.GetUserById(id.ToInt64()); result.data.Add("model", user); } var depts = _deptApp.GetDepartTree(); result.data.Add("depts", depts); return(Json(result)); }
public IActionResult UnLock(string password) { var result = new ResultAdaptDto(); result.status = false; if (password.IsEmpty()) { result.message = "密码不能为空"; return(Json(result)); } var loginUser = RequestHelper.AdminInfo(); var user = _userApp.GetUserById(loginUser.Id); if (user == null) { result.statusCode = 403; return(Json(result)); } if (user.pass_word != password.Trim()) { result.message = "密码错误"; return(Json(result)); } result.status = true; return(Json(result)); }
/// <summary> /// 单条数据 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult GetUserById(string id) { var result = new ResultAdaptDto(); //result.Data = _userApp.GetUserById(id); ////result.statusCodeCode=JuiJsonEnum.Ok; var data = _userApp.GetUserById(id); result.data.Add("model", data); return(Content(result.ToJson())); }