Example #1
0
		/// <summary>
		/// 默认构造函数
		/// </summary>
		public SPSendClientParamsEntity()
		{
			_id = 0;
			_name = null;
			_description = null;
			_isEnable = null;
			_isRequired = null;
			_clientID = null;
			_mappingParams = null;
			_title = null;
			_channelID = null;
		}
Example #2
0
		/// <summary>
		/// 全构造函数
		/// </summary>
		public SPSendClientParamsEntity( int id, string name, string description, bool? isEnable, bool? isRequired, SPClientEntity clientID, string mappingParams, string title, int? channelID)
		{
			_id = id;
			_name = name;
			_description = description;
			_isEnable = isEnable;
			_isRequired = isRequired;
			_clientID = clientID;
			_mappingParams = mappingParams;
			_title = title;
			_channelID = channelID;
		}
Example #3
0
        public List <SPPaymentInfoEntity> FindAllDataTableByOrderByAndCleintIDAndChanneLIDAndDate(int channelId, int clientId, DateTime startDateTime, DateTime enddateTime, DataType dataType, string sortFieldName, bool isDesc)
        {
            SPChannelEntity channelEntity = null;

            if (channelId > 0)
            {
                channelEntity = this.DataObjectsContainerIocID.SPChannelDataObjectInstance.Load(channelId);
            }


            SPClientEntity clientEntity = null;

            if (clientId > 0)
            {
                clientEntity = this.DataObjectsContainerIocID.SPClientDataObjectInstance.Load(clientId);
            }


            return(this.SelfDataObj.FindAllDataTableByOrderByAndCleintIDAndChanneLIDAndDate(channelEntity, clientEntity,
                                                                                            startDateTime,
                                                                                            enddateTime, dataType.ToString(),
                                                                                            sortFieldName, isDesc));
        }
        public void QuickAdd(string loginID, string code, SPChannelEntity channelEntity, int mainloginuserID, List <CodeUserID> codeUserIds, string channelCode)
        {
            SPClientEntity mainclientEntity = new SPClientEntity();

            mainclientEntity.Name            = channelEntity.Name + loginID;
            mainclientEntity.Description     = channelEntity.Name + loginID;
            mainclientEntity.UserID          = mainloginuserID;
            mainclientEntity.IsDefaultClient = false;
            mainclientEntity.Alias           = "";

            this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(mainclientEntity);

            SPClientChannelSettingEntity mainChannelClient = new SPClientChannelSettingEntity();

            mainChannelClient.Name          = channelEntity.Name + loginID;
            mainChannelClient.Description   = channelEntity.Name + loginID;
            mainChannelClient.ChannelID     = channelEntity;
            mainChannelClient.ClinetID      = mainclientEntity;
            mainChannelClient.InterceptRate = 0;
            mainChannelClient.OrderIndex    = 1;
            mainChannelClient.UpRate        = 0;
            mainChannelClient.DownRate      = 0;
            mainChannelClient.CommandColumn = "ywid";
            mainChannelClient.CommandType   = "3";
            mainChannelClient.CommandCode   = code;
            mainChannelClient.SyncData      = false;
            mainChannelClient.ChannelCode   = channelCode;
            mainChannelClient.Disable       = false;

            this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(mainChannelClient);

            foreach (CodeUserID codeUserId in codeUserIds)
            {
                SPClientEntity subClientEntity = new SPClientEntity();
                subClientEntity.Name            = channelEntity.Name + loginID + codeUserId.Code;
                subClientEntity.Description     = channelEntity.Name + loginID + codeUserId.Code;
                subClientEntity.UserID          = codeUserId.UserID;
                subClientEntity.IsDefaultClient = false;
                subClientEntity.Alias           = "";



                this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(subClientEntity);


                SPClientChannelSettingEntity subChannelClient = new SPClientChannelSettingEntity();

                subChannelClient.Name          = channelEntity.Name + loginID + codeUserId.Code;
                subChannelClient.Description   = channelEntity.Name + loginID + codeUserId.Code;
                subChannelClient.ChannelID     = channelEntity;
                subChannelClient.ClinetID      = subClientEntity;
                subChannelClient.InterceptRate = 0;
                subChannelClient.OrderIndex    = 2;
                subChannelClient.UpRate        = 0;
                subChannelClient.DownRate      = 0;
                subChannelClient.CommandColumn = "ywid";
                subChannelClient.CommandType   = "3";
                subChannelClient.CommandCode   = code + codeUserId.Code;
                subChannelClient.SyncData      = false;
                subChannelClient.ChannelCode   = channelCode;
                subChannelClient.Disable       = false;

                this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(subChannelClient);
            }
        }
 public List <SPSendClientParamsEntity> GetAllEnableParams(SPClientEntity entity)
 {
     return(this.DataObjectsContainerIocID.SPSendClientParamsDataObjectInstance.GetAllEnableParams(entity));
 }
        public void QuickAdd(string loginId, string code, SPChannelEntity channelEntity, int mainloginuserId, List <CodeUserID> codeUserIds, string channelCode, int orderIndex, bool hasSubCode, string codeType, string allowAndDisableArea, string getway, string dayLimit, string monthLimit, string sendText)
        {
            SPClientEntity mainclientEntity = new SPClientEntity();

            mainclientEntity.Name            = channelEntity.Name + loginId;
            mainclientEntity.Description     = channelEntity.Name + loginId;
            mainclientEntity.UserID          = mainloginuserId;
            mainclientEntity.IsDefaultClient = false;
            mainclientEntity.Alias           = "";

            this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(mainclientEntity);

            SPClientChannelSettingEntity mainChannelClient = new SPClientChannelSettingEntity();

            mainChannelClient.Name          = channelEntity.Name + loginId;
            mainChannelClient.Description   = channelEntity.Name + loginId;
            mainChannelClient.ChannelID     = channelEntity;
            mainChannelClient.ClinetID      = mainclientEntity;
            mainChannelClient.InterceptRate = 0;
            mainChannelClient.OrderIndex    = orderIndex;
            mainChannelClient.UpRate        = 0;
            mainChannelClient.DownRate      = 0;
            mainChannelClient.CommandColumn = "ywid";
            if (codeType == "1")
            {
                mainChannelClient.CommandType = "1";
            }
            else if (codeType == "2")
            {
                mainChannelClient.CommandType = "3";
            }
            else
            {
                mainChannelClient.CommandType = "3";
            }
            mainChannelClient.CommandCode         = code;
            mainChannelClient.SyncData            = false;
            mainChannelClient.ChannelCode         = channelCode;
            mainChannelClient.Disable             = false;
            mainChannelClient.AllowAndDisableArea = allowAndDisableArea;
            mainChannelClient.Getway     = getway;
            mainChannelClient.DayLimit   = dayLimit;
            mainChannelClient.MonthLimit = monthLimit;
            mainChannelClient.SendText   = sendText;



            this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(mainChannelClient);

            foreach (CodeUserID codeUserId in codeUserIds)
            {
                SPClientEntity subClientEntity = new SPClientEntity();
                subClientEntity.Name            = channelEntity.Name + loginId + codeUserId.Code;
                subClientEntity.Description     = channelEntity.Name + loginId + codeUserId.Code;
                subClientEntity.UserID          = codeUserId.UserID;
                subClientEntity.IsDefaultClient = false;
                subClientEntity.Alias           = "";



                this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(subClientEntity);


                SPClientChannelSettingEntity subChannelClient = new SPClientChannelSettingEntity();

                subChannelClient.Name                = channelEntity.Name + loginId + codeUserId.Code;
                subChannelClient.Description         = channelEntity.Name + loginId + codeUserId.Code;
                subChannelClient.ChannelID           = channelEntity;
                subChannelClient.ClinetID            = subClientEntity;
                subChannelClient.InterceptRate       = 0;
                subChannelClient.OrderIndex          = orderIndex + 1;
                subChannelClient.UpRate              = 0;
                subChannelClient.DownRate            = 0;
                subChannelClient.CommandColumn       = "ywid";
                subChannelClient.CommandType         = "3";
                subChannelClient.CommandCode         = code + codeUserId.Code;
                subChannelClient.SyncData            = false;
                subChannelClient.ChannelCode         = channelCode;
                subChannelClient.Disable             = false;
                subChannelClient.AllowAndDisableArea = allowAndDisableArea;
                subChannelClient.Getway              = getway;
                subChannelClient.DayLimit            = dayLimit;
                subChannelClient.MonthLimit          = monthLimit;
                subChannelClient.SendText            = sendText;

                this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(subChannelClient);
            }
        }
Example #7
0
        public List <SPClientChannelSettingEntity> GetPageList_By_SPClientEntity(string orderByColumnName, bool isDesc, int pageIndex, int pageSize, SPClientEntity fkentity, out int recordCount)
        {
            NHibernateDynamicQueryGenerator <SPClientChannelSettingEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_CLINETID.Eq(fkentity));

            AddDefaultOrderByToQueryGenerator(orderByColumnName, isDesc, dynamicQueryGenerator);

            dynamicQueryGenerator.SetFirstResult((pageIndex - 1) * pageSize);

            dynamicQueryGenerator.SetMaxResults(pageSize);

            return(FindListByPageByQueryBuilder(dynamicQueryGenerator, out recordCount));
        }
 public List <SPClientChannelSettingEntity> FindAllByClinetID(SPClientEntity _clinetID)
 {
     return(this.SelfDataObj.GetList_By_SPClientEntity(_clinetID));
 }
 public List <SPSendClientParamsEntity> FindAllByClientID(SPClientEntity _clientID)
 {
     return(this.SelfDataObj.GetList_By_SPClientEntity(_clientID));
 }
Example #10
0
		/// <summary>
		/// 全构造函数
		/// </summary>
		public SPPaymentInfoEntity( int id, string mobileNumber, SPChannelEntity channelID, SPClientEntity clientID, string message, bool? isIntercept, DateTime? createDate, int? clientGroupID, string cpid, string mid, string port, string ywid, string linkid, string dest, string price, string ip, bool? sucesssToSend, string extendField1, string extendField2, string extendField3, string extendField4, string extendField5, string extendField6, string extendField7, string extendField8, string mobileOperators, string requestContent, string city, string province, bool? isTestData, int? channleClientID, bool? isSycnData, string sSycnDataUrl, int? sycnRetryTimes, bool isReport)
		{
			_id = id;
			_mobileNumber = mobileNumber;
			_channelID = channelID;
			_clientID = clientID;
			_message = message;
			_isIntercept = isIntercept;
			_createDate = createDate;
			_clientGroupID = clientGroupID;
			_cpid = cpid;
			_mid = mid;
			_port = port;
			_ywid = ywid;
			_linkid = linkid;
			_dest = dest;
			_price = price;
			_ip = ip;
			_sucesssToSend = sucesssToSend;
			_extendField1 = extendField1;
			_extendField2 = extendField2;
			_extendField3 = extendField3;
			_extendField4 = extendField4;
			_extendField5 = extendField5;
			_extendField6 = extendField6;
			_extendField7 = extendField7;
			_extendField8 = extendField8;
			_mobileOperators = mobileOperators;
			_requestContent = requestContent;
			_city = city;
			_province = province;
			_isTestData = isTestData;
			_channleClientID = channleClientID;
			_isSycnData = isSycnData;
			_sSycnDataUrl = sSycnDataUrl;
			_sycnRetryTimes = sycnRetryTimes;
			_isReport = isReport;
		}
Example #11
0
        public List <SPPaymentInfoEntity> FindAllByOrderByAndCleintIDAndChanneLIDAndDateAndProviceNoIntercept1(SPClientEntity clientEntity, int spClientGroupId, DateTime startDate, DateTime endDate, string province, string city, string phone, string sortFieldName, bool isdesc, int pageIndex, int limit, out int recordCount)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>();

            queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(clientEntity));


            if (startDate != DateTime.MinValue)
            {
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startDate.Date));
            }


            if (endDate != DateTime.MinValue)
            {
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(endDate.AddDays(1).Date));
            }

            if (!string.IsNullOrEmpty(province))
            {
                if (province.Equals("NULL"))
                {
                    queryBuilder.AddWhereClause(PROPERTY_PROVINCE.Eq(""));
                }
                else
                {
                    queryBuilder.AddWhereClause(PROPERTY_PROVINCE.Eq(province));
                }
            }

            if (!string.IsNullOrEmpty(city))
            {
                queryBuilder.AddWhereClause(PROPERTY_CITY.Eq(city));
            }

            if (!string.IsNullOrEmpty(phone))
            {
                queryBuilder.AddWhereClause(PROPERTY_MOBILENUMBER.Like(phone, MatchMode.Start));
            }

            queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(false));

            queryBuilder.AddWhereClause(PROPERTY_CLIENTGROUPID.Eq(spClientGroupId));

            AddDefaultOrderByToQueryGenerator(sortFieldName, isdesc, queryBuilder);

            queryBuilder.SetFirstResult((pageIndex - 1) * limit);

            queryBuilder.SetMaxResults(limit);

            return(FindListByPageByQueryBuilder(queryBuilder, out recordCount));
        }
 public List <SPClientChannelSettingEntity> GetSettingByClient(SPClientEntity spClientEntity)
 {
     return(this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.GetSettingByClient(spClientEntity));
 }
        public void QuickAdd(SPChannelEntity spChannelWrapper, string linkPName, string mobilePName, string spCodePName, string moPName, int userID)
        {
            spChannelWrapper.Rate  = 11;
            spChannelWrapper.Price = Convert.ToDecimal("1.00");
            this.SelfDataObj.Save(spChannelWrapper);

            SPClientEntity spClientEntity = new SPClientEntity();

            spClientEntity.Name            = spChannelWrapper.Name + "默认下家";
            spClientEntity.Description     = spChannelWrapper.Name + "默认下家";
            spClientEntity.UserID          = userID;
            spClientEntity.IsDefaultClient = true;
            spClientEntity.Alias           = "";


            this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(spClientEntity);


            SPClientChannelSettingEntity obj = new SPClientChannelSettingEntity();

            obj.Name          = spChannelWrapper.Name + "默认下家";
            obj.Description   = spChannelWrapper.Name + "默认下家";
            obj.ChannelID     = spChannelWrapper;
            obj.ClinetID      = spClientEntity;
            obj.InterceptRate = 0;
            obj.OrderIndex    = 0;
            obj.UpRate        = 0;
            obj.DownRate      = 0;
            obj.CommandColumn = "ywid";
            obj.CommandType   = "7";
            obj.CommandCode   = "";
            obj.SyncData      = false;

            this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(obj);

            SPChannelParamsEntity moParamsEntity = new SPChannelParamsEntity();

            moParamsEntity.ChannelID         = spChannelWrapper;
            moParamsEntity.Name              = moPName;
            moParamsEntity.Title             = moPName;
            moParamsEntity.Description       = "上行内容";
            moParamsEntity.IsEnable          = true;
            moParamsEntity.IsRequired        = true;
            moParamsEntity.IsUnique          = false;
            moParamsEntity.ParamsMappingName = "ywid";
            moParamsEntity.ParamsType        = "普通参数";

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(moParamsEntity);

            SPChannelParamsEntity linkidParamsEntity = new SPChannelParamsEntity();

            linkidParamsEntity.ChannelID         = spChannelWrapper;
            linkidParamsEntity.Name              = linkPName;
            linkidParamsEntity.Title             = linkPName;
            linkidParamsEntity.Description       = "唯一标识";
            linkidParamsEntity.IsEnable          = true;
            linkidParamsEntity.IsRequired        = true;
            linkidParamsEntity.IsUnique          = false;
            linkidParamsEntity.ParamsMappingName = "linkid";
            linkidParamsEntity.ParamsType        = "普通参数";

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(linkidParamsEntity);

            SPChannelParamsEntity mobileParamsEntity = new SPChannelParamsEntity();

            mobileParamsEntity.ChannelID         = spChannelWrapper;
            mobileParamsEntity.Name              = mobilePName;
            mobileParamsEntity.Title             = mobilePName;
            mobileParamsEntity.Description       = "手机号码";
            mobileParamsEntity.IsEnable          = true;
            mobileParamsEntity.IsRequired        = true;
            mobileParamsEntity.IsUnique          = false;
            mobileParamsEntity.ParamsMappingName = "mobile";
            mobileParamsEntity.ParamsType        = "普通参数";

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(mobileParamsEntity);


            SPChannelParamsEntity spCodeParamsEntity = new SPChannelParamsEntity();

            spCodeParamsEntity.ChannelID         = spChannelWrapper;
            spCodeParamsEntity.Name              = spCodePName;
            spCodeParamsEntity.Title             = spCodePName;
            spCodeParamsEntity.Description       = "通道号码";
            spCodeParamsEntity.IsEnable          = true;
            spCodeParamsEntity.IsRequired        = true;
            spCodeParamsEntity.IsUnique          = false;
            spCodeParamsEntity.ParamsMappingName = "cpid";
            spCodeParamsEntity.ParamsType        = "普通参数";

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(spCodeParamsEntity);

            string sycnParamNameMO = "mo";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMO"]))
            {
                sycnParamNameMO = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMO"];
            }

            SPChannelDefaultClientSycnParamsEntity moSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            moSendParamsEntity.ChannelID     = spChannelWrapper;
            moSendParamsEntity.Name          = sycnParamNameMO;
            moSendParamsEntity.Title         = sycnParamNameMO;
            moSendParamsEntity.Description   = "上行内容";
            moSendParamsEntity.IsEnable      = true;
            moSendParamsEntity.IsRequired    = true;
            moSendParamsEntity.MappingParams = "ywid";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(moSendParamsEntity);

            string sycnParamNameLinkID = "linkid";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameLinkID"]))
            {
                sycnParamNameLinkID = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameLinkID"];
            }

            SPChannelDefaultClientSycnParamsEntity linkidSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            linkidSendParamsEntity.ChannelID     = spChannelWrapper;
            linkidSendParamsEntity.Name          = sycnParamNameLinkID;
            linkidSendParamsEntity.Title         = sycnParamNameLinkID;
            linkidSendParamsEntity.Description   = "唯一标识";
            linkidSendParamsEntity.IsEnable      = true;
            linkidSendParamsEntity.IsRequired    = true;
            linkidSendParamsEntity.MappingParams = "linkid";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(linkidSendParamsEntity);


            string sycnParamNameMobile = "mobile";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMobile"]))
            {
                sycnParamNameMobile = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMobile"];
            }

            SPChannelDefaultClientSycnParamsEntity mobileSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            mobileSendParamsEntity.ChannelID     = spChannelWrapper;
            mobileSendParamsEntity.Name          = sycnParamNameMobile;
            mobileSendParamsEntity.Title         = sycnParamNameMobile;
            mobileSendParamsEntity.Description   = "手机号码";
            mobileSendParamsEntity.IsEnable      = true;
            mobileSendParamsEntity.IsRequired    = true;
            mobileSendParamsEntity.MappingParams = "mobile";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(mobileSendParamsEntity);


            string sycnParamNameSPCode = "spCode";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameSPCode"]))
            {
                sycnParamNameSPCode = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameSPCode"];
            }



            SPChannelDefaultClientSycnParamsEntity spCodeSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            spCodeSendParamsEntity.ChannelID     = spChannelWrapper;
            spCodeSendParamsEntity.Name          = sycnParamNameSPCode;
            spCodeSendParamsEntity.Title         = sycnParamNameSPCode;
            spCodeSendParamsEntity.Description   = "通道号码";
            spCodeSendParamsEntity.IsEnable      = true;
            spCodeSendParamsEntity.IsRequired    = true;
            spCodeSendParamsEntity.MappingParams = "cpid";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(spCodeSendParamsEntity);
        }
        public void QuickAddIVR(SPChannelEntity spChannelWrapper, string linkPName, string mobilePName, string spCodePName, string startTimePName,
                                string endTimePName, string feetimePName, int userID)
        {
            spChannelWrapper.Rate  = 11;
            spChannelWrapper.Price = Convert.ToDecimal("1.00");
            this.SelfDataObj.Save(spChannelWrapper);

            SPClientEntity spClientEntity = new SPClientEntity();

            spClientEntity.Name            = spChannelWrapper.Name + "默认下家";
            spClientEntity.Description     = spChannelWrapper.Name + "默认下家";
            spClientEntity.UserID          = userID;
            spClientEntity.IsDefaultClient = true;
            spClientEntity.Alias           = "";


            this.DataObjectsContainerIocID.SPClientDataObjectInstance.Save(spClientEntity);


            SPClientChannelSettingEntity obj = new SPClientChannelSettingEntity();

            obj.Name          = spChannelWrapper.Name + "默认下家";
            obj.Description   = spChannelWrapper.Name + "默认下家";
            obj.ChannelID     = spChannelWrapper;
            obj.ClinetID      = spClientEntity;
            obj.InterceptRate = 0;
            obj.OrderIndex    = 0;
            obj.UpRate        = 0;
            obj.DownRate      = 0;
            obj.CommandColumn = "ywid";
            obj.CommandType   = "7";
            obj.CommandCode   = "";
            obj.SyncData      = false;

            this.DataObjectsContainerIocID.SPClientChannelSettingDataObjectInstance.Save(obj);

            SPChannelParamsEntity linkidParamsEntity = CreateNewChannelParams(spChannelWrapper, linkPName, "唯一标识", "linkid");

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(linkidParamsEntity);

            SPChannelParamsEntity mobileParamsEntity = CreateNewChannelParams(spChannelWrapper, mobilePName, "手机号码", "mobile");

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(mobileParamsEntity);

            SPChannelParamsEntity spCodeParamsEntity = CreateNewChannelParams(spChannelWrapper, spCodePName, "通道号码", "cpid");

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(spCodeParamsEntity);

            SPChannelParamsEntity moCodeParamsEntity = CreateNewChannelParams(spChannelWrapper, spCodePName, "上行内容", "ywid");

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(moCodeParamsEntity);

            SPChannelParamsEntity fcountCodeParamsEntity = CreateNewChannelParams(spChannelWrapper, "fcount", "fcount", "extendfield3");

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(fcountCodeParamsEntity);

            if (!string.IsNullOrEmpty(startTimePName))
            {
                SPChannelParamsEntity startTimeParamsEntity = CreateNewChannelParams(spChannelWrapper, startTimePName, "计费开始时间", "extendfield1");

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(startTimeParamsEntity);
            }

            if (!string.IsNullOrEmpty(endTimePName))
            {
                SPChannelParamsEntity endTimeParamsEntity = CreateNewChannelParams(spChannelWrapper, endTimePName, "计费结束时间", "extendfield2");

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(endTimeParamsEntity);
            }

            if (!string.IsNullOrEmpty(feetimePName))
            {
                SPChannelParamsEntity feetimeParamsEntity = CreateNewChannelParams(spChannelWrapper, feetimePName, "计费时长", "extendfield5");

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(feetimeParamsEntity);
            }


            string sycnParamNameFeetime = "feetime";

            SPChannelDefaultClientSycnParamsEntity feetimeSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            feetimeSendParamsEntity.ChannelID     = spChannelWrapper;
            feetimeSendParamsEntity.Name          = sycnParamNameFeetime;
            feetimeSendParamsEntity.Title         = sycnParamNameFeetime;
            feetimeSendParamsEntity.Description   = "计费时长";
            feetimeSendParamsEntity.IsEnable      = true;
            feetimeSendParamsEntity.IsRequired    = true;
            feetimeSendParamsEntity.MappingParams = "extendfield3";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(feetimeSendParamsEntity);

            string sycnParamNameLinkID = "linkid";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameLinkID"]))
            {
                sycnParamNameLinkID = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameLinkID"];
            }

            SPChannelDefaultClientSycnParamsEntity linkidSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            linkidSendParamsEntity.ChannelID     = spChannelWrapper;
            linkidSendParamsEntity.Name          = sycnParamNameLinkID;
            linkidSendParamsEntity.Title         = sycnParamNameLinkID;
            linkidSendParamsEntity.Description   = "唯一标识";
            linkidSendParamsEntity.IsEnable      = true;
            linkidSendParamsEntity.IsRequired    = true;
            linkidSendParamsEntity.MappingParams = "linkid";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(linkidSendParamsEntity);


            string sycnParamNameMobile = "mobile";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMobile"]))
            {
                sycnParamNameMobile = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameMobile"];
            }

            SPChannelDefaultClientSycnParamsEntity mobileSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            mobileSendParamsEntity.ChannelID     = spChannelWrapper;
            mobileSendParamsEntity.Name          = sycnParamNameMobile;
            mobileSendParamsEntity.Title         = sycnParamNameMobile;
            mobileSendParamsEntity.Description   = "手机号码";
            mobileSendParamsEntity.IsEnable      = true;
            mobileSendParamsEntity.IsRequired    = true;
            mobileSendParamsEntity.MappingParams = "mobile";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(mobileSendParamsEntity);


            string sycnParamNameSPCode = "spCode";

            if (!string.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameSPCode"]))
            {
                sycnParamNameSPCode = System.Configuration.ConfigurationManager.AppSettings["DefaultSycnParamNameSPCode"];
            }



            SPChannelDefaultClientSycnParamsEntity spCodeSendParamsEntity = new SPChannelDefaultClientSycnParamsEntity();

            spCodeSendParamsEntity.ChannelID     = spChannelWrapper;
            spCodeSendParamsEntity.Name          = sycnParamNameSPCode;
            spCodeSendParamsEntity.Title         = sycnParamNameSPCode;
            spCodeSendParamsEntity.Description   = "通道号码";
            spCodeSendParamsEntity.IsEnable      = true;
            spCodeSendParamsEntity.IsRequired    = true;
            spCodeSendParamsEntity.MappingParams = "cpid";

            this.DataObjectsContainerIocID.SPChannelDefaultClientSycnParamsDataObjectInstance.Save(spCodeSendParamsEntity);
        }
Example #15
0
        public List<SPClientChannelSettingEntity> GetSettingByClient(SPClientEntity spClientEntity)
        {
            NHibernateDynamicQueryGenerator<SPClientChannelSettingEntity> queryGenerator = this.GetNewQueryBuilder();

            queryGenerator.AddWhereClause(PROPERTY_CLINETID.Eq(spClientEntity));

            return this.FindListByQueryBuilder(queryGenerator);
        }
Example #16
0
 public List <SPPaymentInfoEntity> FindAllByClientID(SPClientEntity _clientID)
 {
     return(this.SelfDataObj.GetList_By_SPClientEntity(_clientID));
 }
Example #17
0
        public List <SPPaymentInfoEntity> FindAllNotSendData(SPChannelEntity channelId, SPClientEntity clientId, DateTime startdate, DateTime endDate, int maxDataCount)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>();


            if (channelId != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(channelId));
            }

            if (clientId != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(clientId));
            }

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startdate.Date));

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(endDate.AddDays(1).Date));

            queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(false));
            queryBuilder.AddWhereClause(PROPERTY_SUCESSSTOSEND.Eq(false));

            queryBuilder.SetMaxResults(maxDataCount);

            return(this.FindListByQueryBuilder(queryBuilder));
        }
 internal SPClientWrapper(SPClientEntity entityObj)
 {
     entity = entityObj;
 }
Example #19
0
        public List <SPPaymentInfoEntity> FindAllByOrderByAndClientIDAndDateNoIntercept(SPClientEntity clientEntity, DateTime startDate, DateTime endDate, string sortFieldName, bool isdesc, int pageIndex, int limit, out int recordCount)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>();

            queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(clientEntity));


            if (startDate == DateTime.MinValue)
            {
                startDate = DateTime.Now;
            }


            if (endDate == DateTime.MinValue)
            {
                endDate = DateTime.Now;
            }

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startDate.Date));

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(endDate.AddDays(1).Date));

            queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(false));

            AddDefaultOrderByToQueryGenerator(sortFieldName, isdesc, queryBuilder);

            queryBuilder.SetFirstResult((pageIndex - 1) * limit);

            queryBuilder.SetMaxResults(limit);

            return(FindListByPageByQueryBuilder(queryBuilder, out recordCount));
        }
Example #20
0
		/// <summary>
		/// 默认构造函数
		/// </summary>
		public SPPaymentInfoEntity()
		{
			_id = 0;
			_mobileNumber = null;
			_channelID = null;
			_clientID = null;
			_message = null;
			_isIntercept = null;
			_createDate = null;
			_clientGroupID = null;
			_cpid = null;
			_mid = null;
			_port = String.Empty;
			_ywid = null;
			_linkid = null;
			_dest = null;
			_price = null;
			_ip = null;
			_sucesssToSend = null;
			_extendField1 = null;
			_extendField2 = null;
			_extendField3 = null;
			_extendField4 = null;
			_extendField5 = null;
			_extendField6 = null;
			_extendField7 = null;
			_extendField8 = null;
			_mobileOperators = null;
			_requestContent = null;
			_city = null;
			_province = null;
			_isTestData = null;
			_channleClientID = null;
			_isSycnData = null;
			_sSycnDataUrl = null;
			_sycnRetryTimes = 0;
			_isReport = false;
		}
Example #21
0
        public List <SPPaymentInfoEntity> FindAllDataTableByOrderByAndCleintIDAndChanneLIDAndDate(SPChannelEntity channelId, SPClientEntity clientId, DateTime startDateTime, DateTime enddateTime, string dataType, string sortFieldName, bool isDesc, int pageIndex, int pageSize, out int recordCount)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator <SPPaymentInfoEntity>();

            if (channelId != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(channelId));
            }

            if (clientId != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(clientId));
            }


            if (startDateTime == DateTime.MinValue)
            {
                startDateTime = DateTime.Now;
            }


            if (enddateTime == DateTime.MinValue)
            {
                enddateTime = DateTime.Now;
            }

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startDateTime.Date));

            queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(enddateTime.AddDays(1).Date));

            switch (dataType)
            {
            case "All":
                break;

            case "Intercept":
                queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(true));
                break;

            case "Down":
                queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(false));
                break;

            case "DownSycn":
                queryBuilder.AddWhereClause(PROPERTY_ISINTERCEPT.Eq(false));
                queryBuilder.AddWhereClause(PROPERTY_SUCESSSTOSEND.Eq(true));
                break;
            }

            AddDefaultOrderByToQueryGenerator(sortFieldName, isDesc, queryBuilder);

            queryBuilder.SetFirstResult((pageIndex - 1) * pageSize);

            queryBuilder.SetMaxResults(pageSize);

            return(FindListByPageByQueryBuilder(queryBuilder, out recordCount));
        }
 public List <SPClientChannelSettingEntity> FindAllByOrderByAndFilterAndClinetID(string orderByColumnName, bool isDesc, int pageIndex, int pageSize, SPClientEntity _clinetID, out int recordCount)
 {
     return(this.SelfDataObj.GetPageList_By_SPClientEntity(orderByColumnName, isDesc, pageIndex, pageSize, _clinetID, out recordCount));
 }
Example #23
0
        public void ReBulidReport(DateTime date)
        {
            this.AdoNetDb.ResetAllReportedData(date);

            //Get all need to generate report's channle nad client ID.
            DataSet dsAllClientChannel = this.AdoNetDb.GetAllClientChannel(date);

            DataTable dsDayTotalCount     = this.AdoNetDb.GetDayTotalCount(date);
            DataTable dsDayDownCount      = this.AdoNetDb.GetDayDownCount(date);
            DataTable dsDayInterceptCount = this.AdoNetDb.GetDayInterceptCount(date);
            DataTable dsDayDownSycnCount  = this.AdoNetDb.GetDayDownSycnCount(date);

            foreach (DataRow dataRow in dsAllClientChannel.Tables[0].Rows)
            {
                int channelID = (int)dataRow["ChannelID"];
                int clientID  = (int)dataRow["ClientID"];


                string filterSql = string.Format(" ClientID = {0} and ChannelID = {1} ", clientID, channelID);

                int totalCount     = this.AdoNetDb.ExecuteScalarFormDataTable("TotalCount", filterSql, dsDayTotalCount);
                int downCount      = this.AdoNetDb.ExecuteScalarFormDataTable("DownCount", filterSql, dsDayDownCount);
                int interceptCount = this.AdoNetDb.ExecuteScalarFormDataTable("InterceptCount", filterSql, dsDayInterceptCount);
                int downSycnCount  = this.AdoNetDb.ExecuteScalarFormDataTable("DownSycnCount", filterSql, dsDayDownSycnCount);

                SPDayReportEntity dayReportEntity = this.SelfDataObj.FindReportByChannelIDChannelIDAndDate(channelID, clientID, date);

                bool hasReport = false;


                if (dayReportEntity == null)
                {
                    dayReportEntity           = new SPDayReportEntity();
                    dayReportEntity.ChannelID = channelID;
                    dayReportEntity.ClientID  = clientID;

                    try
                    {
                        if (clientID > 0)
                        {
                            SPClientEntity spClient =
                                this.DataObjectsContainerIocID.SPClientDataObjectInstance.Load(clientID);

                            if (spClient != null)
                            {
                                //if(spClient.SPClientGroupID!=null)
                                //{
                                //    dayReportEntity.ClientGroupID = spClient.SPClientGroupID.Id;
                                //}

                                SPClientWrapper clientWrapper = new SPClientWrapper(spClient);

                                if (clientWrapper.DefaultClientChannelSetting != null)
                                {
                                    dayReportEntity.ChannelClientID = clientWrapper.DefaultClientChannelSetting.Id;
                                }
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Logger.Error("±¨±í´íÎó£¨SPClientGroupID ChannelClientID£©£º" + ex.Message);
                    }
                }

                dayReportEntity.UpTotalCount        = totalCount;
                dayReportEntity.UpSuccess           = 0;
                dayReportEntity.InterceptTotalCount = interceptCount;
                dayReportEntity.InterceptSuccess    = 0;
                dayReportEntity.DownTotalCount      = downCount;
                dayReportEntity.DownSuccess         = downSycnCount;


                dayReportEntity.ReportDate = new DateTime(date.Year, date.Month, date.Day);

                this.SelfDataObj.SaveOrUpdate(dayReportEntity);
            }

            this.AdoNetDb.ClearAllReportedData(date);
        }
Example #24
0
        public List <SPSendClientParamsEntity> FindAllByOrderByAndClientID(string sortFieldName, bool isDesc, int pageIndex, int limit, SPClientEntity client, out int recordCount)
        {
            NHibernateDynamicQueryGenerator <SPSendClientParamsEntity> queryGenerator = this.GetNewQueryBuilder();

            queryGenerator.AddWhereClause(PROPERTY_CLIENTID.Eq(client));

            AddDefaultOrderByToQueryGenerator(sortFieldName, isDesc, queryGenerator);

            return(this.FindListByPageByQueryBuilder(queryGenerator, pageIndex, limit, out recordCount));
        }