public ResponseUserGet UserGet(RequestUserGet request) { ResponseUserGet response = new ResponseUserGet(); using (cnn = GetConnection()) { var ts = cnn.BeginTransaction(); try { var user = UserInfoGetButAccount(request.Token, ts); string sql = @" select A.*,B.NodeId ,C.Name as NodeName from tks_fas_user A left join TKS_FAS_User2Node B on A.id=b.UserId left join TKS_FAS_Node C on B.NodeId=c.id where A.id=@Id"; var data = cnn.QuerySingle <TKS_FAS_UserExt>(sql, new { Id = request.Data.Id }, ts); ts.Commit(); response.IsSuccess = true; response.Message = "加载完毕"; response.Data = data; return(response); } catch (Exception ex) { ts.Rollback(); return(this.DealException(response, ex) as ResponseUserGet); } } }
public ResponseUserGet UserGet([FromBody] RequestUserGet request) { try { PermissionBLL bll = new PermissionBLL(); return(bll.UserGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }