public ResponsePeriodPaidGet WX_PeriodPaidGet(RequestPeriodPaidGet request) { ResponsePeriodPaidGet res = new ResponsePeriodPaidGet(); using (cnn = this.GetConnection()) { var ts = cnn.BeginTransaction(); try { //string sql = "select * from TKS_FAS_MonthPeriodInfo where accountId=@AccountId and isPay=1 order by startDate"; //modify by andy 未结转也可查看数据 string sql = "select * from TKS_FAS_MonthPeriodInfo where accountId=@AccountId order by startDate"; var data = cnn.Query <TKS_FAS_MonthPeriodInfo>(sql, new { AccountId = request.AccountId }, ts).ToList(); sql = @"select * from tks_fas_accountInfo where id=@Id"; var account = cnn.QueryFirst <TKS_FAS_AccountInfo>(sql, new { Id = request.AccountId }, ts); ts.Commit(); res.IsSuccess = true; res.Message = "加载成功"; res.Account = account; res.Data = data; return(res); } catch (Exception ex) { return(this.DealException(res, ex) as ResponsePeriodPaidGet); } } }
public ResponsePeriodPaidGet PeriodGet([FromBody] RequestPeriodPaidGet request) { try { PeriodBLL bll = new PeriodBLL(); return(bll.PeriodGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }