Example #1
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public @nameListModel Query(NameValueCollection nvc, bool excel = false)
        {
            @nameListModel model = new @nameListModel();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;

            @prefix@name entity = new @prefix@name();

            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);

            @timeRange

            if (!excel)
            {
                model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
                if (model.TotalCount > 0)
                {
                    model.List = handler.GetDataListByTemplate("getList", entity);
                }
            }
            else
            {
                entity.AddData(":PS", 1000000);
                entity.AddData(":PI", 1);
                model.List = handler.GetDataListByTemplate("getList", entity);
            }

            return(model);
        }
Example #2
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public DailyAccountSnapshotListModel Query(NameValueCollection nvc)
        {
            DailyAccountSnapshotListModel model  = new DailyAccountSnapshotListModel();
            MDailyAccountSnapshot         entity = new MDailyAccountSnapshot();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);

            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now).Value;
            DateTime et = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value.AddDays(1);

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));

            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.Statistics = handler.GetSingleDataByTemplate("getStatistics", entity);
                model.List       = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
 public IResult Item()
 {
     try
     {
         MDownChannel entity = new MDownChannel();
         entity.SetData(Request.Form);
         entity.TrimEmptyProperty();
         string id = Request.Form["__id"];
         entity.Status = CommFun.ToInt(Request["StatusN"], 1);
         IResult result = DownChannelSerivce.Instance.Save(id, entity);
         if (result.Status)
         {
             result.SetSuccessMessage("保存成功");
         }
         else
         {
             result.SetErrorMessage("保存失败");
         }
         return(result);
     }
     catch (Exception ex)
     {
         return(new Result(false, ex.Message));
     }
 }
Example #4
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public OperateLogListModel Query(NameValueCollection nvc)
        {
            OperateLogListModel model  = new OperateLogListModel();
            MOperateLog         entity = new MOperateLog();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            string sTime = CommFun.ToDateTime(nvc["s"], DateTime.Now).Value.ToString("yyyy-MM-dd");
            string eTime = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value.ToString("yyyy-MM-dd");

            entity.AddData("ST", sTime);
            entity.AddData("ET", eTime);
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
        public IResult Edit()
        {
            IResult rst = null;

            try
            {
                MReceiptAccountInfo entity = new MReceiptAccountInfo();
                entity.SetData(Request.Form);
                entity.TrimEmptyProperty();
                string id     = Request.Form["__id"];
                int?   status = CommFun.ToInt(Request["Status"], 1);
                entity.Status        = status;
                entity.DownChannelNo = CommFun.ToInt(Request["DChannelNo"], null);
                rst = ReceiptAccountInfoService.Instance.Save(id, entity);
                if (rst.Status)
                {
                    rst = new Result(true, "编辑成功");
                }
                else
                {
                    rst = new Result(false, "编辑失败");
                }
                return(rst);
            }
            catch (Exception ex)
            {
                rst = new Result(false, ex.Message);
            }
            return(rst);
        }
Example #6
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public SysDictionaryListModel Query(NameValueCollection nvc)
        {
            SysDictionaryListModel model  = new SysDictionaryListModel();
            MSysDictionary         entity = new MSysDictionary();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            if (!string.IsNullOrEmpty(nvc["name"]))
            {
                entity.AddData(":Name", " t.name like '%" + nvc["name"] + "%'");
            }
            if (!string.IsNullOrEmpty(nvc["type"]))
            {
                entity.AddData(":Type", " t.type like '%" + nvc["type"] + "%'");
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #7
0
        public object ReviewQuery(NameValueCollection nvc)
        {
            OrderMainListModel model  = new OrderMainListModel();
            MOrderMain         entity = new MOrderMain();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["t"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));
            //关键字
            string keyWords      = CommFun.GetString(nvc["KeyWords"]);
            string accountCondit = "1=1";

            if (!string.IsNullOrEmpty(keyWords))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                if (type == 1)
                {
                    entity.OrderNo = keyWords;
                }
                else if (type == 2)
                {
                    entity.PartnerOrderNo = keyWords;
                }
                else if (type == 3)
                {
                    accountCondit = "(t.account like '%" + keyWords + "%' or t.mobile like '%" + keyWords + "%')";
                }
                else if (type == 4)
                {
                    entity.Face = CommFun.ToDecimal(keyWords, null);
                }
            }

            entity.AddData(":Condition", accountCondit);
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getReviewCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getReviewList", entity);
            }
            return(model);
        }
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public ReceiptFundRecordListModel Query(NameValueCollection nvc)
        {
            ReceiptFundRecordListModel model  = new ReceiptFundRecordListModel();
            MReceiptFundRecord         entity = new MReceiptFundRecord();
            StringBuilder WhereString         = new StringBuilder();

            //下游渠道查询
            if (!string.IsNullOrEmpty(nvc["PayType"]))
            {
                WhereString.AppendFormat(" and t1.account_type={0}", nvc["PayType"]);
            }
            if (!string.IsNullOrEmpty(nvc["ChannelNo"]))
            {
                WhereString.AppendFormat(" and t1.down_channel_no={0}", nvc["ChannelNo"]);
            }

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            entity.AddData(":WhereString", string.IsNullOrEmpty(WhereString.ToString()) ? " and 1=1" : WhereString.ToString());

            //时间
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));

            //关键字
            string keyWords = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWords))
            {
                entity.OrderNO = keyWords;
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #9
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public ZdCouponUsedListModel Query(NameValueCollection nvc)
        {
            ZdCouponUsedListModel model  = new ZdCouponUsedListModel();
            MZdCouponUsed         entity = new MZdCouponUsed();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            //时间
            DateTime starttime = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime endtime   = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value.AddDays(1);

            entity.AddData(":ST", " t.use_time>=to_date('" + starttime + "','yyyy-mm-dd  hh24:mi:ss')");
            entity.AddData(":ET", "t.use_time<to_date('" + endtime + "','yyyy-mm-dd  hh24:mi:ss')");

            //关键字
            string keyWords = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWords))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                if (type == 1)
                {
                    entity.OrderNo = keyWords;
                }
                else if (type == 2)
                {
                    entity.DownOrderNo = keyWords;
                }
                else if (type == 3)
                {
                    entity.CouponPrice = CommFun.ToDecimal(keyWords, null);
                }
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #10
0
        public IResult OrderManaul(string id, string user, string manaul, string remark)
        {
            var paramErrcode = new OracleParameter("v_out_status", OracleDbType.Varchar2, 10, ErrorCode.Failure, System.Data.ParameterDirection.Output);
            var paramMsg     = new OracleParameter("v_out_msg", OracleDbType.Varchar2, 20, "", System.Data.ParameterDirection.Output);

            dbAccess.DbProvider.GetDataSetByProcedure("sp_pay_manual",
                                                      new OracleParameter("v_order_no", id),
                                                      new OracleParameter("v_result", manaul),
                                                      new OracleParameter("v_user", user),
                                                      new OracleParameter("v_remark", remark),
                                                      paramErrcode,
                                                      paramMsg
                                                      );
            int     errCode = CommFun.ToInt(paramErrcode.Value, ErrorCode.Failure).Value;
            IResult result  = new Result(errCode == 100, paramMsg.Value.ToString());

            return(result);
        }
Example #11
0
        public OrderDeliveryListModel ReviewQuery(NameValueCollection nvc)
        {
            OrderDeliveryListModel model  = new OrderDeliveryListModel();
            MOrderDelivery         entity = new MOrderDelivery();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["t"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));

            string keyWord = CommFun.GetString(nvc["KeyWords"]);

            if (!string.IsNullOrEmpty(keyWord))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                switch (type)
                {
                case 1:
                    entity.OrderNo = nvc["KeyWords"];
                    break;

                case 2: entity.DeliveryId = CommFun.ToLong(nvc["KeyWords"], -1);
                    break;

                case 3: entity.UpOrderNo = nvc["KeyWords"];
                    break;
                }
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getReviewCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getReviewList", entity);
            }
            return(model);
        }
Example #12
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public OrderRefundListModel Query(NameValueCollection nvc)
        {
            OrderRefundListModel model  = new OrderRefundListModel();
            MOrderRefund         entity = new MOrderRefund();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            DateTime st = CommFun.ToDateTime(nvc["s"], DateTime.Now.AddDays(-1)).Value;
            DateTime et = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value;

            entity.AddData("ST", st.ToString("yyyy-MM-dd"));
            entity.AddData("ET", et.ToString("yyyy-MM-dd"));
            if (!string.IsNullOrEmpty(nvc["ReStatus"]))
            {
                entity.Status = CommFun.ToInt(nvc["ReStatus"], null);
            }
            if (!string.IsNullOrEmpty(nvc["KeyWords"]))
            {
                switch (nvc["keytype"])
                {
                case "1": entity.OrderNo = CommFun.GetString(nvc["KeyWords"], null);
                    break;

                case "2": entity.RecordId = CommFun.ToLong(nvc["KeyWords"], null);
                    break;

                case "3": entity.RefundFee = CommFun.ToDecimal(nvc["KeyWords"], null);
                    break;
                }
            }
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public UpChannelConfigListModel Query(NameValueCollection nvc)
        {
            UpChannelConfigListModel model  = new UpChannelConfigListModel();
            MUpChannelConfig         entity = new MUpChannelConfig();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }
Example #14
0
 public IResult Item()
 {
     try
     {
         MUpChannelConfig entity = new MUpChannelConfig();
         entity.SetData(Request.Form);
         entity.DownChannelNo = CommFun.ToInt(Request["DChannelNo"], null);
         string  id     = CommFun.GetString(Request["__id"]);
         IResult result = UpChannelConfigService.Instance.Save(id, entity);
         if (result.Status)
         {
             result.SetSuccessMessage("保存成功");
         }
         else
         {
             result.SetErrorMessage("保存失败");
         }
         return(result);
     }
     catch (Exception ex)
     {
         return(new Result(false, ex.Message));
     }
 }
Example #15
0
        /// <summary>
        /// 查询列表数据
        /// </summary>
        /// <param name="nvc">参数集合</param>
        /// <returns></returns>
        public OrderMainListModel Query(NameValueCollection nvc)
        {
            OrderMainListModel model  = new OrderMainListModel();
            MOrderMain         entity = new MOrderMain();

            model.PageSize = CommFun.ToInt(nvc["ps"],
                                           SettingHelper.Instance.GetInt("PageSize", 10)).Value;
            model.PageIndex = CommFun.ToInt(nvc["pi"],
                                            SettingHelper.Instance.GetInt("PageIndex", 0)).Value + 1;
            entity.SetData(nvc, false);
            entity.TrimEmptyProperty();
            entity.AddData(":PS", model.PageSize);
            entity.AddData(":PI", model.PageIndex);
            //时间
            DateTime starttime = CommFun.ToDateTime(nvc["e"], DateTime.Now).Value;
            DateTime endtime   = starttime.AddDays(1);

            if (!string.IsNullOrEmpty(nvc["h"]))
            {
                //近半个小时
                entity.AddData(":ST", " t.create_time >= sysdate-30/24/60");
                entity.AddData(":ET", " t.create_time < sysdate+30/24/60");
            }
            else
            {
                entity.AddData(":ST", " t.create_time>=to_date('" + starttime + "','yyyy-mm-dd  hh24:mi:ss')");
                entity.AddData(":ET", "t.create_time<to_date('" + endtime + "','yyyy-mm-dd  hh24:mi:ss')");
            }
            //关键字
            string keyWords      = CommFun.GetString(nvc["KeyWords"]);
            string accountCondit = "1=1";

            if (!string.IsNullOrEmpty(keyWords))
            {
                int?type = CommFun.ToInt(nvc["keytype"], null);
                if (type == 1)
                {
                    entity.OrderNo = keyWords;
                }
                else if (type == 2)
                {
                    entity.PartnerOrderNo = keyWords;
                }
                else if (type == 3)
                {
                    accountCondit = "(t.account like '%" + keyWords + "%' or t.mobile like '%" + keyWords + "%')";
                }
                else if (type == 4)
                {
                    entity.Face = CommFun.ToDecimal(keyWords, null);
                }
            }

            entity.AddData(":Condition", accountCondit);
            model.TotalCount = CommFun.ToInt(handler.GetScalarByXmlTemplate("getCount", entity), 0).GetValueOrDefault();
            if (model.TotalCount > 0)
            {
                model.List = handler.GetDataListByTemplate("getList", entity);
            }
            return(model);
        }