public ResponseICRegisterPrePay ICRegisterPrePay(RequestICRegisterPrePay request) { var res = new ResponseICRegisterPrePay(); using (cnn = this.GetConnection()) { var ts = cnn.BeginTransaction(); try { string sql = @"update TKS_FAS_ICRegisterOrder set status='2' , Pre_Pay_Money=@Pre_Pay_Money where orderNo=@OrderNo and status='1' "; cnn.Execute(sql, new { Pre_Pay_Money = request.Money, OrderNo = request.OrderNo }, ts); ts.Commit(); res.IsSuccess = true; res.Message = "预支付成功"; return(res); } catch (Exception ex) { ts.Rollback(); return(this.DealException(res, ex) as ResponseICRegisterPrePay); } } }
public ResponseICRegisterPrePay PrePay([FromBody] RequestICRegisterPrePay request) { try { ICRegisterBLL bll = new ICRegisterBLL(); return(bll.ICRegisterPrePay(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }