示例#1
0
        public static void Save(Domain.CompanyLimitPolicy policy, string operatorAccount)
        {
            var model      = PolicySetService.QueryLimitPolicy(policy.Company);
            var repository = Factory.CreatePolicySetRepository();

            repository.Save(policy);
            // 记录日志
            string originalContent = "";
            string newContent      = string.Format("返点:{0},可出票航空公司:{1}", policy.Child.Rebate, policy.Child.Airlines.Join(","));

            if (model != null)
            {
                originalContent = string.Format("返点:{0},可出票航空公司:{1}", model.Child.Rebate, model.Child.Airlines.Join(","));
                saveUpdateLog("公司设置政策", originalContent, newContent, OperatorRole.Provider, policy.Company.ToString(), operatorAccount);
            }
            else
            {
                saveAddLog("公司设置政策", newContent, OperatorRole.Provider, policy.Company.ToString(), operatorAccount);
            }
        }
示例#2
0
        public static void Save(Domain.SetPolicy policy, string operatorAccount)
        {
            var model    = PolicySetService.QuerySetPolicy(policy.Company);
            var reposity = Factory.CreatePolicySetRepository();

            reposity.Save(policy);
            // 记录日志
            string newContent = string.Format("公司Id:{0},可发布特价政策条数:{1},可发布单程控位政策条数:{2},可发布散冲团政策条数:{3},可发布免票政策条数:{4},可发布集团票政策条数:{5},可发布商旅卡政策条数:{6},可发布其他特殊政策{9},可发布低打高返政策条数{10},航空公司:{7},出港城市:{8}",
                                              policy.Company, policy.PromotionCount, policy.SinglenessCount, policy.DisperseCount, policy.CostFreeCount, policy.BlocCount, policy.BusinessCount, policy.Airlines.Join(","), policy.Departure.Join(","), policy.OtherSpecialCount, policy.LowToHighCount);

            if (model != null)
            {
                string originalContent = string.Format("公司Id:{0},可发布特价政策条数:{1},可发布单程控位政策条数:{2},可发布散冲团政策条数:{3},可发布免票政策条数:{4},可发布集团票政策条数:{5},可发布商旅卡政策条数:{6},可发布其他特殊政策{9},可发布低打高返政策条数{10},航空公司:{7},出港城市:{8}",
                                                       policy.Company, model.PromotionCount, model.SinglenessCount, model.DisperseCount, model.CostFreeCount, model.BlocCount, model.BusinessCount, model.Airlines.Join(","), model.Departure.Join(","), policy.OtherSpecialCount, policy.LowToHighCount);
                saveUpdateLog("政策设置", originalContent, newContent, OperatorRole.Platform, policy.Company.ToString(), operatorAccount);
            }
            else
            {
                saveAddLog("政策设置", newContent, OperatorRole.Platform, policy.Company.ToString(), operatorAccount);
            }
        }