| | |
| | | public List<tbl_sms_task> GetSmsConent() |
| | | { |
| | | List<tbl_sms_task> list = new List<tbl_sms_task>(); |
| | | string[] OutUserid = System.Configuration.ConfigurationManager.AppSettings["OutUserid"].Trim().Split(','); |
| | | string[] Out = System.Configuration.ConfigurationManager.AppSettings["OutUserid"].Trim().Split(','); |
| | | 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 '%.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 '%é_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) |
| | | { |
| | | foreach (var item in OutUserid) |
| | | if (!Out.Contains(dr["UserID"].ToString().Trim())) |
| | | { |
| | | if(dr["UserID"].ToString()!=item) |
| | | { |
| | | int taskid = int.Parse(dr["TaskID"].ToString()); |
| | | int userid = int.Parse(dr["UserID"].ToString()); |
| | | string content = dr["MsgContent"].ToString(); |
| | | int isaudit = int.Parse(dr["IsAudit"].ToString()); |
| | | list.Add(new tbl_sms_task() { TaskID = taskid, UserID = userid, MsgContent = content, IsAudit = isaudit }); |
| | | } |
| | | else |
| | | { |
| | | Console.WriteLine($"åå¨è¿æ»¤IDï¼{item},è·³è¿è¯¥IDå
容"); |
| | | Log4netService.Debug($"ãå®¡æ ¸æä½ãåå¨è¿æ»¤IDï¼{item},è·³è¿è¯¥IDå
容ï¼{dr["MsgContent"]}"); |
| | | } |
| | | } |
| | | int taskid = int.Parse(dr["TaskID"].ToString()); |
| | | int userid = int.Parse(dr["UserID"].ToString()); |
| | | string content = dr["MsgContent"].ToString(); |
| | | int isaudit = int.Parse(dr["IsAudit"].ToString()); |
| | | list.Add(new tbl_sms_task() { TaskID = taskid, UserID = userid, MsgContent = content, IsAudit = isaudit }); |
| | | } |
| | | else |
| | | { |
| | | Console.WriteLine($"åå¨è¿æ»¤IDï¼{dr["UserID"].ToString().Trim()},è·³è¿è¯¥IDå
容"); |
| | | Log4netService.Debug($"ãå®¡æ ¸æä½ãåå¨è¿æ»¤IDï¼{dr["UserID"].ToString().Trim()},è·³è¿è¯¥IDå
容ï¼{dr["MsgContent"]}"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |