//投资理财 public ActionResult BuyStock() { StockParamter param = GetRequestParamter <StockParamter>(); ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member); if (isret) { return(ar); } if (!MD5Helper.PwdEncryption(param.pwd).Equals(member.mbTwoPwd)) { return(RetJsonResult(ApiResponseCodeEnum.Fail, "二级密码不正确")); } tUserStockRightBuyRecordEntity entity = new tUserStockRightBuyRecordEntity() { mbId = param.user.Id, shares = Convert.ToInt64(param.shares * 10000), ip = IPAddressHelper.GetClientIPAddress, client = param.clientType }; if (tUserStockRightBuyRecordBLL.Instance.BuyStock(entity, out string ret)) { return(RetJsonResult(ApiResponseCodeEnum.Success, "购买成功")); } return(RetJsonResult(ApiResponseCodeEnum.Success, ret.IsEmpty() ? "购买失败" : ret)); }
/// <summary> /// 保存 /// </summary> /// <param name="entity"></param> /// <param name="keyValue"></param> public bool SubmitForm(tUserStockRightBuyRecordEntity entity, int keyValue) { if (keyValue > 0) { return(this.BaseRepository().Update(entity) > 0); } else { return(this.BaseRepository().Insert(entity) > 0); } }
//购买基金 public bool BuyStock(tUserStockRightBuyRecordEntity entity, out string ret) { ret = this.BaseRepository().ExecuteByProc <string>("proc_BuyStockRight", new { @ret = "", entity.mbId, entity.shares, entity.ip, entity.client }); return(ret.IsEmpty()); }
//购买 public bool BuyStock(tUserStockRightBuyRecordEntity entity, out string ret) { return(dal.BuyStock(entity, out ret)); }
/// <summary> /// 保存 /// </summary> /// <param name="entity"></param> /// <param name="keyValue"></param> public bool SubmitForm(tUserStockRightBuyRecordEntity entity, int keyValue) { return(dal.SubmitForm(entity, keyValue)); }