feat: support dingtalk push

This commit is contained in:
engigu
2024-01-06 17:44:45 +08:00
parent 2730bb97ca
commit e6f7c2c64e
26 changed files with 418 additions and 121 deletions
+5 -1
View File
@@ -14,7 +14,11 @@ type SendTasksIns struct {
// InsEmailConfig 实例里面的邮箱config
type InsEmailConfig struct {
ToAccount string `json:"to_account" validate:"required,email" label:"收件邮箱"`
Title string `json:"title" validate:"required,max=150" label:"邮箱标题"`
//Title string `json:"title" validate:"required,max=150" label:"邮箱标题"`
}
// InsEmailConfig 实例里面的邮箱config
type InsDtalkConfig struct {
}
// ManyAddTaskIns 批量添加实例
+1
View File
@@ -122,6 +122,7 @@ func GetTasksIns(id string) (TaskIns, error) {
Select(fmt.Sprintf("%s.*, %s.name as way_name", insTable, waysTable)).
Joins(fmt.Sprintf("JOIN %s ON %s.way_id = %s.id", waysTable, insTable, waysTable)).
Where(fmt.Sprintf("%s.task_id = ?", insTable), id).
Order(fmt.Sprintf("%s.created_on DESC", insTable)).
Scan(&taskIns)
taskResult.ID = task.ID