bryan-cyf / easynotice Goto Github PK
View Code? Open in Web Editor NEW这是一个基于.NET开源的消息通知组件,它包含了邮件、钉钉、飞书、企业微信的群机器人通知,可以帮助我们更容易地发送程序异常通知!
License: MIT License
这是一个基于.NET开源的消息通知组件,它包含了邮件、钉钉、飞书、企业微信的群机器人通知,可以帮助我们更容易地发送程序异常通知!
License: MIT License
报错信息定位到:FeishuOptions
错误信息如下:
Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.Extensions.Hosting.IHostedService Lifetime: Singleton ImplementationType: Mall.Marketing.MqQueues.LikeEventFeishuNoticeQueue': Cannot consume scoped service 'Microsoft.Extensions.Options.IOptionsSnapshot
1[EasyNotice.FeishuOptions]' from singleton 'Microsoft.Extensions.Hosting.IHostedService'.)
`
代码配置如下图:
环境是.Net 6。
请大佬帮忙看下,感谢!
建议把WebHook token,Secret 做成方法参数传入,这样可以支持发送多个群组。
对企业微信、钉钉、飞书,改进支持@成员以及@所有成员,同时兼容发送邮件指定成员列表
是否支持services.Configure
启动后是否还能更改配置
以下是企业微信返回的消息:
{"errcode":0,"errmsg":"ok"}
但是在EasyNoticeSendResponse类中,
public bool IsSuccess => string.IsNullOrEmpty(ErrMsg);
判断errmsg是否为空表示成功,这明显errmsg不是空的,最终导致返回结果失败,实际是成功的
以下是国内的某公司做的多渠道消息推送功能,可以做为参考
https://www.bt.cn/bbs/thread-108309-1-1.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.