public async Task <NewErrorModel> SendMsg(string projectId) { try { DDContext context = new DDContext(); DingTalkServersController dingTalkServersController = new DingTalkServersController(); ProjectInfo projectInfo = context.ProjectInfo.Where(p => p.ProjectId == projectId).FirstOrDefault(); await dingTalkServersController.SendProjectMsg(projectInfo.ResponsibleManId, string.Format("亲,您的{0}项目即将在{1}到期,请尽快完成项目并申请结题。", projectInfo.ProjectName, projectInfo.EndTime), string.Format("eapp://page/approveDetail/projectDetail/projectDetail?projectId={0}", projectInfo.ProjectId)); return(new NewErrorModel() { error = new Error(0, "通知成功!", "") { }, }); } catch (Exception ex) { throw ex; } }