zrg
2024-07-02 8ef6f1c4ba50d978f3816d17a8fe9cf1ee28bcfb
修改时间格式
4个文件已修改
32 ■■■■■ 已修改文件
DingDingMsg/.vs/DingDingMsg/DesignTimeBuild/.dtbcache.v2 补丁 | 查看 | 原始文档 | blame | 历史
DingDingMsg/.vs/DingDingMsg/v16/.suo 补丁 | 查看 | 原始文档 | blame | 历史
DingDingMsg/DingDingMsg/MSG.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DingDingMsg/DingDingMsg/Program.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DingDingMsg/.vs/DingDingMsg/DesignTimeBuild/.dtbcache.v2
Binary files differ
DingDingMsg/.vs/DingDingMsg/v16/.suo
Binary files differ
DingDingMsg/DingDingMsg/MSG.cs
@@ -51,7 +51,7 @@
                string url = $"{_baseUrl}?access_token={accessToken}";
                DateTimeOffset now = DateTimeOffset.Now;
                string currentTime = now.ToString("yyyy-MM-dd HH:mm:ss");
                string messageWithTimestamp = $"{currentTime}---{message}"; // 在消息内容之前添加时间戳
                string messageWithTimestamp = $"消息时间:{currentTime} --- {message}"; // 在消息内容之前添加时间戳
                string messageJson = $"{{\"msgtype\": \"text\", \"text\": {{ \"content\": \"{messageWithTimestamp}\" }} }}";
                string requestBody = $"agent_id={agentId}&userid_list={userIdList}&dept_id_list={deptIdList}&to_all_user={toAllUser}&msg={messageJson}";
DingDingMsg/DingDingMsg/Program.cs
@@ -64,7 +64,6 @@
                        else
                        {
                            Console.WriteLine(responseData.errcode);
                            //Console.WriteLine();
                        }
                    }                  
@@ -77,34 +76,7 @@
                await Task.Delay(TimeSpan.FromMinutes(1));
            }
        }
        //public static (string, string,string) Get_User()
        //{
        //    //查询数据库子表所有信息
        //    string sql = "select a.HReceiveMan 接收人,c.HDingDingUserID 钉钉id,b.HDescription 内容 from OA_ErrMsgBackBillSub2 a left join OA_ErrMsgBackBillMain b on a.HInterID=b.HInterID left join Gy_Czygl c on a.HReceiveMan=c.Czymc where HSendFlag = '0'";
        //    dt = oCN.RunProcReturn(sql, "OA_ErrMsgBackBillSub2");
        //    if (dt.Tables[0].Rows.Count>0)
        //    {
        //        string HContext = dt.Tables[0].Rows[0]["内容"].ToString();
        //        List<string> HNames = new List<string>();
        //        List<string> StaresList = new List<string>();
        //        for (int i = 0; i < dt.Tables[0].Rows.Count; i++)
        //        {
        //            string HName = dt.Tables[0].Rows[i]["钉钉id"].ToString();
        //            string Stares = dt.Tables[0].Rows[i]["接收人"].ToString();
        //            HNames.Add(HName);
        //            StaresList.Add(Stares);
        //        }
        //        string concatenatedNames = string.Join(",", HNames);
        //        string concatenatedStares = string.Join("','", StaresList);
        //        return (concatenatedNames, HContext, concatenatedStares);
        //    }
        //    return ("1","1","1");
        //}
        }
        public class ResponseData
        {
            public int errcode { get; set; }