fix: 优化 mj 获取进度

This commit is contained in:
Xyfacai
2023-12-23 23:14:58 +08:00
parent 7c4719b6ee
commit fd4ef086dc
4 changed files with 212 additions and 11 deletions

View File

@@ -131,3 +131,9 @@ func (midjourney *Midjourney) Update() error {
err = DB.Save(midjourney).Error
return err
}
func MjBulkUpdate(taskIDs []string, params map[string]any) error {
return DB.Model(&Midjourney{}).
Where("mj_id in (?)", taskIDs).
Updates(params).Error
}