feat: 新增企业微信应用消息发送渠道
custom-deploy-your-server / build-deploy (push) Has been cancelled
deploy-demo-site / build-deploy (push) Has been cancelled
Deploy Docs to GitHub Pages / build (push) Has been cancelled
Deploy Docs to GitHub Pages / Deploy (push) Has been cancelled

- 添加 WeChatCorpAccount 消息类型常量
- 新增企业微信应用配置结构体和渠道验证逻辑
- 实现企业微信应用消息发送服务,支持 text、markdown 和 textcard 格式
- 添加前端配置界面,支持动态接收者设置
- 集成代理支持(HTTP/HTTPS/SOCKS5)
This commit is contained in:
2026-02-10 18:52:59 +08:00
parent 6ee6910ab7
commit 9538ab481b
11 changed files with 482 additions and 35 deletions
+18
View File
@@ -58,6 +58,24 @@ func (sw *SendTaskInsService) ValidateDiffIns(ins models.SendTasksIns) (string,
var Config models.InsQyWeiXinConfig
return "", Config
}
if ins.WayType == constant.MessageTypeWeChatCorpAccount {
var Config models.InsWeChatCorpAccountConfig
err := json.Unmarshal([]byte(ins.Config), &Config)
if err != nil {
return "企业微信应用发送配置反序列化失败!", empty
}
var configMap map[string]interface{}
json.Unmarshal([]byte(ins.Config), &configMap)
allowMultiRecip, exists := configMap["allowMultiRecip"].(bool)
if exists && allowMultiRecip && Config.ToAccount == "" {
return "", Config
}
_, Msg := app.CommonPlaygroundValid(Config)
return Msg, Config
}
if ins.WayType == constant.MessageTypeFeishu {
var Config models.InsFeishuConfig
return "", Config