public ActionResult SysHelpIndex() { BaseResultDto <List <SystemDictionary> > resultDto = HttpHelper.CreatHelper().DoGetObject <BaseResultDto <List <SystemDictionary> > >(string.Format("{0}SysSetting/GetAllHelpType", this.WebApiUrl)); List <SystemDictionary> dicHelpType = resultDto.Tag; if (dicHelpType == null) { dicHelpType = new List <SystemDictionary>(); } ViewBag.HelpType = dicHelpType; var model = new { //查询的表单实体 searchForm = new { askContent = string.Empty, askAccount = string.Empty, helpType = string.Empty, startDate = DateTime.Now.AddMonths(-1), endDate = DateTime.Now }, urls = new { search = "/SysSetting/SearchSysHelp", addEdit = "/SysSetting/addEditSysHelp", del = "/SysSetting/DelHelp" } }; return(View(model)); }
public JsonResult addEditSysHelp(SystemHelp systemHelp) { JsonResult result = null; try { BaseResultDto <string> resultDto = new BaseResultDto <string>(); //添加或者修改 if (systemHelp.Id > 0) { //修改 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}SysSetting/UpdateHelp", this.WebApiUrl), systemHelp); } else { systemHelp.ReplyAccount = this.UserInfo.UserName; //systemHelp.ReplyDate = this.UserInfo.UserName; //添加 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}SysSetting/AddHelp", this.WebApiUrl), systemHelp); } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
/// <summary> /// 用户充值 /// </summary> /// <returns></returns> public ActionResult Rechare(SystemUsers model) { BaseResultDto <PostBaseYeePayPar> resu = null; if (null != Session["UserInfo"]) { SystemUsers user = (SystemUsers)Session["UserInfo"]; if (!user.IDNumberIsAuthenticate) { resu = new BaseResultDto <PostBaseYeePayPar>(); resu.IsSeccess = false; resu.ErrorMsg = "请先进行实名认证!"; resu.ErrorCode = -3; //用户未登录 return(Content(resu.ToJsonString())); } model.ID = user.ID; resu = http.DoPostObject <BaseResultDto <PostBaseYeePayPar> >(ApplicationPropertys.WEBAPI_URL + "/User/Rechare/", model); } else { resu = new BaseResultDto <PostBaseYeePayPar>(); resu.IsSeccess = false; resu.ErrorMsg = "用户未登录或登录超时"; resu.ErrorCode = -2; //用户未登录 } return(Content(resu.ToJsonString())); }
public JsonResult addEditSystemDic(SystemDictionary model, int opType) { JsonResult result = null; try { BaseResultDto <string> resultDto = new BaseResultDto <string>(); //添加或者修改 if (opType == 1) { //修改 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}SysSetting/UpdateDic", this.WebApiUrl), model); } else if (opType == 2) { //添加 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}SysSetting/AddDic", this.WebApiUrl), model); } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
public JsonResult AddUpdateNews(SystemNews news) { //FormCollection form DataFornat dataformat = new DataFornat(); JsonResult result = null; try { news.NewsContent = HttpUtility.UrlDecode(news.NewsContent); news.NewsContent = dataformat.ReplaceImageSrc(news.NewsContent, AppConfigHelper.MainSiteUrl); BaseResultDto <string> resultDto = new BaseResultDto <string>(); //添加或者修改 if (news.Id > 0) { //修改 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}News/Update", this.WebApiUrl), news); } else { news.NewsRealseTime = System.DateTime.Now; news.UserName = this.UserInfo.UserName; news.UserId = this.UserInfo.ID; //添加 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}News/Add", this.WebApiUrl), news); } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
public BaseResultDto <string> ApplyBorrower(SystemBorrowerApply model) { BaseResultDto <string> result = new BaseResultDto <string>(); try { if (helper.Add <SystemBorrowerApply>(model) > 0) { result.ErrorMsg = "成功"; result.ErrorCode = 1; result.IsSeccess = true; } else { result.ErrorMsg = "失败"; result.ErrorCode = 0; } } catch (Exception ex) { result.ErrorMsg = ex.Message; result.ErrorCode = -1; } return(result); }
public ActionResult SmsTemplteIndex() { List <SystemDictionary> result = new List <SystemDictionary>(); try { BaseResultDto <List <SystemDictionary> > resultDto = HttpHelper.CreatHelper().DoGetObject <BaseResultDto <List <SystemDictionary> > >(string.Format("{0}SysSetting/GetSmsTemplateOptions", this.WebApiUrl)); if (resultDto.Tag.Count == 0) { resultDto.Tag = new List <SystemDictionary>(); } ViewBag.data = resultDto.Tag; } catch (Exception) { } var model = new { //查询的表单实体 searchForm = new { templateName = string.Empty }, urls = new { search = "/Sms/SearchSmsTemplte", addEdit = "/Sms/AddEditSmsTemplte" } }; return(View(model)); }
public JsonResult AddEditSmsTemplte(SystemSmsTemplate tempate) { JsonResult result = null; try { BaseResultDto <string> resultDto = new BaseResultDto <string>(); if (tempate.Id > 0) { //编辑 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}Sms/Update", this.WebApiUrl), tempate); } else { //添加 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}Sms/Add", this.WebApiUrl), tempate); } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
/// <summary> /// 用户登录 /// </summary> /// <param name="userNameOrPhone">用户名或者手机好嘛</param> /// <param name="userPwd">用户密码(MD5加密)</param> /// <param name="userIP">用户登录IP</param> /// <param name="userType">用户类型</param> /// <returns></returns> public BaseResultDto <SystemUsers> Landing(string userNameOrPhone, string userPwd, string userIP, int userType) { BaseResultDto <SystemUsers> model = new BaseResultDto <SystemUsers>(); SqlCommand cmd = db.GetStoredProcedureCommand("Proc_Landing"); db.AddInputParameter(cmd, "@UserNameOrPhone", DbType.String, userNameOrPhone); db.AddInputParameter(cmd, "@pwd", DbType.String, userPwd); db.AddInputParameter(cmd, "@ip", DbType.String, userIP); db.AddInputParameter(cmd, "@UserType", DbType.Int32, userType); db.AddOutputParameter(cmd, "@ErrorMsg", DbType.String, 500); db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4); var dt = db.ExecuteDataTable(cmd); int returnValue = db.GetParameter(cmd, "@ReturnValue").Value.ToInt(); if (dt != null) { if (returnValue <= 0) { model.IsSeccess = false; model.ErrorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); } else { model.IsSeccess = true; model.Tag = dt.CreateDataReader().ReaderToModel <SystemUsers>(); } } return(model); }
/// <summary> /// 身份认证 /// </summary> /// <returns></returns> public BaseResultDto <bool> AuthenticateIDCard(SystemUsers user) { BaseResultDto <bool> resu = new BaseResultDto <bool>(); SqlCommand cmd = db.GetStoredProcedureCommand("Proc_AuthenticateIDCard"); db.AddInputParameter(cmd, "@UserID", DbType.Int32, user.ID); db.AddInputParameter(cmd, "@UserRealName", DbType.String, user.RealName); db.AddInputParameter(cmd, "@UserIDCard", DbType.String, user.IDNumber); db.AddInputParameter(cmd, "@UserAddress", DbType.String, user.UserAddress); db.AddOutputParameter(cmd, "@ErrorMsg", DbType.String, 500); db.AddReturnValueParameter(cmd, "@ReturnValue", DbType.Int32, 4); db.ExecuteNonQuery(cmd); int result = db.GetParameter(cmd, "@ReturnValue").Value.ToInt(); if (result > 0) { resu.IsSeccess = true; } else { resu.IsSeccess = false; resu.ErrorMsg = db.GetParameter(cmd, "@ErrorMsg").Value.ToString(); } return(resu); }
/// <summary> /// 处理申请 /// </summary> /// <param name="data"></param> /// <returns></returns> public BaseResultDto <string> UpdateBorrowerApplyStatus(RQApplyData data) { BaseResultDto <string> result = new BaseResultDto <string>(); try { RQProcParam proc = new RQProcParam(); proc.ProcName = "Proc_UpdateSystemBorrowerApply"; proc.DicParam.Add("Id", data.ApplyId); proc.DicParam.Add("Publisher", data.Publisher); proc.DicParam.Add("OperatorUserId", data.OperatorUserId); proc.DicParam.Add("OperatorUserName", data.OperatorUserName); proc.DicParam.Add("IP", data.IP); if (helper.ExecByProc(proc) > 0) { result.ErrorMsg = "成功"; result.ErrorCode = 1; result.IsSeccess = true; } else { result.ErrorMsg = "失败"; result.ErrorCode = 0; } } catch (Exception ex) { result.ErrorMsg = ex.Message; result.ErrorCode = -1; } return(result); }
public BaseResultDto <string> UpdatePwd(RQPwdDto model) { BaseResultDto <string> result = new BaseResultDto <string>(); List <string> keyVal = new List <string>(); keyVal.Add(string.Format("UserPassword='******'", model.NewPwd)); string sqlWhere = string.Format("UserPassword='******' and ID={1}", model.OriPwd, model.UserId); if (helper.Exists <SystemUsers>(sqlWhere) > 0) { if (oper.Update(keyVal, sqlWhere)) { result.ErrorCode = 1; result.ErrorMsg = "成功"; } else { result.ErrorCode = -2; result.ErrorMsg = "修改失败"; } } else { result.ErrorCode = -1; result.ErrorMsg = "原密码错误"; } return(result); }
public BaseResultDto <RQUserListDto> GetUserList(int userType) { BaseResultDto <RQUserListDto> resultDto = new BaseResultDto <RQUserListDto>(); try { RQProcParam proc = new RQProcParam(); proc.ProcName = "Proc_GetUserList"; proc.DicParam.Add("userType", userType); RQUserListDto userListDto = new RQUserListDto(); userListDto.UserList = helper.GetDataByProc <UserRow>(proc); resultDto.Tag = userListDto; if (userListDto != null && userListDto.UserList.Count > 0) { resultDto.ErrorMsg = "成功"; resultDto.ErrorCode = 1; resultDto.IsSeccess = true; } else { resultDto.ErrorMsg = "失败"; resultDto.ErrorCode = 0; } } catch (Exception ex) { resultDto.ErrorMsg = ex.Message; resultDto.ErrorCode = -1; } return(resultDto); }
public BaseResultDto <PostBaseYeePayPar> AuthenticateIDCard(SystemUsers model) { BaseResultDto <PostBaseYeePayPar> result = null; BaseResultDto <bool> re = oper.AuthenticateIDCard(model); if (re.IsSeccess) { MoneyCarCar.Models.YeePay.RequestModel.ToRegister toRegister = new MoneyCarCar.Models.YeePay.RequestModel.ToRegister(); toRegister.email = model.UserEmail; toRegister.idCardNo = model.IDNumber; toRegister.mobile = model.CellPhone; toRegister.nickName = model.UserName; toRegister.realName = model.RealName; toRegister.platformUserNo = model.ID + ""; toRegister.requestNo = DateTime.Now.Ticks.ToString(); result = yeepay.ToRegister(toRegister); } else { result = new BaseResultDto <PostBaseYeePayPar>(); result.IsSeccess = false; result.ErrorMsg = re.ErrorMsg; } return(result); }
public JsonResult AddUpdateNotice(SystemNotice notice) { JsonResult result = null; try { BaseResultDto <string> resultDto = new BaseResultDto <string>(); //添加或者修改 if (notice.Id > 0) { //修改 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}Notice/Update", this.WebApiUrl), notice); } else { notice.NoticeAddDate = System.DateTime.Now; notice.NoticeRealseAccount = this.UserInfo.UserName; //添加 resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}Notice/Add", this.WebApiUrl), notice); } result = Json(new { status = resultDto.ErrorCode, message = resultDto.ErrorMsg }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
public BaseResultDto <string> DeleteAll(RQIdModel <int> model) { BaseResultDto <string> result = new BaseResultDto <string>(); try { if (model.IdList.Count > 0 && helper.Delete <SystemNotice>(string.Format(" Id in({0}) ", string.Join(",", model.IdList.ToArray())))) { result.ErrorMsg = "成功"; result.ErrorCode = 1; } else { result.ErrorMsg = "失败"; result.ErrorCode = 0; } } catch (Exception ex) { result.ErrorMsg = ex.Message; result.ErrorCode = -1; } return(result); }
public BaseResultDto <int> SaveCalculatedPlayerStatistics(List <CalculatedPlayerStatisticsDto> players) { var result = new BaseResultDto <int>(); result.Status = true; using (var context = _contextFactory.Create()) { context.CalculatedPlayerStatistics.RemoveRange(context.CalculatedPlayerStatistics); context.SaveChanges(); foreach (var player in players) { var dbPlayer = new CalculatedPlayerStatistics { MinutesPlayed = player.MinutesPlayed, Name = player.Name, xPTotal = player.xPTotal, xPPound90 = player.xPPound90, xPPoundMinPlayed = player.xPPoundMinPlayed, xRc = player.xRc, xYc = player.xYc }; context.CalculatedPlayerStatistics.Add(dbPlayer); context.SaveChanges(); } } return(result); }
/// <summary> /// 审核债权 /// </summary> /// <param name="data"></param> /// <returns></returns> public bool AduitApplayClaims(RQAduitApplay data) { BaseResultDto <string> result = new BaseResultDto <string>(); try { RQProcParam proc = new RQProcParam(); proc.ProcName = "Proc_UpdateSystemBorrowerChecked"; proc.DicParam.Add("ApplyID", data.ApplyID); proc.DicParam.Add("ClaimsID", data.ClaimsID); proc.DicParam.Add("ApproverUserName", data.ApproverUserName); proc.DicParam.Add("Succeed", data.Succeed); proc.DicParam.Add("OperatorUserId", data.OperatorUserId); proc.DicParam.Add("OperatorContent", data.OperatorContent); proc.DicParam.Add("IP", data.IP); if (helper.ExecByProc(proc) > 0) { result.ErrorMsg = "成功"; result.ErrorCode = 1; result.IsSeccess = true; } else { result.ErrorMsg = "失败"; result.ErrorCode = 0; } } catch (Exception ex) { result.ErrorMsg = ex.Message; result.ErrorCode = -1; } return(result.IsSeccess); }
public BaseResultDto IsEmailExists(string emailAddress) { BaseResultEntity baseResultEntity = _userService.IsEmailExists(emailAddress); BaseResultDto baseResultDto = _baseResultMapping.Entity2Dto(baseResultEntity); return(baseResultDto); }
/// <summary> /// 會員網頁瀏覽紀錄 /// </summary> /// <param name="sh_trans_inst_cd"></param> /// <returns></returns> public JsonResult MemOnSaleBuyerView(string sh_trans_inst_cd) { string mbr_id = this.accountService.GetUserInfo().MBR_ID; BaseResultDto model = this.memonSaleService.MemOnSaleBuyerView(mbr_id, sh_trans_inst_cd); return(this.Json(model, JsonRequestBehavior.DenyGet)); }
private static async Task SaveStatusStatusAsync(BaseResultDto <SkynetTerminalCmdEnum> item) { var _mediator = _services.GetService <IMediator>(); using (var query = _services.GetService <IDeviceQueries>()) { if (await query.Exists(item.UniqueId)) { if (item is DeviceAlarmResultDto) { await _mediator.Send(_mapper.Map <FreshAlarmStatusCommand>(item)); } else if (item is ChannelStatusResultDto) { await _mediator.Send(_mapper.Map <FreshSwitchStatusCommand>(item)); } } else { await AddDevice(new CreateDeviceCommand { EquipNum = item.UniqueId, DeviceName = "智维终端" + item.UniqueId, DeviceIP = item.FromIP, DevicePort = item.FromPort, DeviceTypeCode = nameof(Terminal), ModelCode = $"{Convert.ToChar(item.Data[4])}.{Convert.ToChar(item.Data[5])}", Enabled = true, Description = "系统自动分配,请分配区域和归属" }); } } }
public BaseResultDto AddUserInformation(RegisteredUserDto registeredUserDto) { RegisteredUserEntity registeredUserEntity = _userMapping.RegisteredUserDto2RegisteredUserEntity(registeredUserDto); BaseResultEntity baseResultEntity = _userService.AddUserInformation(registeredUserEntity); BaseResultDto baseResultDto = _baseResultMapping.Entity2Dto(baseResultEntity); return(baseResultDto); }
public JsonResult PostGiveVirtualMoney(FormCollection form) { JsonResult result = null; try { GiveVirtualMoneyDto model = new GiveVirtualMoneyDto(); if (form["isAllUser"] != null && form["isAllUser"].ToString() != "") { int isAllUser = int.Parse(form["isAllUser"].ToString()); model.IsAllUser = isAllUser; } if (form["ids"] != null && form["ids"].ToString() != "") { string ids = form["ids"].ToString(); model.Ids = ids; } if (form["money"] != null && form["money"].ToString() != "" && int.Parse(form["money"].ToString()) > 0) { int money = int.Parse(form["money"].ToString()); model.GiveMoney = money; } string strMessage = string.Empty; int status = 0; if (model.IsAllUser == 0) { string[] strArr = model.Ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); if (strArr.Length == 0) { strMessage = "请选择投资用户"; } } if (model.GiveMoney <= 0) { strMessage = "请输入有效的金额"; } if (string.IsNullOrEmpty(strMessage)) { model.OverTime = DateTime.Now.AddMonths(3); model.OperatorUserId = this.UserInfo.ID; model.OperatorUserName = this.UserInfo.RealName; model.BountyRes = 3; model.BountyType = 1; model.IP = this.RequestIP; BaseResultDto <string> resultDto = HttpHelper.CreatHelper().DoPostObject <BaseResultDto <string> >(string.Format("{0}User/GiveVirtualMoney", this.WebApiUrl), model, this.WebApiTimeOut); status = resultDto.ErrorCode; strMessage = resultDto.ErrorMsg; } result = Json(new { status = status, message = strMessage }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }
public BaseResultDto Entity2Dto(BaseResultEntity baseResultEntity) { BaseResultDto baseResultDto = new BaseResultDto() { IsSuccess = baseResultEntity.IsSuccess, Message = baseResultEntity.Message }; return(baseResultDto); }
public BaseResultDto <string> AddSalesman(RQSalesmanDto model) { BaseResultDto <string> resultDto = new BaseResultDto <string>(); if (!helper.IsExists <SystemUsers>(string.Format(" UserName ='******' and UserType ={1} ", model.UserName, model.UserType))) { if (!helper.IsExists <SystemUsers>(string.Format(" CellPhone ='{0}' and UserType ={1} ", model.Mobile, model.UserType))) { if (!helper.IsExists <SystemUsers>(string.Format(" IDNumber ='{0}' and UserType ={1} ", model.IDNumber, model.UserType))) { SystemUsers systemUsers = new SystemUsers(); systemUsers.UserName = model.UserName; systemUsers.UserPassword = model.UserName; systemUsers.CellPhone = model.Mobile; systemUsers.RealName = model.RealName; systemUsers.IDNumber = model.IDNumber; systemUsers.UserEmail = model.Email; systemUsers.UserAddress = model.Address; systemUsers.UserType = int.Parse(model.UserType); systemUsers.RegTime = model.RegTime; systemUsers.CellPahoneIsAuthenticate = true; systemUsers.IDNumberIsAuthenticate = true; int Id = helper.Add <SystemUsers>(systemUsers); resultDto.ErrorCode = Id; if (Id > 0) { resultDto.ErrorMsg = "注册成功"; } else { resultDto.ErrorCode = -1; resultDto.ErrorMsg = "注册失败"; } } else { resultDto.ErrorCode = -2; resultDto.ErrorMsg = string.Format("身份证{0}已注册", model.IDNumber); } } else { resultDto.ErrorCode = -3; resultDto.ErrorMsg = string.Format("手机号{0}已注册", model.Mobile); } } else { resultDto.ErrorCode = -4; resultDto.ErrorMsg = string.Format("用户名{0}已注册", model.UserName); } return(resultDto); }
/// <summary> /// 加载数据 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ActionResult AddNews(int Id) { SystemNews model = new SystemNews(); if (Id > 0) { BaseResultDto <SystemNews> resultDto = HttpHelper.CreatHelper().DoGetObject <BaseResultDto <SystemNews> >(string.Format("{0}News/GetNews?Id={1}", this.WebApiUrl, Id)); model = resultDto.Tag; } return(View(model)); }
/// <summary> /// 详细页面 /// </summary> /// <param name="ID"></param> /// <returns></returns> public ActionResult ShowPageClaimsDetails(int ID) { ClaimsDetailsDto claimsDetailsDto = new ClaimsDetailsDto(); if (ID > 0) { BaseResultDto <ClaimsDetailsDto> baseResultDto = HttpHelper.CreatHelper().DoGetObject <BaseResultDto <ClaimsDetailsDto> >(string.Format("{0}Claims/GetSystemClaimsDetails?ClaimsId={1}", this.WebApiUrl, ID)); claimsDetailsDto = baseResultDto.Tag; } return(View(claimsDetailsDto)); }
/// <summary> /// /// </summary> /// <param name="value"></param> /// <param name="services"></param> public void Execute(BaseResultDto <SkynetTerminalCmdEnum> value, IServiceProvider services) { if (_services == null) { _services = services; } if (_mapper == null) { _mapper = _services.GetService <IMapper>(); } statusWorker.Post(value); }
public BaseResultDto <PostBaseYeePayPar> AddSystemClaimsDetails(RQSubmitOrder model) { BaseResultDto <PostBaseYeePayPar> result = new BaseResultDto <PostBaseYeePayPar>(); SystemClaims claims = claimsOper.GetModel("ID = " + model.InvestorsID); SystemUsers user = userOper.GetUserInfo(model.UserID); int days = (int)(claims.EarningsStartTime.ToDateTime().AddMonths(claims.LoanPeriod) - claims.EarningsStartTime.ToDateTime()).TotalDays; string errorMsg = ""; int targetUserID = 0; decimal dayEarnings = (claims.SingleAmount * model.BuyCount * claims.APR / 100 / 365).ToMoney(2).ToDecimal(); decimal virtualMoney = userOper.GetUserVirtualMoney(model.UserID).Tag; decimal virtualMoneyDayEarnings = (virtualMoney * claims.APR / 100 / 365).ToMoney(2).ToDecimal(); int detailID = detail.SystemClaimsDetails_Add(user.ID, claims.ID, model.BuyCount, dayEarnings, dayEarnings * days, model.IsUserBounty, virtualMoney, virtualMoneyDayEarnings, out errorMsg, out targetUserID); result.IsSeccess = detailID > 0; if (!result.IsSeccess) { result.ErrorMsg = errorMsg; } else { MoneyCarCar.Models.YeePay.RequestModel.ToCpTransaction_TENDER toCpTransaction = new MoneyCarCar.Models.YeePay.RequestModel.ToCpTransaction_TENDER(); toCpTransaction.platformUserNo = user.ID + ""; toCpTransaction.requestNo = detailID + "";; //(2)投标[TENDER] toCpTransaction.tenderOrderNo = claims.ID + ""; toCpTransaction.tenderName = claims.Title; toCpTransaction.tenderAmount = claims.LoanAmount.ToMoney(2); toCpTransaction.tenderDescription = claims.Title; toCpTransaction.borrowerPlatformUserNo = claims.BorrowerID + ""; List <ToCpTransactionDetail> details = new List <ToCpTransactionDetail>(); ToCpTransactionDetail paydetail = new ToCpTransactionDetail(); paydetail.amount = (claims.SingleAmount * model.BuyCount).ToMoney(2); paydetail.targetPlatformUserNo = claims.BorrowerID + ""; //paydetail.targetUserType = EnumUserType.MERCHANT.ToEnumDesc(); // 用户类型 paydetail.bizType = EnumBizType.TENDER.ToString();//转账 details.Add(paydetail); toCpTransaction.details = details; return(yeePay.ToCpTransaction_TENDER(toCpTransaction)); } return(result); }
/// <summary> /// 首页显示的统计数据 /// </summary> /// <returns></returns> public JsonResult ShowStatistiIndex() { JsonResult result = null; try { BaseResultDto <StatisticalDto> resultDto = HttpHelper.CreatHelper().DoGetObject <BaseResultDto <StatisticalDto> >(string.Format("{0}SysSetting/GetStatistical", this.WebApiUrl)); result = Json(new { data = resultDto.Tag }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { result = Json(new { status = -1, message = ex.Message }, JsonRequestBehavior.AllowGet); } return(result); }