예제 #1
0
        /// <summary>
        /// 提现记录
        /// </summary>
        /// <returns></returns>
        public ActionResult UserDrawList()
        {
            try
            {
                NameValueCollection parmas = WorkContext.postparms;
                if (parmas.Keys.Count != 3)
                {
                    return(APIResult("error", "缺少请求参数"));
                }
                int pageindex = int.Parse(parmas["page"]);

                List <DrawInfoModel> userdraw = Recharge.GetDrawList(pageindex, 15, " where rtrim(b.mobile)='" + parmas["account"] + "'");
                if (userdraw.Count == 0)
                {
                    return(APIResult("error", "暂无提现记录"));
                }
                else
                {
                    userdraw.ForEach((x) =>
                    {
                        x.State = x.State.Replace("审核完成", "成功").Replace("审核失败", "提现失败");
                    });

                    JsonSerializerSettings jsetting = new JsonSerializerSettings();
                    jsetting.ContractResolver = new JsonLimitOutPut(new string[] { "Addtime", "Money", "State" }, true);
                    jsetting.DateFormatString = "yyyy-MM-dd HH:mm:ss";
                    string data = JsonConvert.SerializeObject(userdraw, jsetting).ToLower();
                    return(APIResult("success", data, true));
                }
            }
            catch (Exception ex)
            {
                return(APIResult("error", "获取失败"));
            }
        }
예제 #2
0
        public ActionResult DrawList()
        {
            List <DrawInfoModel> list = Recharge.GetDrawList(1, 50, " where a.uid=" + WorkContext.Uid.ToString());
            DrawListModel        draw = new DrawListModel {
                PageModel = new PageModel(50, 1, list.Count > 0 ? list[0].TotalCount : 0),
                DrawList  = list
            };

            return(View(draw));
        }
예제 #3
0
        /// <summary>
        /// 获取提现或充值提示
        /// </summary>
        /// <returns></returns>
        public ActionResult GetTS()
        {
            List <OWZX.Model.DrawInfoModel> drawlist = Recharge.GetDrawList(1, -1, " where a.state in (0,1)");
            List <OWZX.Model.MD_Remit>      remitlist = NewUser.GetUserRemitList(1, -1, " where a.status in (0,1)");
            int draw = 0; int remit = 0;

            if (drawlist != null && drawlist.Count > 0)
            {
                draw = drawlist.Count;
            }
            if (remitlist != null && remitlist.Count > 0)
            {
                remit = remitlist.Count;
            }
            return(Content(draw.ToString() + "_" + remit.ToString()));
        }
예제 #4
0
        /// <summary>
        /// 完成提现转账
        /// </summary>
        public ActionResult EditDraw(int drawId, string exception, string type)
        {
            List <DrawInfoModel> listdraw = Recharge.GetDrawList(1, 15, " where drawid=" + drawId);
            DrawInfoModel        draw     = new DrawInfoModel();

            if (listdraw.Count > 0)
            {
                draw = listdraw[0];
            }
            else
            {
                return(AjaxResult("error", "提现信息不存在"));
            }

            if (type == "2")
            {
                //完成
                draw.Updateuser = WorkContext.UserName;
                if (exception == "")
                {
                    draw.State = "2";
                }
                else
                {
                    draw.State = "3";
                }
                draw.Exception = exception;
            }
            else if (type == "1")
            {
                //审核中
                draw.Exception  = "";
                draw.Updateuser = WorkContext.UserName;
                draw.State      = "1";
            }
            bool result = Recharge.UpdateDraw(draw);

            if (result)
            {
                return(AjaxResult("success", "处理成功"));
            }
            else
            {
                return(AjaxResult("error", "处理失败"));
            }
        }
예제 #5
0
        /// <summary>
        /// 删除提现
        /// </summary>
        public ActionResult DelDraw(int[] drawId)
        {
            List <DrawInfoModel> list = Recharge.GetDrawList(1, 15, " where drawid in (" + CommonHelper.IntArrayToString(drawId) + ")");

            if (list.Count > 0)
            {
                bool result = Recharge.DeleteDraw(CommonHelper.IntArrayToString(drawId));
                if (result)
                {
                    return(PromptView("删除成功"));
                }
                else
                {
                    return(PromptView("删除失败"));
                }
            }
            return(PromptView("提现信息不存在"));
        }
예제 #6
0
        /// <summary>
        /// 提现列表
        /// </summary>
        public ActionResult DrawList(string username = "", string mobile = "", string alipayaccount = "", string status = "-1", int pageSize = 15, int pageNumber = 1)
        {
            StringBuilder strb = new StringBuilder();

            strb.Append(" where 1=1 ");
            if (username != "")
            {
                strb.Append(" and a.username like '%" + username + "%' ");
            }
            if (mobile != "")
            {
                strb.Append(" and a.mobile like '" + mobile + "%' ");
            }
            if (alipayaccount != "")
            {
                strb.Append(" and a.alipay like '" + alipayaccount + "%' ");
            }
            if (status != "-1" && status != "")
            {
                strb.Append(" and a.state =" + status);
            }

            strb.Append(" order by a.[addtime] desc");

            List <DrawInfoModel> drawlist = Recharge.GetDrawList(pageNumber, pageSize, strb.ToString());
            DrawListModel        model    = new DrawListModel()
            {
                DrawList      = drawlist,
                PageModel     = new PageModel(pageSize, pageNumber, drawlist.Count > 0 ? drawlist[0].TotalCount : 0),
                Status        = int.Parse(status),
                UserName      = username,
                Mobile        = mobile,
                AlipayAccount = alipayaccount
            };

            ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&UserName={3}&Mobile={4}&Status={5}&AlipayAccount={6}",
                                                          Url.Action("DrawList"), pageNumber, pageSize,
                                                          username, mobile, status, alipayaccount));
            return(View(model));
        }
예제 #7
0
        public ActionResult Draw()
        {
            ViewData["money"] = Users.GetPartUserById(WorkContext.Uid).TotalMoney;
            List <DrawInfoModel> list = Recharge.GetDrawList(1, -1, " where a.uid=" + WorkContext.Uid.ToString() + " and CONVERT(varchar(10),a.addtime,120)=CONVERT(varchar(10),getdate(),120)");
            int count = 3;

            if (list == null || list.Count == 0)
            {
                count = 3;
            }
            else if (list.Count >= 3)
            {
                count = 0;
            }
            else
            {
                count = 3 - list.Count;
            }
            ViewData["drawcount"] = count;
            ViewData["setdraw"]   = Recharge.ValidateDrawPwdByUid(WorkContext.Uid).ToString().ToLower();
            return(View());
        }