feat: 集成微信收款服务

This commit is contained in:
RockYang
2023-07-20 17:46:32 +08:00
parent d24b3c46bf
commit 1e1bcd4a30
9 changed files with 262 additions and 51 deletions

View File

@@ -6,6 +6,7 @@ import (
"chatplus/handler"
"chatplus/handler/admin"
logger2 "chatplus/logger"
"chatplus/modules/wexin"
"chatplus/service"
"chatplus/service/function"
"chatplus/store"
@@ -101,6 +102,12 @@ func main() {
return xdb.NewWithBuffer(cBuff)
}),
// 创建微信机器人
fx.Provide(wexin.NewWeChatBot),
fx.Invoke(func(bot *wexin.WeChatBot) error {
return bot.Login()
}),
// 创建函数
fx.Provide(func() (function.FuncZaoBao, error) {
apiToken := os.Getenv("AL_API_TOKEN")