Merge branch 'Calcium-Ion:main' into main

This commit is contained in:
我秦始皇
2024-03-14 03:56:31 -07:00
committed by GitHub
24 changed files with 973 additions and 843 deletions

View File

@@ -147,7 +147,12 @@ func FixAbility() (int, error) {
return 0, err
}
var channels []Channel
err = DB.Where("id NOT IN (?)", abilityChannelIds).Find(&channels).Error
if len(abilityChannelIds) == 0 {
err = DB.Find(&channels).Error
} else {
err = DB.Where("id NOT IN (?)", abilityChannelIds).Find(&channels).Error
}
if err != nil {
return 0, err
}

View File

@@ -19,6 +19,8 @@ type Midjourney struct {
FailReason string `json:"fail_reason"`
ChannelId int `json:"channel_id"`
Quota int `json:"quota"`
Buttons string `json:"buttons"`
Properties string `json:"properties"`
}
// TaskQueryParams 用于包含所有搜索条件的结构体,可以根据需求添加更多字段