コード例 #1
0
ファイル: Program.cs プロジェクト: zhijieqiu/migratedata
        public static async Task <int> AddAutoReplyRule()
        {
            long   merchantId = 9842;
            string describ    = "";

            AutoReplyRule ruleobj = new AutoReplyRule()

            {
                MerchantId        = merchantId,
                RuleType          = 3,
                Description       = describ,
                AutoReplyMessages = new List <AutoReplyMessage>(),
                AutoReplyKeywords = new List <AutoReplyKeyword>(),
                AutoReplyRegexes  = new List <AutoReplyRegex>()
            };

            ruleobj.AutoReplyMessages.Add(new AutoReplyMessage()
            {
                MerchantId = merchantId,
                MsgJson    = "",
                MsgType    = "text"
            });
            AddCannedReply acr = new AddCannedReply();
            int            t   = await acr.AddAutoReplyRuleAndSave(ruleobj);

            Console.WriteLine(t);
            return(t);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: zhijieqiu/migratedata
        public static async Task <int> BatchAddRules()
        {
            AddCannedReply acr   = new AddCannedReply();
            int            count = await acr.AddAutoReplyRuleAndSave(@"D:/zhijie/regResult/regResult3.txt");

            Console.WriteLine(count);
            return(count);
        }