コード例 #1
0
ファイル: specialController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 流量走势报表统计界面
        /// </summary>
        /// <returns></returns>
        public ActionResult Trends()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            string ksrq = DateTime.Now.ToString("yyyy-MM-01"); //获取本月第一天
            ViewBag.ksrq = ksrq;
            string stime = "";                                 //开始时间;
            if (DateTime.Now.ToString("yyyyMM") == DateTime.Now.AddDays(-7).ToString("yyyyMM"))
            {
                stime = string.IsNullOrEmpty(Request["stime"]) ? DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd") : Request["stime"];//开始时间
            }
            else
            {
                stime = string.IsNullOrEmpty(Request["stime"]) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : Request["stime"];//开始时间
            }
            ViewBag.stime = stime;
            string etime = string.IsNullOrEmpty(Request["etime"]) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : Request["etime"];//结束时间
            ViewBag.etime = etime;
            return(View());
        }
コード例 #2
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        public ActionResult down()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            int             appid  = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);
            JMP.BLL.jmp_app bll    = new JMP.BLL.jmp_app();
            JMP.MDL.jmp_app modapp = new JMP.MDL.jmp_app();
            if (appid > 0)
            {
                modapp = bll.SelectAppId(appid);
            }
            string payfs = SelectPay(modapp.a_paymode_id);

            string[] pay = payfs.Split(',');
            ViewBag.pay    = pay;
            ViewBag.modapp = modapp;
            return(View());
        }
コード例 #3
0
ファイル: AppController.cs プロジェクト: sunman001/dxpay
        /// <summary>
        /// 添加应用
        /// </summary>
        /// <returns></returns>

        public ActionResult AppAdd()
        {
            #region =========获取应用平台在用信息=========
            JMP.BLL.jmp_platform        bll  = new JMP.BLL.jmp_platform();
            DataTable                   dt   = bll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息
            List <JMP.MDL.jmp_platform> yypt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_platform>(dt);
            ViewBag.glptdt = yypt;
            #endregion
            #region ========获取应用类型在用信息======
            JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype();
            string where = "  t_id in (select  DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0'   )) and t_state='1' order by t_sort desc";
            DataTable yydt = yybll.GetList(where).Tables[0];//获取应用类型在用信息
            List <JMP.MDL.jmp_apptype> yylist = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_apptype>(yydt);
            ViewBag.yylist = yylist;
            #endregion
            int userid               = UserInfo.UserId;
            var userlist             = _UserService.FindListBySql("relation_type=2 and relation_person_id='" + userid + "' and u_state=1", "");
            JMP.BLL.jmp_user userbll = new JMP.BLL.jmp_user();
            ViewBag.userlist = userlist;
            int appid = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);

            #region 获取所有支付方式

            JMP.BLL.jmp_paymode        zfbll  = new JMP.BLL.jmp_paymode();
            DataTable                  zfdt   = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion

            return(View());
        }
コード例 #4
0
        public JsonResult MsgCount()
        {
            JMP.BLL.jmp_user bll = new JMP.BLL.jmp_user();
            int userid           = UserInfo.UserId;
            int msgCount         = bll.GetUserMsgCount(userid);

            return(Json(new { success = msgCount > 0 ? 1 : 0, mess = msgCount }));
        }
コード例 #5
0
        public ActionResult UserList()
        {
            List <JMP.MDL.jmp_user> list = new List <JMP.MDL.jmp_user>();

            JMP.BLL.jmp_user bll = new JMP.BLL.jmp_user();
            #region 初始化
            //获取请求参数
            int    pageCount  = 0;
            int    pageIndexs = string.IsNullOrEmpty(Request["curr"]) ? 1 : Int32.Parse(Request["curr"]);     //当前页
            int    PageSize   = string.IsNullOrEmpty(Request["psize"]) ? 20 : Int32.Parse(Request["psize"]);  //每页显示数量
            string type       = string.IsNullOrEmpty(Request["stype"]) ? "0" : Request["stype"];              //查询条件类型
            string sea_name   = string.IsNullOrEmpty(Request["skeys"]) ? "" : Request["skeys"];               //查询条件值
            string category   = string.IsNullOrEmpty(Request["scategory"]) ? "" : Request["scategory"];       //认证类型
            int    px         = string.IsNullOrEmpty(Request["s_sort"]) ? 0 : Int32.Parse(Request["s_sort"]); //排序
            //获取用户列表
            string where = " where 1=1 and u_auditstate='1' and u_state='1' ";
            if (!string.IsNullOrEmpty(type.ToString()))
            {
                if (!string.IsNullOrEmpty(sea_name))
                {
                    if (type == "0")
                    {
                        where += string.Format(" and u_email like '%{0}%'", sea_name);
                    }
                    else if (type == "1")
                    {
                        where += string.Format(" and u_phone like '%{0}%'", sea_name);
                    }
                    else if (type == "3")
                    {
                        where += string.Format(" and u_idnumber like '%{0}%'", sea_name);
                    }
                    else if (type == "6")
                    {
                        where += string.Format(" and u_blicensenumber like '%{0}%'", sea_name);
                    }
                }
            }
            if (!string.IsNullOrEmpty(category))
            {
                where += string.Format(" and u_category={0}", category);
            }
            string Order = " order by u_id " + (px == 0 ? "" : " desc ") + " ";
            string query = "select * from jmp_user" + where;
            list = bll.GetLists(query, Order, pageIndexs, PageSize, out pageCount);
            //返回
            ViewBag.CurrPage  = pageIndexs;
            ViewBag.PageSize  = PageSize;
            ViewBag.PageCount = pageCount;
            ViewBag.stype     = type;
            ViewBag.skeys     = sea_name;
            ViewBag.scategory = category;
            ViewBag.s_sort    = px;
            ViewBag.list      = list;
            #endregion
            return(View());
        }
コード例 #6
0
      /// <summary>
      /// 修改开发者
      /// </summary>
      /// <returns></returns>
      public ActionResult AppUserEdit()
      {
          int userId = !string.IsNullOrEmpty(Request["uid"]) ? int.Parse(Request["uid"]) : 0;

          JMP.BLL.jmp_user bll = new JMP.BLL.jmp_user();
          var model            = _UserService.FindById(userId);

          ViewBag.UserData  = model;
          ViewBag.UploadUrl = ConfigurationManager.AppSettings["imgurl"];
          return(View());
      }
コード例 #7
0
      public JsonResult DoAll(string uids, int tag)
      {
          JMP.BLL.jmp_user userBll = new JMP.BLL.jmp_user();
          bool             flag    = userBll.UpdateState(uids, tag);

          //写日志
          if (flag)
          {
              string info = "批量更新开发者(" + uids + ")的状态为" + (tag == 1 ? "正常。" : "冻结。");
              Logger.OperateLog("批量更新开发者状态", info);
          }
          return(Json(new { success = flag ? 1 : 0, msg = flag ? "更新成功!" : "更新失败!" }));
      }
コード例 #8
0
      public JsonResult AddUser(JMP.MDL.jmp_user jmpuser)
      {
          object obj = new { success = 0, msg = "添加失败!" };

          JMP.BLL.jmp_user userBll = new JMP.BLL.jmp_user();
          jmpuser.u_password         = DESEncrypt.Encrypt(jmpuser.u_password);
          jmpuser.relation_person_id = UserInfo.UserId;
          jmpuser.relation_type      = (int)Relationtype.Bp;
          jmpuser.u_state            = 1;
          int RoleID = int.Parse(ConfigurationManager.AppSettings["UserRoleId"]);

          jmpuser.ServiceFeeRatioGradeId = _CoAgentService.FindMax(" select top 1 Id  from  CoServiceFeeRatioGrade where  ServiceFeeRatio in(select  max(ServiceFeeRatio) from CoServiceFeeRatioGrade ) ");
          jmpuser.u_role_id = RoleID;
          jmpuser.u_photof  = string.IsNullOrEmpty(jmpuser.u_photof) ? "" : jmpuser.u_photof;
          jmpuser.u_licence = string.IsNullOrEmpty(jmpuser.u_licence) ? "" : jmpuser.u_licence;
          try
          {
              if (jmpuser.u_category == 0)
              {
                  jmpuser.u_photo = string.IsNullOrEmpty(jmpuser.u_photo) ? "" : jmpuser.u_photo;
              }
              else
              {
                  jmpuser.u_blicense = string.IsNullOrEmpty(jmpuser.u_blicense) ? "" : jmpuser.u_blicense;
                  jmpuser.u_photo    = string.IsNullOrEmpty(jmpuser.u_photo) ? " " : jmpuser.u_photo;
              }

              jmpuser.u_qq      = string.IsNullOrEmpty(jmpuser.u_qq) ? "" : jmpuser.u_qq;
              jmpuser.u_address = string.IsNullOrEmpty(jmpuser.u_address) ? " " : jmpuser.u_address;
              jmpuser.u_time    = DateTime.Now;
              bool flag = false;
              if (!userBll.ExistsEmail(jmpuser.u_email))
              {
                  flag = _UserService.Insert(jmpuser) > 0;
              }
              obj = new { success = flag ? 1 : 0, msg = flag ? "添加成功!" : "添加失败!" };
              //写日志
              if (flag)
              {
                  Logger.CreateLog("添加开发者", jmpuser);
              }
          }
          catch (Exception ex)
          {
              obj = new { success = 0, msg = "添加异常!" };

              Logger.OperateLog("添加开发者报错", ex.ToString());
          }
          return(Json(obj));
      }
コード例 #9
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 添加应用基本
        /// </summary>
        /// <returns></returns>
        public ActionResult AppAdd()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            #region =========获取应用平台在用信息=========
            JMP.BLL.jmp_platform        bll  = new JMP.BLL.jmp_platform();
            DataTable                   dt   = bll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息
            List <JMP.MDL.jmp_platform> yypt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_platform>(dt);
            ViewBag.glptdt = yypt;
            #endregion

            #region ========获取应用类型在用信息======
            JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype();
            string where = "  t_id in (select  DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0'   )) and t_state='1' order by t_sort desc";
            DataTable yydt = yybll.GetList(where).Tables[0];//获取应用类型在用信息
            List <JMP.MDL.jmp_apptype> yylist = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_apptype>(yydt);
            ViewBag.yylist = yylist;
            #endregion

            int appid = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);

            #region 获取所有支付方式

            JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode();

            DataTable zfdt = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion


            return(View());
        }
コード例 #10
0
        public ActionResult Index()
        {
            //每日应用汇总
            JMP.BLL.jmp_appcount bll      = new JMP.BLL.jmp_appcount();
            JMP.MDL.jmp_appcount model    = new JMP.MDL.jmp_appcount();
            JMP.MDL.jmp_user     sm_model = new JMP.MDL.jmp_user();
            //开发者每日结算详情
            JMP.BLL.CoSettlementDeveloperAppDetails cobll                   = new JMP.BLL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_yesterday       = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_month           = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_preceding_month = new JMP.MDL.CoSettlementDeveloperAppDetails();

            int u_id = UserInfo.UserId;

            JMP.BLL.jmp_user sm_bll = new JMP.BLL.jmp_user();
            sm_model            = sm_bll.GetModel(u_id);
            ViewBag.FrozenMoney = sm_model.FrozenMoney.ToString("f0");
            //今天
            string u_time = DateTime.Now.ToString("yyyy-MM-dd");
            //昨天
            string u_time_yesterday = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
            //本月
            string u_time_month = DateTime.Now.ToString("yyyy-MM");
            //上月
            string u_time_preceding_month = DateTime.Now.AddMonths(-1).ToString("yyyy-MM");

            //根据日期查询交易金额和笔数(今天)
            model = bll.DataAppcountAdy(u_time, u_id, 0);


            //根据不同日期统计查询(昨天)
            comodel_yesterday = cobll.GetModelKFZ_total(u_id, u_time_yesterday, 0);
            //根据不同日期统计查询(本月)
            comodel_month = cobll.GetModelKFZ_total(u_id, u_time_month, 1);
            //根据不同日期统计查询(上月)
            comodel_preceding_month = cobll.GetModelKFZ_total(u_id, u_time_preceding_month, 1);

            //流水及收入金额
            ViewBag.comodel_yesterday       = comodel_yesterday;
            ViewBag.comodel_month           = comodel_month;
            ViewBag.comodel_preceding_month = comodel_preceding_month;

            ViewBag.AppCount = model;
            return(View());
        }
コード例 #11
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 应用列表
        /// </summary>
        /// <returns></returns>
        public ActionResult AppList()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            int pageCount  = 0;
            int pageIndexs = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]); //当前页
            int PageSize   = string.IsNullOrEmpty(Request["PageSize"]) ? 20 : Int32.Parse(Request["PageSize"]);    //每页显示数量

            string searchname = string.IsNullOrEmpty(Request["searchname"]) ? "" : Request["searchname"];          //应用名称
            ViewBag.searchname = searchname;
            int terrace = string.IsNullOrEmpty(Request["terrace"]) ? 0 : int.Parse(Request["terrace"]);            //运行平台
            ViewBag.terrace = terrace;

            List <JMP.MDL.jmp_app> list = new List <JMP.MDL.jmp_app>();
            JMP.BLL.jmp_app        bll  = new JMP.BLL.jmp_app();
            list = bll.SelectUserList(UserInfo.UserId.ToString(), searchname, terrace, pageIndexs, PageSize, out pageCount);
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.list       = list;

            #region =========获取应用平台在用信息=========
            JMP.BLL.jmp_platform        paybll = new JMP.BLL.jmp_platform();
            DataTable                   dt     = paybll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息
            List <JMP.MDL.jmp_platform> yypt   = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_platform>(dt);
            ViewBag.glptdt = yypt;
            #endregion

            return(View());
        }
コード例 #12
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 收银台预览
        /// </summary>
        /// <returns></returns>
        public ActionResult PayBank()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            return(View());
        }
コード例 #13
0
        public JsonResult ScAdd()
        {
            object retJson = new { success = 0, msg = "操作失败" };

            JMP.BLL.jmp_user bllUser   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user modelUser = new JMP.MDL.jmp_user();
            int ServiceFeeRatioGradeId = string.IsNullOrEmpty(Request["ServiceFeeRatioGradeId"]) ? 0 : int.Parse(Request["ServiceFeeRatioGradeId"]);
            int id = string.IsNullOrEmpty(Request["id"]) ? 0 : int.Parse(Request["id"]);

            //修改前的数据
            modelUser = bllUser.GetModel(id);
            if (bllUser.UpdateServiceFeeRatioGradeId(id, ServiceFeeRatioGradeId))
            {
                Logger.OperateLog("商务设置直客开发者费率", "商务ID:" + modelUser.relation_person_id + ",操作数据(jmp_user)ID:" + id + ",费率等级由:" + modelUser.ServiceFeeRatioGradeId + ",改为:" + ServiceFeeRatioGradeId + "。");
                retJson = new { success = 1, msg = "设置成功!" };
            }
            else
            {
                retJson = new { success = 0, msg = "设置失败!" };
            }

            return(Json(retJson));
        }
コード例 #14
0
        public JsonResult UserLogin(string u_name, string u_pwd, string code)
        {
            object result = new { msg = "操作失败!", status = "0" };

            JMP.BLL.jmp_limit bll_limit = new JMP.BLL.jmp_limit();
            JMP.BLL.jmp_user  bll       = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user  model     = new JMP.MDL.jmp_user();

            var isDebug = ConfigurationManager.AppSettings["IsDebug"];

            if (!string.IsNullOrEmpty(isDebug) && isDebug == "true")
            {
                string yzcode = Session["ValidateCode"].ToString();
                if (yzcode != code)
                {
                    result = new { msg = "验证码错误!", success = "2" };
                    return(Json(result));
                }
            }

            model = bll.GetModel(u_name);

            //加密用户登录密码
            string jm_pwd = DESEncrypt.Encrypt(u_pwd);

            if (model != null && model.u_state == 1)
            {
                if ((model.u_email == u_name || model.u_phone == u_name) && model.u_password == jm_pwd)
                {
                    UserInfo.UserId     = model.u_id;
                    UserInfo.UserName   = model.u_realname;
                    UserInfo.UserNo     = model.u_email;
                    UserInfo.UserRoleId = model.u_role_id;
                    UserInfo.auditstate = model.u_auditstate.ToString();
                    DataTable dtLimit = bll_limit.GetAppUserLimitSession(model.u_id, model.u_role_id);
                    if (dtLimit.Rows.Count > 0)
                    {
                        Session["dtSession"] = dtLimit;
                        model.u_count       += 1;

                        string log = string.Format("开发者{0}于{1}登录聚米支付平台。", UserInfo.UserNo, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                        AddLocLog.AddUserLog(UserInfo.UserId, 2, RequestHelper.GetClientIp(), "用户" + UserInfo.UserName + "登录。", log);
                        result = new { msg = "登录成功!", success = "1" };
                        return(Json(result));
                    }
                    else
                    {
                        result = new { msg = "权限不足!", success = "2" };
                    }
                }
                else
                {
                    result = new { msg = "用户名或密码错误!", success = "2" };
                }
            }
            else
            {
                if (model == null)
                {
                    result = new { msg = "用户名或密码错误!", success = "2" };
                }
                else if (model.u_state != 1)
                {
                    result = new { msg = "该账号已冻结!", success = "2" };
                }
            }
            return(Json(result));
        }
コード例 #15
0
        public JsonResult paysAdd()
        {
            object result = new { success = 0, msg = "操作失败!" };

            JMP.BLL.jmp_user   userbll   = new JMP.BLL.jmp_user();
            JMP.BLL.jmp_system systembll = new JMP.BLL.jmp_system();

            //可提现金额
            decimal ketiMoney = Convert.ToDecimal(Request["ketiMoney"] ?? "0");
            //提现金额
            decimal payMoney = Convert.ToDecimal(Request["payMoney"] ?? "0");
            //提现银行卡信息
            string b_bankid = string.IsNullOrEmpty(Request["b_bankid"]) ? "" : Request["b_bankid"];
            //提现选中账单ID
            string payid = string.IsNullOrEmpty(Request["payid"]) ? "0" : Request["payid"];
            //支付密码
            string PayPwd = string.IsNullOrEmpty(Request["PayPwd"]) ? "" : Request["PayPwd"];
            //提现类型(1:单卡提现,2:多卡提现)
            int WithdrawalsType = string.IsNullOrEmpty(Request["WithdrawalsType"]) ? 0 : int.Parse(Request["WithdrawalsType"]);

            //查询开发者信息
            JMP.MDL.jmp_user j_user = userbll.GetModel(UserInfo.UserId);
            //查询超级密码
            JMP.MDL.jmp_system j_sys = systembll.GetModel_name("password");
            //提现最小金额
            string WithdrawalsMinimum = System.Configuration.ConfigurationManager.AppSettings["WithdrawalsMinimum"].ToString();

            //验证提现金额
            if (payMoney >= decimal.Parse(WithdrawalsMinimum))
            {
                if (payMoney > ketiMoney)
                {
                    result = new { success = 0, msg = "提现金额不能超过可提金额!" };
                }
                else
                {
                    #region 提现金额验证成功,后续处理

                    //判断是否验证原支付密码
                    if (!string.IsNullOrEmpty(PayPwd))
                    {
                        string temp = DESEncrypt.Encrypt(PayPwd);
                        if (temp == j_user.u_paypwd || temp == j_sys.s_value)
                        {
                            #region 拼装提款表与银行打款对接表sql



                            if (WithdrawalsType == 1 || WithdrawalsType == 2)
                            {
                                List <string> sqllist = new List <string>();

                                if (WithdrawalsType == 1)
                                {
                                    sqllist = BankPaySongle(payMoney, b_bankid, payid);
                                }
                                else
                                {
                                    sqllist = BankPay(payMoney, b_bankid, payid);
                                }

                                if (sqllist.Count > 0)
                                {
                                    JMP.BLL.jmp_BankPlaymoney bankBll = new JMP.BLL.jmp_BankPlaymoney();

                                    //执行多条SQL语句,实现数据库事务。
                                    int num = bankBll.SelectBankPayMoney(sqllist);

                                    if (num > 0)
                                    {
                                        string log = "用户:" + UserInfo.UserId + ",申请提现:" + payMoney + ",申请时间:" + DateTime.Now;

                                        Logger.OperateLog("提现申请", log);

                                        result = new { success = 1, msg = "提现申请成功,请等待审核通过!" };
                                    }
                                    else
                                    {
                                        result = new { success = 0, msg = "提现申请失败!" };
                                    }
                                }
                                else
                                {
                                    result = new { success = 0, msg = "提现申请失败!" };
                                }
                            }
                            else
                            {
                                Logger.OperateLog("提现申请失败", "提现类型(1:单卡提现,2:多卡提现):" + WithdrawalsType);
                                result = new { success = 0, msg = "提现申请失败!" };
                            }

                            #endregion
                        }
                        else
                        {
                            result = new { success = 0, msg = "支付密码输入错误!" };
                        }
                    }
                    else
                    {
                        result = new { success = 0, msg = "请输入支付密码!" };
                    }

                    #endregion
                }
            }
            else
            {
                result = new { success = 0, msg = "提现金额不能为空且必须大于等于100!" };
            }

            return(Json(result));
        }
コード例 #16
0
        /// <summary>
        /// 账单管理
        /// </summary>
        /// <returns></returns>
        public ActionResult BillList()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            int    pageCount  = 0;
            int    pageIndexs = string.IsNullOrEmpty(Request["curr"]) ? 1 : Int32.Parse(Request["curr"]);                                    //当前页
            int    PageSize   = string.IsNullOrEmpty(Request["psize"]) ? 20 : Int32.Parse(Request["psize"]);                                 //每页显示数量
            string stime      = string.IsNullOrEmpty(Request["stime"]) ? DateTime.Now.AddDays(-8).ToString("yyyy-MM-dd") : Request["stime"]; //开始时间
            string etime      = string.IsNullOrEmpty(Request["etime"]) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : Request["etime"]; //结束时间

            //首页跳转标识
            int num = string.IsNullOrEmpty(Request["start"]) ? -1 : int.Parse(Request["start"]);

            switch (num)
            {
            case 2:
                stime = DateTime.Now.ToString("yyyy-MM-01");
                etime = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                break;

            case 3:
                stime = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01");
                etime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).AddDays(-1).ToString("yyyy-MM-dd");
                break;
            }


            #region 组装查询语句
            string where = "where DeveloperId='" + UserInfo.UserId + "'";
            if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
            {
                where += " and SettlementDay >='" + stime + "' and SettlementDay<='" + etime + "' ";
            }
            string orderby = "order by SettlementDay desc";

            string sql = string.Format(@"select a.Id,DeveloperId,CreatedOn,SettlementDay,TotalAmount,ServiceFee,PortFee,(TotalAmount-ServiceFee-PortFee) as KFZIncome,isnull(SUM(b.p_money),0) as p_money,ISNULL((OriginalTotalAmount-TotalAmount),0.0000) AS RefundAmount
 from  dx_total.dbo.[CoSettlementDeveloperOverview] as a
 left join (select * from dx_base.dbo.jmp_pays a,dx_base.dbo.jmp_BankPlaymoney b where a.p_batchnumber=b.b_batchnumber and a.p_state!=-1 and b.b_tradestate!=4
) as b on a.Id=b.p_bill_id {0}  group by a.Id,DeveloperId,CreatedOn,SettlementDay,TotalAmount,ServiceFee,PortFee,OriginalTotalAmount", where);

            List <JMP.MDL.CoSettlementDeveloperOverview> list  = new List <JMP.MDL.CoSettlementDeveloperOverview>();
            JMP.MDL.CoSettlementDeveloperOverview        model = new JMP.MDL.CoSettlementDeveloperOverview();
            list = bll_CoSDO.GetLists(sql, orderby, pageIndexs, PageSize, out pageCount);
            #endregion

            #region 合计组装查询语句

            string countsql = string.Format(@"select ISNULL(SUM(TotalAmount),0) as TotalAmount,isnull(SUM(ServiceFee),0) as ServiceFee,isnull(SUM(PortFee),0) as PortFee,
isnull(SUM(TotalAmount)-SUM(ServiceFee)-SUM(PortFee),0) as KFZIncome,ISNULL(SUM(p_money),0) as p_money,
ISNULL(SUM(OriginalTotalAmount)-SUM(TotalAmount),0) as RefundAmount 
from
 (
 select a.Id,a.SettlementDay,TotalAmount,ServiceFee,PortFee,OriginalTotalAmount,ISNULL(SUM(b.p_money),0) as p_money
from dx_total.dbo.CoSettlementDeveloperOverview as a
left join (select * from dx_base.dbo.jmp_pays a,dx_base.dbo.jmp_BankPlaymoney b where a.p_batchnumber=b.b_batchnumber and a.p_state!=-1 and b.b_tradestate!=4
) as b on a.Id=b.p_bill_id
{0}
group by a.Id,a.SettlementDay,TotalAmount,ServiceFee,PortFee,OriginalTotalAmount
) a", where);
            if (list.Count > 0)
            {
                DataTable dt = bll_CoSDO.SelectSum(countsql);
                model = dt.Rows.Count > 0 ? JMP.TOOL.MdlList.ToModel <JMP.MDL.CoSettlementDeveloperOverview>(dt) : new JMP.MDL.CoSettlementDeveloperOverview();
            }

            #endregion

            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.stime      = stime;
            ViewBag.etime      = etime;
            ViewBag.list       = list;
            ViewBag.model      = model;
            return(View());
        }
コード例 #17
0
        /// <summary>
        /// 订单列表
        /// </summary>
        /// <returns></returns>
        public ActionResult OrderList()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            #region 获取信息

            JMP.BLL.jmp_paymode        paymodebll  = new JMP.BLL.jmp_paymode();
            List <JMP.MDL.jmp_paymode> paymodeList = paymodebll.GetModelList("1=1 and p_state='1' ");//支付类型
            ViewBag.paymodeList = paymodeList;
            #endregion
            #region 查询
            //string sql = " select o_id,o_code,o_bizcode,o_tradeno,o_paymode_id,o_app_id,o_goods_id,o_term_key,o_price,o_payuser,o_ctime,o_ptime,o_state,o_times,o_address,o_noticestate,o_noticetimes,o_privateinfo,o_interface_id,o_showaddress,b.a_key,b.a_name,c.p_name,d.g_name from (  ";//组装查询条件
            string    sql          = "";
            string    sql1         = "";
            string    TableName    = "";                                                                                              //表名
            string    order        = "o_ptime";                                                                                       //排序字段
            int       pageCount    = 0;
            int       pageIndexs   = string.IsNullOrEmpty(Request["pageIndexs"]) ? 1 : Int32.Parse(Request["pageIndexs"]);            //当前页
            int       PageSize     = string.IsNullOrEmpty(Request["PageSize"]) ? 20 : Int32.Parse(Request["PageSize"]);               //每页显示数量
            int       searchType   = string.IsNullOrEmpty(Request["searchType"]) ? 0 : Int32.Parse(Request["searchType"]);            //查询条件选择
            string    searchname   = string.IsNullOrEmpty(Request["searchname"]) ? "" : Request["searchname"];                        //查询类容
            string    stime        = string.IsNullOrEmpty(Request["stime"]) ? DateTime.Now.ToString("yyyy-MM-dd") : Request["stime"]; //开始时间
            string    etime        = string.IsNullOrEmpty(Request["etime"]) ? DateTime.Now.ToString("yyyy-MM-dd") : Request["etime"]; //结束时间
            int       paymode      = string.IsNullOrEmpty(Request["paymode"]) ? 0 : Int32.Parse(Request["paymode"]);                  //支付类型
            string    paymentstate = string.IsNullOrEmpty(Request["paymentstate"]) ? "1" : Request["paymentstate"];                   //支付状态
            string    noticestate  = string.IsNullOrEmpty(Request["noticestate"]) ? "" : Request["noticestate"];                      //通知状态
            ArrayList sjfw         = JMP.TOOL.WeekDateTime.WeekMonday(DateTime.Parse(stime), DateTime.Parse(etime));                  //根据时间返回获取每周周一组装查询语句
            string where = "where 1=1";
            for (int i = 0; i < sjfw.Count; i++)
            {
                TableName = "jmp_order_" + DateTime.Parse(sjfw[i].ToString()).ToString("yyyyMMdd");
                // TableName = "jmp_order_20161107";
                sql += " SELECT o_id,o_code,o_bizcode,o_tradeno,o_paymode_id,o_app_id,o_goodsname,o_term_key,o_price,o_payuser,o_ctime,o_ptime,o_state,o_times,o_address,o_noticestate,o_noticetimes,o_privateinfo,o_interface_id,o_showaddress FROM " + TableName + " where 1=1 ";
                if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
                {
                    sql += " and convert(varchar(10),o_ptime,120)>='" + stime + "' and convert(varchar(10),o_ptime,120)<='" + etime + "' ";
                }
                if (paymode > 0)
                {
                    sql += " and o_paymode_id='" + paymode + "' ";
                }
                if (!string.IsNullOrEmpty(paymentstate))
                {
                    sql += " and o_state='" + paymentstate + "' ";
                }
                if (!string.IsNullOrEmpty(noticestate))
                {
                    sql += " and o_noticestate='" + noticestate + "' ";
                }
                sql += "    UNION ALL ";
            }
            if (searchType > 0 && !string.IsNullOrEmpty(searchname))
            {
                switch (searchType)
                {
                case 1:
                    where += " and a.o_code='" + searchname + "' ";
                    break;

                case 2:
                    where += " and  b.a_name='" + searchname + "'   ";
                    break;

                case 3:
                    where += " and  a.o_goodsname='" + searchname + "' ";
                    break;

                case 4:
                    where += " and a.o_tradeno= '" + searchname + "' ";
                    break;

                case 5:
                    where += " and a.o_bizcode like '%" + searchname + "%' ";
                    break;
                }
            }
            where += "and b.a_user_id='" + UserInfo.UserId + "'";
            //sql = sql.Remove(sql.Length - 10);//去掉最后一个UNION ALL
            //sql += " ) a   left join jmp_app  b on  a.o_app_id=b.a_id left join jmp_paymode c on c.p_id=a.o_paymode_id  left join jmp_goods d on d.g_id=a.o_goods_id and d.g_app_id=b.a_id and d.g_app_id=a.o_app_id where 1=1  and  " + where;
            //组装时时表数据
            sql1 = "SELECT o_id,o_code,o_bizcode,o_tradeno,o_paymode_id,o_app_id,o_goodsname,o_term_key,o_price,o_payuser,o_ctime,o_ptime,o_state,o_times,o_address,o_noticestate,o_noticetimes,o_privateinfo,o_interface_id, o_showaddress FROM jmp_order where 1=1";
            if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
            {
                sql1 += " and convert(varchar(10),o_ptime,120)>='" + stime + "' and convert(varchar(10),o_ptime,120)<='" + etime + "' ";
            }
            if (paymode > 0)
            {
                sql1 += " and o_paymode_id='" + paymode + "' ";
            }
            if (!string.IsNullOrEmpty(paymentstate))
            {
                sql1 += " and o_state='" + paymentstate + "' ";
            }
            if (!string.IsNullOrEmpty(noticestate))
            {
                sql1 += " and o_noticestate='" + noticestate + "' ";
            }
            sql = sql + sql1;
            ViewBag.searchname   = searchname;
            ViewBag.searchType   = searchType;
            ViewBag.stime        = stime;
            ViewBag.etime        = etime;
            ViewBag.paymode      = paymode;
            ViewBag.paymentstate = paymentstate;
            ViewBag.noticestate  = noticestate;
            List <JMP.MDL.jmp_order> list     = new List <JMP.MDL.jmp_order>();
            JMP.BLL.jmp_order        orderbll = new JMP.BLL.jmp_order();
            list = orderbll.SelectPager(where, sql, order, pageIndexs, PageSize, out pageCount);
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.list       = list;
            #endregion
            return(View());
        }
コード例 #18
0
        /// <summary>
        /// 应用报表
        /// </summary>
        /// <returns></returns>
        public ActionResult AppReport(string rtype)
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            rtype = !string.IsNullOrEmpty(rtype) ? rtype : "total";

            //日期
            string stime = string.IsNullOrEmpty(Request["s_begin"]) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : Request["s_begin"];
            string etime = string.IsNullOrEmpty(Request["s_end"]) ? DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") : Request["s_end"];

            //首页跳转标识
            int num = string.IsNullOrEmpty(Request["start"]) ? -1 : int.Parse(Request["start"]);
            //账单管理跳转标识
            string time = string.IsNullOrEmpty(Request["time"]) ? "" : Request["time"];
            if (time != "")
            {
                stime = JMP.TOOL.DESEncrypt.Decrypt(time);
                etime = JMP.TOOL.DESEncrypt.Decrypt(time);
            }
            else
            {
                if (rtype == "today")
                {
                    num = 0;
                }

                switch (num)
                {
                case 0:
                    stime = DateTime.Now.ToString("yyyy-MM-dd");
                    etime = DateTime.Now.ToString("yyyy-MM-dd");
                    break;

                case 2:
                    stime = DateTime.Now.ToString("yyyy-MM-01");
                    etime = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                    break;

                case 3:
                    stime = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01");
                    etime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).AddDays(-1).ToString("yyyy-MM-dd");
                    break;
                }
            }

            ViewBag.rtype = rtype;
            int    pageCount  = 0;
            int    pageIndexs = string.IsNullOrEmpty(Request["curr"]) ? 1 : Int32.Parse(Request["curr"]);    //当前页
            int    PageSize   = string.IsNullOrEmpty(Request["psize"]) ? 20 : Int32.Parse(Request["psize"]); //每页显示数量
            string types      = string.IsNullOrEmpty(Request["s_type"]) ? "0" : Request["s_type"];
            string searchKey  = string.IsNullOrEmpty(Request["s_key"]) ? "" : Request["s_key"];

            int    sort        = string.IsNullOrEmpty(Request["s_sort"]) ? 1 : int.Parse(Request["s_sort"]);
            string searchTotal = string.IsNullOrEmpty(Request["s_field"]) ? "" : Request["s_field"];

            DataTable dt  = new DataTable();
            DataTable ddt = new DataTable();//用于查询总和CountSect
            string where = "where 1=1";
            string orderby = "order by ";
            string BsaeDb  = System.Configuration.ConfigurationManager.AppSettings["BaseDb"];
            string helpUrl = System.Configuration.ConfigurationManager.AppSettings["helpUrl"].ToString();
            ViewBag.helpUrl = helpUrl;

            #region 组装排序字段
            //按日期倒序展示
            if (!string.IsNullOrEmpty(searchTotal))
            {
                if (searchTotal == "0")
                {
                    orderby += "a_equipment ";
                }
                else if (searchTotal == "1")
                {
                    orderby += "a_success ";
                }
                else if (searchTotal == "2")
                {
                    orderby += "a_notpay ";
                }
                else if (searchTotal == "3")
                {
                    orderby += "a_alipay ";
                }
                else if (searchTotal == "4")
                {
                    orderby += "a_wechat ";
                }
                else
                {
                    orderby += "a_time ";
                }
            }
            else
            {
                orderby += rtype == "total" ? "a_time  " : "a_appid  ";
            }
            orderby += (sort == 1 ? "desc" : "asc");
            #endregion
            #region 查询
            if (rtype == "total")
            {
                if (!string.IsNullOrEmpty(types))
                {
                    if (!string.IsNullOrEmpty(searchKey))
                    {
                        switch (types)
                        {
                        case "0":
                            //where += " and r_app_key like '%" + searchKey + "%'";
                            break;

                        case "1":
                            where += " and a.a_appname like '%" + searchKey + "%'";
                            break;

                        case "2":
                            where += " and b.u_realname like '%" + searchKey + "%'";
                            break;
                        }
                    }
                }
                where += " and b.u_id='" + UserInfo.UserId + "'";
                where += " and a_time>='" + stime + "' and a_time<='" + etime + "' ";
                string sql      = string.Format(@"select a_appname,a_appid,
isnull(SUM(a_equipment),0) as a_equipment,a_time,
isnull(SUM(a_success),0) a_success,
isnull(SUM(a_notpay),0) a_notpay,
isnull(SUM(a_alipay),0) a_alipay,
isnull(SUM(a_wechat),0) a_wechat,
isnull(SUM(a_qqwallet),0) a_qqwallet,
isnull(SUM(a_count),0) a_count,
isnull(SUM(a_curr),0) a_curr,
isnull(SUM(a_successratio),0) a_successratio,
isnull(SUM(a_arpur),0) a_arpur,
isnull(SUM(a_request),0) a_request,
isnull(sum(a_unionpay),0) a_unionpay,
b.u_realname   
from jmp_appreport a left join {0}.dbo.jmp_user b on a.a_uerid=b.u_id  {1} group by a_appname,b.u_realname,a_appid,a_time", BsaeDb, where);
                string countsql = string.Format(@"select sum(a_equipment) a_equipment,sum(a_success) a_success,SUM(a_notpay) a_notpay,sum(a_alipay) a_alipay,sum(a_wechat)a_wechat,isnull(SUM(a_qqwallet),0) a_qqwallet,sum(a_unionpay) a_unionpay, sum(a_count)a_count,SUM(a_curr)a_curr,SUM(a_request) a_request,SUM(a_successratio) a_successratio,SUM(a_arpur) a_arpur from jmp_appreport a left join {0}.dbo.jmp_user b on a.a_uerid=b.u_id {1} ", BsaeDb, where);
                dt  = bll_report.GetLists(sql, orderby, pageIndexs, PageSize, out pageCount);
                ddt = bll_report.CountSect(countsql);
            }
            #endregion
            #region 查询今日
            else if (rtype == "today")
            {
                where += " and b.u_id='" + UserInfo.UserId + "' ";
                where += " and a_datetime>='" + DateTime.Now.ToString("yyyy-MM-dd") + " 00:00" + "' and a_datetime<='" + DateTime.Now.ToString("yyyy-MM-dd") + " 23:59" + "' ";
                if (!string.IsNullOrEmpty(types))
                {
                    if (!string.IsNullOrEmpty(searchKey))
                    {
                        switch (types)
                        {
                        case "0":
                            //where += " and temp.t_appkey like '%" + searchKey + "%' ";
                            break;

                        case "1":
                            where += " and a.a_appname like '%" + searchKey + "%'";
                            break;

                        case "2":
                            where += " and b.u_realname like '%" + searchKey + "%'";
                            break;
                        }
                    }
                }
                string r_time = DateTime.Now.ToString("yyyy-MM-dd");
                string tname  = GetOrderTableName(r_time);
                string query  = string.Format(@"select a_appname,a_appid,
isnull(SUM(a_equipment),0) as a_equipment,GETDATE() a_time,
isnull(SUM(a_success),0) a_success,
isnull(SUM(a_notpay),0) a_notpay,
isnull(SUM(a_alipay),0) a_alipay,
isnull(SUM(a_wechat),0) a_wechat,
isnull(SUM(a_qqwallet),0) a_qqwallet,
isnull(SUM(a_count),0) a_count,
isnull(SUM(a_curr),0) a_curr,
isnull(SUM(a_successratio),0) a_successratio,
isnull(SUM(a_arpur),0) a_arpur,
isnull(SUM(a_request),0) a_request,
isnull(sum(a_unionpay),0) a_unionpay,
b.u_realname   
from jmp_appcount a left join {0}.dbo.jmp_user b on a.a_uerid=b.u_id  {1} group by a_appname,b.u_realname,a_appid  ", BsaeDb, where);

                string countsql          = string.Format(@"select sum(a_equipment) a_equipment,sum(a_success) a_success,SUM(a_notpay) a_notpay,sum(a_alipay) a_alipay,sum(a_wechat)a_wechat,isnull(SUM(a_qqwallet),0) a_qqwallet,sum(a_unionpay) a_unionpay, sum(a_count)a_count,SUM(a_curr)a_curr,SUM(a_request) a_request,SUM(a_successratio) a_successratio,SUM(a_arpur) a_arpur from jmp_appcount a left join {0}.dbo.jmp_user b on a.a_uerid=b.u_id {1}", BsaeDb, where);
                JMP.BLL.jmp_appcount bll = new JMP.BLL.jmp_appcount();
                dt = bll.GetTodayList(query, orderby, pageIndexs, PageSize, out pageCount);
                if (dt.Rows.Count > 0)
                {
                    ddt = bll.CountSect(countsql);
                }
            }
            #endregion
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.ddt        = ddt;
            ViewBag.rtype      = rtype;

            ViewBag.stime = stime;
            ViewBag.etime = etime;
            return(View(dt));
        }
コード例 #19
0
        public ActionResult UserLoginbygw(string qs)
        {
            object result  = "";
            string ms      = JMP.TOOL.DESEncrypt.Decrypt(qs);
            string u_name  = ms.Split(';')[0].ToString();
            string u_pwd   = ms.Split(';')[1].ToString();
            string admname = ms.Split(';')[2].ToString();
            string admtime = ms.Split(';')[3].ToString();

            if (Convert.ToDateTime(admtime).AddMinutes(5) < System.DateTime.Now)
            {
                result = new { msg = "登录超时,后台密码失效,请从新刷新后台用户列表!", success = "2" };
            }
            else
            {
                JMP.BLL.jmp_limit bll_limit = new JMP.BLL.jmp_limit();
                JMP.BLL.jmp_user  bll       = new JMP.BLL.jmp_user();
                JMP.MDL.jmp_user  model     = bll.GetModel(u_name);
                //加密用户登录密码
                string jm_pwd = u_pwd;
                if (model != null && model.u_state == 1)
                {
                    if ((model.u_email == u_name || model.u_phone == u_name) && model.u_password == jm_pwd)
                    {
                        UserInfo.UserId     = model.u_id;
                        UserInfo.UserName   = model.u_realname;
                        UserInfo.UserNo     = model.u_email;
                        UserInfo.UserRoleId = model.u_role_id;
                        DataTable dtLimit = bll_limit.GetAppUserLimitSession(model.u_id, model.u_role_id);
                        if (dtLimit.Rows.Count > 0)
                        {
                            Session["dtSession"] = dtLimit;
                            if (admname != "0")
                            {
                                string log = string.Format(admname + "从官网登录。", UserInfo.UserNo, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                                AddLocLog.AddUserLog(UserInfo.UserId, 2, RequestHelper.GetClientIp(), admname + "从官网登录。", log);
                            }
                            result = new { msg = "登录成功!", success = "1" };
                        }
                        else
                        {
                            result = new { msg = "权限不足!", success = "2" };
                        }
                    }
                    else
                    {
                        result = new { msg = "用户名或密码错误!", success = "2" };
                    }
                }
                else
                {
                    if (model == null)
                    {
                        result = new { msg = "用户名或密码错误!", success = "2" };
                    }
                    else if (model.u_state != 1)
                    {
                        result = new { msg = "该账号已冻结!", success = "2" };
                    }
                }
            }
            ViewBag.message = result;
            return(View());
        }
コード例 #20
0
        public ActionResult Default()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;


            #endregion

            int r_id = UserInfo.UserRid;

            string menuStr = GetMenStr(u_ids, r_id);
            ViewBag.UserName   = UserInfo.UserNo;
            ViewBag.MsgCount   = sm_bll.GetUserMsgCount(u_ids);
            ViewBag.MenuTopStr = menuStr;
            ViewBag.QQ         = ConfigurationManager.AppSettings["linkqq"];
            ViewBag.Tel        = ConfigurationManager.AppSettings["linkphone"];

            //每日应用汇总
            JMP.BLL.jmp_appcount bllapp   = new JMP.BLL.jmp_appcount();
            JMP.MDL.jmp_appcount modelapp = new JMP.MDL.jmp_appcount();
            //开发者每日结算详情
            JMP.BLL.CoSettlementDeveloperAppDetails cobll                   = new JMP.BLL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_yesterday       = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_month           = new JMP.MDL.CoSettlementDeveloperAppDetails();
            JMP.MDL.CoSettlementDeveloperAppDetails comodel_preceding_month = new JMP.MDL.CoSettlementDeveloperAppDetails();

            int u_id = UserInfo.UserId;
            //今天
            string u_time = DateTime.Now.ToString("yyyy-MM-dd");
            //昨天
            string u_time_yesterday = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
            //本月
            string u_time_month = DateTime.Now.ToString("yyyy-MM");
            //上月
            string u_time_preceding_month = DateTime.Now.AddMonths(-1).ToString("yyyy-MM");

            //根据日期查询交易金额和笔数(今天)
            modelapp = bllapp.DataAppcountAdy(u_time, u_id, 0);


            //根据不同日期统计查询(昨天)
            comodel_yesterday = cobll.GetModelKFZ_total(u_id, u_time_yesterday, 0);
            //根据不同日期统计查询(本月)
            comodel_month = cobll.GetModelKFZ_total(u_id, u_time_month, 1);
            //根据不同日期统计查询(上月)
            comodel_preceding_month = cobll.GetModelKFZ_total(u_id, u_time_preceding_month, 1);

            //流水及收入金额
            ViewBag.comodel_yesterday       = comodel_yesterday;
            ViewBag.comodel_month           = comodel_month;
            ViewBag.comodel_preceding_month = comodel_preceding_month;

            ViewBag.AppCount = modelapp;

            return(View());
        }
コード例 #21
0
      public JsonResult UpdateUser(JMP.MDL.jmp_user jmpuser)
      {
          object obj = new { success = 0, msg = "更新失败!" };

          JMP.BLL.jmp_user userBll = new JMP.BLL.jmp_user();
          var oldUser      = _UserService.FindById(jmpuser.u_id);
          var oldUserColne = oldUser.Clone();

          oldUser.u_category        = jmpuser.u_category;//类别
          oldUser.u_email           = jmpuser.u_email;
          oldUser.u_realname        = jmpuser.u_realname;
          oldUser.u_password        = DESEncrypt.Encrypt(jmpuser.u_password);
          oldUser.u_phone           = jmpuser.u_phone;
          oldUser.u_qq              = jmpuser.u_qq;
          oldUser.u_address         = jmpuser.u_address;
          oldUser.u_account         = jmpuser.u_account;
          oldUser.u_name            = jmpuser.u_name;
          oldUser.u_bankname        = jmpuser.u_bankname;
          oldUser.u_idnumber        = jmpuser.u_idnumber;
          oldUser.u_blicensenumber  = jmpuser.u_blicensenumber;
          oldUser.BusinessEntity    = jmpuser.BusinessEntity;
          oldUser.RegisteredAddress = jmpuser.RegisteredAddress;
          oldUser.u_auditstate      = jmpuser.u_auditstate;
          oldUser.u_photof          = string.IsNullOrEmpty(jmpuser.u_photof) ? "" : jmpuser.u_photof;
          oldUser.u_licence         = string.IsNullOrEmpty(jmpuser.u_licence) ? "" : jmpuser.u_licence;
          try
          {
              if (oldUser.u_category == 0)
              {
                  oldUser.u_photo = string.IsNullOrEmpty(jmpuser.u_photo) ? "" : jmpuser.u_photo;
              }
              else
              {
                  oldUser.u_blicense = string.IsNullOrEmpty(jmpuser.u_blicense) ? "" : jmpuser.u_blicense;
                  oldUser.u_photo    = string.IsNullOrEmpty(jmpuser.u_photo) ? " " : jmpuser.u_photo;
              }

              if (string.IsNullOrEmpty(jmpuser.u_qq))
              {
                  oldUser.u_qq = " ";
              }
              if (string.IsNullOrEmpty(jmpuser.u_address))
              {
                  oldUser.u_address = " ";
              }
              bool flag = _UserService.Update(oldUser);
              obj = new { success = flag ? 1 : 0, msg = flag ? "更新成功!" : "更新失败!" };
              //写日志
              if (flag)
              {
                  Logger.ModifyLog("修改开发者", oldUserColne, jmpuser);

                  //审核状态改变是发送私信和邮件给用户
                  if (jmpuser.u_auditstate != oldUserColne.u_auditstate)
                  {
                      JMP.BLL.jmp_message messbll = new JMP.BLL.jmp_message();
                      JMP.MDL.jmp_message j_mess  = new JMP.MDL.jmp_message();
                      string tipmsg = string.Empty;
                      #region 组装私信实体
                      j_mess.m_sender   = UserInfo.UserId;
                      j_mess.m_receiver = oldUser.u_id.ToString();
                      j_mess.m_type     = 1;
                      j_mess.m_time     = DateTime.Now;
                      j_mess.m_state    = 0;
                      switch (jmpuser.u_auditstate)
                      {
                      case -1:
                          tipmsg = "你的账号审核未通过!";
                          break;

                      case 0:
                          tipmsg = "你的账号正在审核中,如有疑问请联系我们!";
                          break;

                      case 1:
                          tipmsg = "你的账号审核通过!";
                          break;
                      }
                      j_mess.m_content = tipmsg;
                      j_mess.m_topid   = oldUser.u_topid;
                      #endregion
                      //发送私信
                      if (jmpuser.u_auditstate == 1)
                      {
                          //更改审核状态为通过时,才发送私信
                          int record = messbll.Add(j_mess);
                          if (record > 0)
                          {
                              Logger.CreateLog("发送私信给用户", j_mess);
                          }
                      }
                  }
              }
          }
          catch (Exception ex)
          {
              Logger.OperateLog("修改开发者报错" + jmpuser.u_id, ex.ToString());
              obj = new { success = 0, msg = "更新出错了!" };
          }
          return(Json(obj));
      }
コード例 #22
0
ファイル: AppController.cs プロジェクト: dmhai/dxpay
        public ActionResult UpdateApp()
        {
            #region 获取用户实名认证状态信息

            JMP.BLL.jmp_user sm_bll   = new JMP.BLL.jmp_user();
            JMP.MDL.jmp_user sm_model = new JMP.MDL.jmp_user();

            int u_ids = UserInfo.Uid;

            //查询登录信息
            sm_model = sm_bll.GetModel(u_ids);

            ViewBag.auditstate = sm_model.u_auditstate;
            ViewBag.linkEmail  = sm_model.u_email;

            #endregion

            int             appid  = string.IsNullOrEmpty(Request["appid"]) ? 0 : Int32.Parse(Request["appid"]);
            JMP.BLL.jmp_app appbll = new JMP.BLL.jmp_app();
            JMP.MDL.jmp_app model  = new JMP.MDL.jmp_app();

            string yy = "";

            if (appid > 0)
            {
                model = appbll.SelectId(appid);
                #region =========获取应用平台在用信息=========
                JMP.BLL.jmp_platform        bll  = new JMP.BLL.jmp_platform();
                DataTable                   dt   = bll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息
                List <JMP.MDL.jmp_platform> yypt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_platform>(dt);
                ViewBag.glptdt = yypt;
                #endregion

                #region ========获取应用类型在用信息======
                JMP.BLL.jmp_apptype yybll = new JMP.BLL.jmp_apptype();
                string where = "  t_id in (select  DISTINCT(t_topid) from jmp_apptype where t_topid in( select t_id from jmp_apptype where t_topid='0'   )) and t_state='1' order by t_sort desc";
                DataTable           yydt   = yybll.GetList(where).Tables[0];//获取应用类型在用信息
                JMP.MDL.jmp_apptype models = new JMP.MDL.jmp_apptype();
                int t_topid = 0;
                if (model.a_apptype_id > 0)
                {
                    models  = yybll.GetModel(model.a_apptype_id);//查询单条信息
                    t_topid = models.t_topid;
                }
                string yyid = "";

                if (model.a_auditstate == 1)
                {
                    yy += "<select id='xzyylx' disabled ='disabled' > ";
                }
                else
                {
                    yy += "<select id='xzyylx' onclick='xzyylx()'> ";
                }

                for (int j = 0; j < yydt.Rows.Count; j++)
                {
                    yyid = yydt.Rows[j]["t_id"].ToString();
                    if (t_topid > 0)
                    {
                        if (Int32.Parse(yydt.Rows[j]["t_id"].ToString()) == models.t_topid)
                        {
                            yy += "<option value='" + yyid + "' selected=selected >" + yydt.Rows[j]["t_name"] + "</option>";
                        }
                        else
                        {
                            yy += "<option value='" + yyid + "' >" + yydt.Rows[j]["t_name"] + "</option>";
                        }
                    }
                    else
                    {
                        yy += "<option value='" + yyid + "' >" + yydt.Rows[j]["t_name"] + "</option>";
                    }
                }

                yy += "</select>";
                #endregion
            }


            #region 获取所有支付方式

            JMP.BLL.jmp_paymode zfbll = new JMP.BLL.jmp_paymode();

            DataTable zfdt = new DataTable();
            List <JMP.MDL.jmp_paymode> zflist = new List <JMP.MDL.jmp_paymode>();
            zfdt          = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
            zflist        = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(zfdt);
            ViewBag.appid = appid;
            ViewBag.list  = zflist;
            #endregion

            ViewBag.yy    = yy;
            ViewBag.model = model;
            //支付方式
            string[] zffs = model.a_paymode_id.Split(',');
            ViewBag.zffs = zffs;
            return(View());
        }