public ActionResult CheckApplyCashRecordByAli(int id)
        {
            try
            {
                UserInfo             userInfo             = LoginUserInfo.Get();
                dm_basesettingEntity dm_BasesettingEntity = dM_BaseSettingIBLL.GetEntity(userInfo.companyId);

                dm_apply_cashrecordEntity jlm_Xcx_Apply_CashrecordEntity = dM_Apply_CashRecordIBLL.GetEntity(id);

                if (jlm_Xcx_Apply_CashrecordEntity.IsEmpty())
                {
                    throw new Exception("未找到提现记录!");
                }

                if (jlm_Xcx_Apply_CashrecordEntity.status != 0)
                {
                    throw new Exception("当前提现记录不可操作!");
                }

                dm_userEntity dm_UserEntity = dM_UserIBLL.GetEntity(jlm_Xcx_Apply_CashrecordEntity.user_id);
                if (dm_UserEntity.IsEmpty())
                {
                    throw new Exception("未检测到用户信息!");
                }
                if (dm_UserEntity.realname.IsEmpty())
                {
                    throw new Exception("该用户未实名!");
                }
                if (dm_UserEntity.zfb.IsEmpty())
                {
                    throw new Exception("该用户未绑定支付宝账号!");
                }


                IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", dm_BasesettingEntity.alipay_appid, dm_BasesettingEntity.merchant_private_key, "json", "1.0", "RSA2", "utf-8", false, AliPayHelper.GetCertParams(dm_BasesettingEntity.alipay_appid, base.Server));
                AlipayFundTransUniTransferRequest request = new AlipayFundTransUniTransferRequest();
                request.BizContent = "{" +
                                     "\"out_biz_no\":\"" + Guid.NewGuid().ToString() + "\"," +
                                     "\"trans_amount\":" + jlm_Xcx_Apply_CashrecordEntity.price + "," +
                                     "\"product_code\":\"TRANS_ACCOUNT_NO_PWD\"," +
                                     "\"biz_scene\":\"DIRECT_TRANSFER\"," +
                                     "\"order_title\":\"哆来米\"," +
                                     "\"original_order_id\":\"\"," +
                                     "\"payee_info\":{" +
                                     "\"identity\":\"" + dm_UserEntity.zfb + "\"," +
                                     "\"identity_type\":\"ALIPAY_LOGON_ID\"," +
                                     "\"name\":\"" + dm_UserEntity.realname + "\"" +
                                     "    }," +
                                     "\"remark\":\"余额提现\"," +
                                     "\"business_params\":\"{\\\"sub_biz_scene\\\":\\\"REDPACKET\\\"}\"" +
                                     "  }";
                AlipayFundTransUniTransferResponse response = client.CertificateExecute(request);
                if (response.IsError)
                {
                    throw new Exception(response.Msg + "=>" + response.SubMsg);
                }

                jlm_Xcx_Apply_CashrecordEntity.paytype        = 2;
                jlm_Xcx_Apply_CashrecordEntity.status         = 1;
                jlm_Xcx_Apply_CashrecordEntity.OrderId        = response.OrderId;
                jlm_Xcx_Apply_CashrecordEntity.PayFundOrderId = response.PayFundOrderId;
                jlm_Xcx_Apply_CashrecordEntity.TransDate      = DateTime.Parse(response.TransDate);
                jlm_Xcx_Apply_CashrecordEntity.checktime      = DateTime.Now;

                dM_Apply_CashRecordIBLL.CheckApplyCashRecordByAli(jlm_Xcx_Apply_CashrecordEntity);

                return(Success("打款成功!"));
            }
            catch (Exception ex)
            {
                return(FailException(ex));
            }
        }
 public ActionResult SaveForm(int keyValue, dm_apply_cashrecordEntity entity)
 {
     dM_Apply_CashRecordIBLL.SaveEntity(keyValue, entity);
     return(Success("保存成功!"));
 }