//投资理财 public ActionResult Invest() { InvestParamter param = GetRequestParamter <InvestParamter>(); bool isret; tMembersEntity member; ActionResult ar = AnalysisToken(param, out isret, out member); if (isret) { return(ar); } if (!MD5Helper.PwdEncryption(param.pwd).Equals(member.mbTwoPwd)) { return(RetJsonResult(ApiResponseCodeEnum.Fail, "二级密码不正确")); } tUserInvestRecordEntity entity = new tUserInvestRecordEntity() { mbId = param.user.Id, investAmount = param.amount * 10000, investIp = IPAddressHelper.GetClientIPAddress, investClient = param.clientType }; string ret; if (tUserInvestRecordBLL.Instance.Invest(entity, out ret)) { return(RetJsonResult(ApiResponseCodeEnum.Success, "投资成功")); } return(RetJsonResult(ApiResponseCodeEnum.Success, ret.IsEmpty() ? "投资失败" : ret)); }
//结算 public bool Settle(tUserInvestRecordEntity entity, string settledate, out string ret) { ret = this.BaseRepository().ExecuteByProc <string>("proc_SettleInvestRecord", new { @ret = "", @settledate = settledate, @investrecordId = entity.recordId }); return(ret.IsEmpty()); }
/// <summary> /// 保存 /// </summary> /// <param name="entity"></param> /// <param name="keyValue"></param> public bool SubmitForm(tUserInvestRecordEntity entity, int keyValue) { if (keyValue > 0) { return(this.BaseRepository().Update(entity) > 0); } else { return(this.BaseRepository().Insert(entity) > 0); } }
//投资 public bool Invest(tUserInvestRecordEntity entity, out string ret) { ret = this.BaseRepository().ExecuteByProc <string>("proc_Invest", new { @ret = "", @mbId = entity.mbId, @amount = entity.investAmount, @ip = entity.investIp, @client = entity.investClient }); return(ret.IsEmpty()); }
//结算 public bool Settle(tUserInvestRecordEntity entity, string settledate, out string ret) { return(dal.Settle(entity, settledate, out ret)); }
//投资 public bool Invest(tUserInvestRecordEntity entity, out string ret) { return(dal.Invest(entity, out ret)); }
/// <summary> /// 保存 /// </summary> /// <param name="entity"></param> /// <param name="keyValue"></param> public bool SubmitForm(tUserInvestRecordEntity entity, int keyValue) { return(dal.SubmitForm(entity, keyValue)); }