コード例 #1
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        public ActionResult AppListTC()
        {
            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 searchDesc = string.IsNullOrEmpty(Request["searchDesc"]) ? 0 : Int32.Parse(Request["searchDesc"]); //排序方式
            //int SelectState = string.IsNullOrEmpty(Request["SelectState"]) ? 1 : Int32.Parse(Request["SelectState"]);//状态
            //int auditstate = string.IsNullOrEmpty(Request["auditstate"]) ? -1 : Int32.Parse(Request["auditstate"]);//审核状态
            int    type                 = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]);             //查询条件选择
            string sea_name             = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"];                 //查询条件内容
            int    platformid           = string.IsNullOrEmpty(Request["platformid"]) ? 0 : Int32.Parse(Request["platformid"]); //关联平台
            List <JMP.MDL.jmp_app> list = new List <JMP.MDL.jmp_app>();

            JMP.BLL.jmp_app bll = new JMP.BLL.jmp_app();
            list = bll.SelectListTc(platformid, searchDesc, type, sea_name, pageIndexs, PageSize, out pageCount);
            ViewBag.searchDesc = searchDesc;
            ViewBag.type       = type;
            ViewBag.sea_name   = sea_name;
            ViewBag.pageIndexs = pageIndexs;
            ViewBag.PageSize   = PageSize;
            ViewBag.pageCount  = pageCount;
            ViewBag.list       = list;
            ViewBag.platformid = platformid;
            return(View());
        }
コード例 #2
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        public ActionResult AppAuditing(int a_id)
        {
            JMP.BLL.jmp_app bll    = new JMP.BLL.jmp_app();
            JMP.MDL.jmp_app model  = new JMP.MDL.jmp_app();
            string          glpt   = "";
            string          zf     = "";
            string          szmrdj = "";
            string          yy     = "";

            if (a_id > 0)
            {
                model = bll.SelectId(a_id);

                #region 根据应用子类型获取风险等级
                JMP.BLL.jmp_risklevelallocation        ribll  = new JMP.BLL.jmp_risklevelallocation();
                List <JMP.MDL.jmp_risklevelallocation> rilist = new List <JMP.MDL.jmp_risklevelallocation>();
                rilist         = ribll.SelectAppType(model.a_apptype_id);
                ViewBag.rilist = rilist;
                #endregion
            }
            ViewBag.model  = model;
            ViewBag.glpt   = glpt;
            ViewBag.zf     = zf;
            ViewBag.yy     = yy;
            ViewBag.szmrdj = szmrdj;
            return(View());
        }
コード例 #3
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        public ActionResult AppList()
        {
            #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    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    searchDesc           = string.IsNullOrEmpty(Request["searchDesc"]) ? 0 : Int32.Parse(Request["searchDesc"]);   //排序方式
            int    SelectState          = string.IsNullOrEmpty(Request["SelectState"]) ? 1 : Int32.Parse(Request["SelectState"]); //状态
            int    auditstate           = string.IsNullOrEmpty(Request["auditstate"]) ? -1 : Int32.Parse(Request["auditstate"]);  //审核状态
            int    type                 = string.IsNullOrEmpty(Request["type"]) ? 0 : Int32.Parse(Request["type"]);               //查询条件选择
            string sea_name             = string.IsNullOrEmpty(Request["sea_name"]) ? "" : Request["sea_name"];                   //查询条件内容
            int    platformid           = string.IsNullOrEmpty(Request["platformid"]) ? 0 : Int32.Parse(Request["platformid"]);   //关联平台
            int    appType              = string.IsNullOrEmpty(Request["appType"]) ? 0 : int.Parse(Request["appType"]);           //所属应用类型
            int    r_id                 = string.IsNullOrEmpty(Request["r_id"]) ? 0 : int.Parse(Request["r_id"]);                 //风险等级
            int    paytype              = string.IsNullOrEmpty(Request["paytype"]) ? 0 : int.Parse(Request["paytype"]);           //支付类型
            List <JMP.MDL.jmp_app> list = new List <JMP.MDL.jmp_app>();
            JMP.BLL.jmp_app        bll  = new JMP.BLL.jmp_app();
            list = bll.SelectList(paytype, r_id, platformid, auditstate, sea_name, type, SelectState, appType, searchDesc, pageIndexs, PageSize, out pageCount);
            string wherepay = " p_state=1";
            JMP.BLL.jmp_paymode        yybllt  = new JMP.BLL.jmp_paymode();
            DataTable                  yydtt   = yybllt.GetList(wherepay).Tables[0];//获取支付方式
            List <JMP.MDL.jmp_paymode> yylistt = JMP.TOOL.MdlList.ToList <JMP.MDL.jmp_paymode>(yydtt);
            ViewBag.yylistt     = yylistt;
            ViewBag.searchDesc  = searchDesc;
            ViewBag.paytype     = paytype;
            ViewBag.SelectState = SelectState;
            ViewBag.r_id        = r_id;
            ViewBag.type        = type;
            ViewBag.sea_name    = sea_name;
            ViewBag.pageIndexs  = pageIndexs;
            ViewBag.PageSize    = PageSize;
            ViewBag.pageCount   = pageCount;
            ViewBag.list        = list;
            ViewBag.auditstate  = auditstate;
            ViewBag.platformid  = platformid;
            ViewBag.locUrl      = GetVoidHtml();
            ViewBag.appType     = appType;
            return(View());
        }
コード例 #4
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 批量修改应用状态
        /// </summary>
        /// <returns></returns>
        public JsonResult UpdateState()
        {
            object retJson = new { success = 0, msg = "操作失败" };
            int    state   = string.IsNullOrEmpty(Request["state"]) ? 0 : Int32.Parse(Request["state"].ToString());
            string str     = Request["ids"];
            string xgzfc   = ""; //组装说明
            string tsmsg   = ""; //提示

            JMP.BLL.jmp_app bll = new JMP.BLL.jmp_app();
            if (str.CompareTo("On") > 0)
            {
                str = str.Substring(3);
            }
            if (bll.UpdateLocUserState(str, state))
            {
                if (state == 1)
                {
                    xgzfc = "一键启用ID为:" + str;
                    tsmsg = "启用成功";
                }
                else
                {
                    tsmsg = "禁用成功";
                    xgzfc = "一键禁用ID为:" + str;
                }

                Logger.OperateLog("应用一键启用或禁用", xgzfc);

                retJson = new { success = 1, msg = tsmsg };
            }
            else
            {
                if (state == 1)
                {
                    tsmsg = "启用失败";
                }
                else
                {
                    tsmsg = "禁用失败";
                }
                retJson = new { success = 0, msg = tsmsg };
            }
            return(Json(retJson));
        }
コード例 #5
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 修改应用
        /// </summary>
        /// <returns></returns>
        public JsonResult UpdateAppAuditing()
        {
            int    id           = string.IsNullOrEmpty(Request["aid"]) ? 0 : int.Parse(Request["aid"]);
            int    u_auditstate = string.IsNullOrEmpty(Request["a_auditstate"]) ? 0 : int.Parse(Request["a_auditstate"]);
            int    a_rid        = string.IsNullOrEmpty(Request["a_rid"]) ? 0 : int.Parse(Request["a_rid"]);
            string name         = UserInfo.UserName;


            JMP.BLL.jmp_app bll  = new JMP.BLL.jmp_app();
            bool            flag = bll.Update_auditstate(id, u_auditstate, a_rid, name);

            if (flag)
            {
                string info = "审核应用状态(" + id + ")的状态为" + u_auditstate + "";
                Logger.OperateLog("审核应用状态", info);
            }

            return(Json(new { success = flag ? 1 : 0, msg = flag ? "审核成功!" : "审核失败!" }));
        }
コード例 #6
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 冻结或解冻应用
        /// </summary>
        /// <returns></returns>
        public JsonResult UpdateStateDt()
        {
            object retJson = new { success = 0, msg = "操作失败" };

            JMP.MDL.jmp_app model = new JMP.MDL.jmp_app();//应用实体类
            JMP.BLL.jmp_app bll   = new JMP.BLL.jmp_app();
            int             a_id  = string.IsNullOrEmpty(Request["a_id"]) ? 0 : Int32.Parse(Request["a_id"].ToString());

            model         = bll.GetModel(a_id);
            model.a_state = string.IsNullOrEmpty(Request["state"]) ? 0 : Int32.Parse(Request["state"].ToString());
            string xgzfc = ""; //组装说明
            string tsmsg = ""; //提示

            if (bll.Update(model))
            {
                if (model.a_state == 1)
                {
                    xgzfc = "解冻ID为" + a_id;
                    tsmsg = "解冻成功";
                }
                else
                {
                    tsmsg = "冻结成功";
                    xgzfc = "冻结ID为:" + a_id;
                }

                Logger.OperateLog("应用冻结或解冻", xgzfc);

                retJson = new { success = 1, msg = tsmsg };
            }
            else
            {
                retJson = new { success = 0, msg = "操作失败" };
            }
            return(Json(retJson));
        }
コード例 #7
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 修改应用
        /// </summary>
        /// <returns></returns>
        public ActionResult UpdateAPP(int a_id)
        {
            JMP.BLL.jmp_app bll    = new JMP.BLL.jmp_app();
            JMP.MDL.jmp_app model  = new JMP.MDL.jmp_app();
            string          glpt   = "";
            string          zf     = "";
            string          szmrdj = "";
            string          yy     = "";

            if (a_id > 0)
            {
                model = bll.SelectId(a_id);
                #region =========获取应用平台在用信息=========
                JMP.BLL.jmp_platform bllpl = new JMP.BLL.jmp_platform();
                DataTable            dt    = bllpl.GetList(" 1=1 and p_state='1' ").Tables[0];//获取应用平台在用信息
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (Int32.Parse(dt.Rows[i]["p_id"].ToString()) == model.a_platform_id)
                    {
                        glpt += "<option value=\"" + dt.Rows[i]["p_id"] + "\" selected=\"selected\" >" + dt.Rows[i]["p_name"] + "</option>";
                    }
                    else
                    {
                        glpt += "<option value=\"" + dt.Rows[i]["p_id"] + "\">" + dt.Rows[i]["p_name"] + "</option>";
                    }
                }
                #endregion
                #region =====获取支付类型在用信息======
                JMP.BLL.jmp_paymode zfbll     = new JMP.BLL.jmp_paymode();
                DataTable           zfdt      = zfbll.GetList(" 1=1 and p_state='1' ").Tables[0];//获取支付类型在用信息
                string[]            a_paymode = model.a_paymode_id.Split(',');
                for (int k = 0; k < zfdt.Rows.Count; k++)
                {
                    bool check = true;
                    for (int i = 0; i < a_paymode.Length; i++)
                    {
                        if (zfdt.Rows[k]["p_id"].ToString() == a_paymode[i])
                        {
                            zf   += "&nbsp;&nbsp;<input type=\"checkbox\" name=\"zflx\" class=\"inputChck\" id=paytype_" + zfdt.Rows[k]["p_id"] + "  data-stat=" + zfdt.Rows[k]["p_islocked"] + "   value=" + zfdt.Rows[k]["p_id"] + " checked=\"checked\" />&nbsp;" + zfdt.Rows[k]["p_name"];
                            check = false;
                            break;
                        }
                    }
                    if (check)
                    {
                        zf += "&nbsp;&nbsp;<input type=\"checkbox\" name=\"zflx\" class=\"inputChck\" id=paytype_" + zfdt.Rows[k]["p_id"] + "  data-stat=" + zfdt.Rows[k]["p_islocked"] + "    value=" + zfdt.Rows[k]["p_id"] + " />&nbsp;" + zfdt.Rows[k]["p_name"];
                    }
                }
                #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 = "";
                for (int j = 0; j < yydt.Rows.Count; j++)
                {
                    yyid = "yy" + yydt.Rows[j]["t_id"].ToString();
                    if (t_topid > 0)
                    {
                        if (Int32.Parse(yydt.Rows[j]["t_id"].ToString()) == models.t_topid)
                        {
                            szmrdj = yyid;
                            yy    += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"xzinput\" value=" + yydt.Rows[j]["t_name"] + "  />";
                        }
                        else
                        {
                            yy += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"inpuwxz\" value=" + yydt.Rows[j]["t_name"] + "  />";
                        }
                    }
                    else
                    {
                        yy += "<input type=\"button\" id='" + yyid + "' name=\"yyname\" onclick=\"xzyylx(this.id,0)\" class=\"inpuwxz\" value=" + yydt.Rows[j]["t_name"] + "  />";
                    }
                }

                #endregion

                #region 根据应用子类型获取风险等级
                JMP.BLL.jmp_risklevelallocation        ribll  = new JMP.BLL.jmp_risklevelallocation();
                List <JMP.MDL.jmp_risklevelallocation> rilist = new List <JMP.MDL.jmp_risklevelallocation>();
                rilist         = ribll.SelectAppType(model.a_apptype_id);
                ViewBag.rilist = rilist;
                #endregion
            }
            ViewBag.model  = model;
            ViewBag.glpt   = glpt;
            ViewBag.zf     = zf;
            ViewBag.yy     = yy;
            ViewBag.szmrdj = szmrdj;
            return(View());
        }
コード例 #8
0
ファイル: APPController.cs プロジェクト: dmhai/dxpay
        /// <summary>
        /// 添加或修改应用
        /// </summary>
        /// <returns></returns>
        public JsonResult InsertUpdateApp(JMP.MDL.jmp_app mod)
        {
            object retJson = new { success = 0, msg = "操作失败" };

            JMP.BLL.jmp_app bll = new JMP.BLL.jmp_app();



            //string xgzfc = "";
            if (string.IsNullOrEmpty(mod.a_paymode_id))
            {
                retJson = new { success = 0, msg = "请选择支付类型" };
            }
            else
            {
                if (mod.a_apptype_id == 0)
                {
                    retJson = new { success = 0, msg = "请选择应用类型" };
                }
                else
                {
                    if (mod.a_id > 0)
                    {
                        #region 修改应用
                        JMP.MDL.jmp_app modapp = new JMP.MDL.jmp_app();
                        modapp = bll.GetModel(mod.a_id);
                        //克隆对象
                        // object modclone = CloneObject.Clone(modapp);
                        var modclone = modapp.Clone();
                        if (mod.a_apptype_id != modapp.a_apptype_id)
                        {
                            modapp.a_auditstate = 0;              //应用审核状态(0未审核)
                            modapp.a_rid        = 0;              //风险等级配置表id
                        }
                        modapp.a_name        = mod.a_name;        //应用名称
                        modapp.a_platform_id = mod.a_platform_id; //关联平台ID
                        modapp.a_paymode_id  = mod.a_paymode_id;  //关联支付类型ID
                        modapp.a_apptype_id  = mod.a_apptype_id;  //关联应用类型ID
                        modapp.a_notifyurl   = mod.a_notifyurl;   //回掉地址
                        modapp.a_user_id     = mod.a_user_id;     //开发者ID
                        modapp.a_showurl     = mod.a_showurl;     //同步地址
                        modapp.a_appurl      = mod.a_appurl;      //应用审核地址
                        modapp.a_appsynopsis = mod.a_appsynopsis; //应用简介
                        if (mod.a_auditstate != 0)
                        {
                            if (string.IsNullOrEmpty(mod.a_auditor))
                            {
                                mod.a_auditor = UserInfo.UserName;
                            }
                        }
                        else
                        {
                            mod.a_auditor = "";
                        }
                        if (bll.Update(modapp))
                        {
                            Logger.ModifyLog("修改应用", modclone, modapp);

                            retJson = new { success = 1, msg = "修改成功" };
                        }
                        else
                        {
                            retJson = new { success = 0, msg = "修改失败" };
                        }
                        #endregion
                    }
                    else
                    {
                        #region 添加应用
                        mod.a_state      = 1;
                        mod.a_auditstate = 0;
                        mod.a_key        = "";
                        mod.a_secretkey  = "";
                        mod.a_time       = DateTime.Now;
                        int cg = bll.Add(mod);
                        if (cg > 0)
                        {
                            Logger.CreateLog("添加应用", mod);

                            //while (true)
                            //{
                            mod.a_key = DESEncrypt.Encrypt(mod.a_user_id + ";" + cg + ";" + DateTime.Now.ToString("yyyyMMddssmmfff"));
                            //if (!bll.Existss(mod.a_key))
                            //{
                            //    break;
                            //}
                            //}
                            mod.a_secretkey = DESEncrypt.Encrypt(cg + ";" + mod.a_key + ";" + DateTime.Now.ToString("yyyyMMddssmmfff"));
                            mod.a_id        = cg;
                            if (bll.Update(mod))
                            {
                                Logger.OperateLog("修改应用key", mod.a_key);

                                retJson = new { success = 1, msg = "添加成功" };
                            }
                            else
                            {
                                retJson = new { success = 0, msg = "添加失败" };
                            }
                        }
                        else
                        {
                            retJson = new { success = 0, msg = "添加失败" };
                        }
                        #endregion
                    }
                }
            }
            return(Json(retJson));
        }