新增过滤ID条件,符合过滤ID的不进行审核,过滤ID:传入一级ID自动获取到其下及本身所有ID,均不进行过滤,也可传入子ID
4个文件已添加
10个文件已修改
106 ■■■■■ 已修改文件
掌骏平台自动审核/AutoCheckSMS/.vs/AutoCheckSMS/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/SQLHelper.cs 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/bin/Debug/AutoCheckSMS.exe 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/bin/Debug/AutoCheckSMS.pdb 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/bin/Debug/logs/Error2021-07-12.log 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/bin/Debug/logs/app2021-07-12.log 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/obj/Debug/AutoCheckSMS.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/obj/Debug/AutoCheckSMS.exe 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/obj/Debug/AutoCheckSMS.pdb 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/AutoCheckSMS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/Test/obj/Debug/Test.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/TestTemplate/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache 补丁 | 查看 | 原始文档 | blame | 历史
掌骏平台自动审核/TestTemplate/obj/Debug/TestTemplate.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/.vs/AutoCheckSMS/v16/.suo
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/SQLHelper.cs
@@ -38,17 +38,39 @@
        {
            List<tbl_sms_task> list = new List<tbl_sms_task>();
           string[] Out = System.Configuration.ConfigurationManager.AppSettings["OutUserid"].Trim().Split(',');
            string U_sql = "select userid,parentuserid from tbl_user  where isuse=1 and isdelete=0";
            DataSet U_ds1 = da.ExecuteDataSet(CommandType.Text, U_sql);
            DataTable U_dt = U_ds1.Tables[0];
            List<GetUserID> IGetID = new List<GetUserID>();
            foreach (DataRow item in U_dt.Rows)
            {
                IGetID.Add(new GetUserID{
                    UserID = item[0].ToString(),
                    ParentuserID = item[1].ToString()
                });
            }
            List<GetUserID> GetID = GetSonUsserID(Out, IGetID);
            string[] I_Out = new string[GetID.Count];
            int i = 0;
            foreach (var item in GetID)
            {
                I_Out[i] = item.UserID;
                i++;
            }
            Log4netService.Debug($"过滤ID个数:{GetID.Count}");
            try
            {
                string time = DateTime.Now.AddHours(-1).ToString("yyyy-MM-dd HH:mm");
                string sql = $"select TaskID,UserID,MsgContent,ReadError,IsAudit from tbl_sms_task where CreateTime>= '{time}'and IsAudit=0 and ReadError like '%分包完成%' and MsgContent not like '%回_退%' and MsgContent not like '%退订%' and MsgContent not like '%退_T%' and MsgContent not like '%.c%'  and MsgContent not like '%点对点%')";
                string sql = $"select TaskID,UserID,MsgContent,ReadError,IsAudit from tbl_sms_task where CreateTime>= '{time}'and IsAudit=0 and ReadError like '%分包完成%' and msgContent not like '%退'  and MsgContent not like '%回_退%' and MsgContent not like '%退订%' and MsgContent not like '%退_T%' and MsgContent not like '%.c%'  and MsgContent not like '%点对点%'";
                DataSet ds = da.ExecuteDataSet(CommandType.Text, sql);
                DataTable dt = ds.Tables[0];
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        if (!Out.Contains(dr["UserID"].ToString().Trim()))
                        if (!I_Out.Contains(dr["UserID"].ToString().Trim()))
                        {
                            int taskid = int.Parse(dr["TaskID"].ToString());
                            int userid = int.Parse(dr["UserID"].ToString());
@@ -58,7 +80,7 @@
                        }
                        else
                        {
                            Console.WriteLine($"存在过滤ID:{dr["UserID"].ToString().Trim()},跳过该ID内容");
                            Console.WriteLine($"【审核操作】存在过滤ID:{dr["UserID"].ToString().Trim()},跳过该ID内容");
                            Log4netService.Debug($"【审核操作】存在过滤ID:{dr["UserID"].ToString().Trim()},跳过该ID内容:{dr["MsgContent"]}");
                        }
@@ -73,6 +95,68 @@
        }
        /// <summary>
        /// é€’归获取获取子ID
        /// </summary>
        /// <param name="UserID">传入一级ID</param>
        /// <param name="GetID">传入账号表</param>
        /// <returns></returns>
        public static List<GetUserID> GetSonUsserID(string[] UserID, List<GetUserID> GetID)
        {
            List<GetUserID> LGetID = new List<GetUserID>();
            List<GetUserID> LID = new List<GetUserID>();
            for (int i = 0; i < UserID.Length; i++)
            {
                LID.AddRange(GetID.Where(a => a.ParentuserID == UserID[i]).ToList());//将GetID中符合一级ID的所有子ID传入LID
            }
            if (LID.Count != 0)//递归条件
            {
                string[] SonID = new string[LID.Count];
                int i = 0;
                foreach (var item in LID)
                {
                    //Console.WriteLine($"递归 ID:{item.ParentuserID}   å­ID:{item.UserID}");
                    SonID[i] = item.UserID;
                    i++;
                }//将子ID转成数组
                //for (int l = 0; l < SonID.Length; l++)
                //{
                //    Console.WriteLine($"需要递归的ID:{SonID[l]}");
                //}
                for (int h = 0; h < UserID.Length; h++)
                {
                    LGetID.Add(new GetUserID
                    {
                        UserID = UserID[h].ToString(),
                        ParentuserID = 0.ToString()
                    });
                }
                LGetID.AddRange(GetSonUsserID(SonID, GetID));
            }
            else
            {
                for (int i = 0; i < UserID.Length; i++)
                {
                    LGetID.Add(new GetUserID
                    {
                        UserID = UserID[i].ToString(),
                        ParentuserID = 0.ToString()
                    });
                }
                return LGetID;
            }
            return LGetID;
        }
        public class GetUserID
        {
            public string UserID { get; set; }
            public string ParentuserID { get; set; }
        }
        /// <summary>
        /// æ›´æ–°å®¡æ ¸çŠ¶æ€
        /// </summary>
        /// <param name="audit"></param>
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/bin/Debug/AutoCheckSMS.exe
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/bin/Debug/AutoCheckSMS.pdb
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/bin/Debug/logs/Error2021-07-12.log
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/bin/Debug/logs/app2021-07-12.log
New file
@@ -0,0 +1,15 @@
2021-07-12 15:43:46,750 [1] DEBUG RollingFileLog - åŠ è½½æ¨¡æ¿...263
2021-07-12 15:43:46,823 [5] DEBUG RollingFileLog - æ¨¡æ¿å¤„理线程启动...线程ID:5
2021-07-12 15:43:46,824 [5] DEBUG RollingFileLog - æ¨¡æ¿å¤„理
2021-07-12 15:43:46,832 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:43:56,839 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:06,849 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:16,858 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:26,866 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:36,882 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:46,890 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:44:51,996 [5] DEBUG RollingFileLog - æ¨¡æ¿å¤„理
2021-07-12 15:44:56,899 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:45:06,910 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:45:16,922 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
2021-07-12 15:45:26,928 [4] DEBUG RollingFileLog - èŽ·å–å¾…å®¡æ ¸çš„è®°å½•:0
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/obj/Debug/AutoCheckSMS.csproj.FileListAbsolute.txt
@@ -50,4 +50,3 @@
D:\Company\izjun\掌骏平台自动审核\AutoCheckSMS\obj\Debug\AutoCheckSMS.csproj.CopyComplete
D:\Company\izjun\掌骏平台自动审核\AutoCheckSMS\obj\Debug\AutoCheckSMS.exe
D:\Company\izjun\掌骏平台自动审核\AutoCheckSMS\obj\Debug\AutoCheckSMS.pdb
D:\Company\izjun\掌骏平台自动审核\AutoCheckSMS\obj\Debug\AutoCheckSMS.csprojAssemblyReference.cache
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/obj/Debug/AutoCheckSMS.exe
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/obj/Debug/AutoCheckSMS.pdb
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/AutoCheckSMS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/Test/obj/Debug/Test.csproj.AssemblyReference.cache
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/TestTemplate/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
ÕÆ¿¥Æ½Ì¨×Ô¶¯ÉóºË/TestTemplate/obj/Debug/TestTemplate.csproj.AssemblyReference.cache
Binary files differ